Kafka Connect: Enable Parquet variant shredding for generic Record writes#16370
Open
soumilshah1995 wants to merge 1 commit into
Open
Kafka Connect: Enable Parquet variant shredding for generic Record writes#16370soumilshah1995 wants to merge 1 commit into
soumilshah1995 wants to merge 1 commit into
Conversation
8ce1a9d to
ccb48f1
Compare
Register ParquetFormatModel with RecordVariantShreddingAnalyzer and Record::copy, and analyze VARIANT columns using Iceberg schema column order so shredding works with Void engine schemas (Kafka Connect).
ccb48f1 to
67bfc1a
Compare
This was referenced May 17, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Kafka Connect uses Iceberg’s generic
Recordmodel with aVoidengine schema. Parquet variant shredding was ineffective on that path because the genericParquetFormatModeldid not use a variant shredding analyzer / row copier, andRecordVariantShreddingAnalyzercould not resolve VARIANT columns (engineresolveColumnIndexis a dead end forVoid).This PR wires
RecordVariantShreddingAnalyzerandRecord::copyintoGenericFormatModelsand analyzes VARIANT columns by IcebergSchema#columns()order so buffered inference and shredded Parquet columns work for Connect.Changes
GenericFormatModels: registerParquetFormatModelwithRecordVariantShreddingAnalyzer+Record::copy.RecordVariantShreddingAnalyzer: implementanalyzeVariantColumnsusing positional indices aligned withRecord#get.Config (Connect)
Table write properties (e.g. via
iceberg.tables.write-props):write.parquet.shred-variants=truewrite.parquet.variant-inference-buffer-size=<rows>Test plan
./gradlew :iceberg-data:check :iceberg-kafka-connect:iceberg-kafka-connect:check(or CI green).write.parquet.shred-variants=true; inspect Parquet fortyped_valuepaths / higher physical column count vsfalse.