Skip to content

feat(table): support writing gzipped metadata json - #612

Merged
zeroshade merged 4 commits into
apache:mainfrom
hamilton-earthscope:gzip-meta-write
Oct 28, 2025
Merged

zeroshade merged 4 commits into
apache:mainfrom
hamilton-earthscope:gzip-meta-write

Conversation

@hamilton-earthscope

Copy link
Copy Markdown
Contributor

Followup to #610 ; add write support for gzipped table metadata.

Behavior is optional and enabled when table property write.metadata.compression-codec is set to gzip

Comment thread table/properties.go Resolved
Comment thread catalog/internal/utils.go
Comment on lines -39 to -42
func GetMetadataLoc(location string, newVersion uint) string {
return fmt.Sprintf("%s/metadata/%05d-%s.metadata.json",
location, newVersion, uuid.New().String())
}

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

was this function not being used at all?

@hamilton-earthscope hamilton-earthscope Oct 27, 2025 •

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

it was not.

i tried to use it but got a circular reference between table/ and internal/ so i just removed the dead code instead.

Comment thread catalog/internal/utils.go
}

func WriteTableMetadata(metadata table.Metadata, fs io.WriteFileIO, loc string) error {
func WriteTableMetadata(metadata table.Metadata, fs icebergio.WriteFileIO, loc string, compression string) error {

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

compression should probably be an enum and we should error if it's not an empty string or one we recognize

@zeroshade zeroshade left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks for this!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants