Skip to content

feat: Add iceberg.schema to footer for compatibility#2249

Open
vovacf201 wants to merge 4 commits intoapache:mainfrom
risingwavelabs:pr/iceberg-schema-footer-v2
Open

feat: Add iceberg.schema to footer for compatibility#2249
vovacf201 wants to merge 4 commits intoapache:mainfrom
risingwavelabs:pr/iceberg-schema-footer-v2

Conversation

@vovacf201
Copy link

This PR adds the iceberg.schema key-value metadata to the Parquet file footer.

It embeds the full Iceberg schema JSON (including field IDs, types, and schema ID) into the Parquet file footer metadata, which is required for compatibility with downstream readers.

Changes:

  • Add ICEBERG_SCHEMA_KEY constant for the iceberg.schema metadata key
  • Add add_iceberg_schema_metadata method to ParquetWriterBuilder that injects the schema JSON into writer properties
  • Preserve any existing key-value metadata from the caller
  • Add comprehensive tests for metadata presence, roundtrip, nested schemas, and preservation of existing metadata

Cherry-picked from risingwavelabs/iceberg-rust commit 18a0e83

* mock change

* remove fmt

* add unit tests

* fix tests

* format

* commit
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.

2 participants