You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Commit 5107eda
Browse filesBrowse the repository at this point in the historyBrowse files
fix(metadata): write and detect gzip-compressed table metadata (#1014)
Codec::FromFileName used find_last_of with the multi-character suffix
'.metadata.json', which matches the last single character of the set
(the final 'n') instead of the suffix. For gzip-compressed metadata
written by Iceberg Java as '<name>.gz.metadata.json', the resulting
file_name_without_suffix kept the wrong tail, the '.gz' check failed,
and the file was misclassified as uncompressed kNone. Reading such a
file then fails to decompress.
Use rfind so the whole suffix matches. The legacy '.metadata.json.gz'
compatibility branch is unchanged. Round-trip reading of Java-written
gzip metadata files is covered by new unit tests.
NewTableMetadataFilePath names the file '<version>-<uuid>.gz.metadata.json'
when write.metadata.compression-codec is gzip, but Write always emitted plain
JSON, so the file contradicted its own name and no reader could inflate it.
Add a GZipCompressor next to the existing GZipDecompressor and compress in
Write when the location's codec is gzip, completing the round trip.
0 commit comments