[WIP]Core, Parquet: Carry avg value sizes for v4 content stats - #17451
Draft
huan233usc wants to merge 1 commit into
Draft
[WIP]Core, Parquet: Carry avg value sizes for v4 content stats#17451huan233usc wants to merge 1 commit into
huan233usc wants to merge 1 commit into
Conversation
huan233usc
marked this pull request as draft
July 31, 2026 14:54
Propagate average non-null value sizes from Parquet metrics through Metrics and ContentFile so v4 content stats adapters can preserve them. Retain compatibility with older serialized Metrics instances. Generated-by: Codex
huan233usc
force-pushed
the
geo-avg-value-size-manifest
branch
from
July 31, 2026 17:45
018c802 to
4bdbfaf
Compare
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.
Follow-up to #17333.
#17333 collects the average serialized WKB size in
FieldMetrics, butParquetMetricspreviously discarded it while assemblingMetrics. As a result, the value could not reach aDataFileor be exposed to v4content_statsadapters.This change keeps the metric in Iceberg's shared in-memory file model without changing the v1-v3 manifest schema.
Metrics,ContentFile, file builders, copies, and filtering.DataWritertoDataFilepropagation.ContentFileview used by manifest readers.Metricsobjects.Scope and dependencies
mainafter Parquet: Track avg_value_size_in_bytes for Geo types #17333 and contains only the follow-up commit.ContentFilecarrier/accessor that wrapper needs and the v4 read bridge; Core: V4 write direction wrappers #16936 can consumeContentFile.avgValueSizes()after rebasing.Test Plan
MetricsfixtureDataWriterGeo propagation testsVerification Commands
./gradlew :iceberg-api:test --tests org.apache.iceberg.TestMetricsSerialization \ :iceberg-core:test --tests org.apache.iceberg.TestContentStatsBackedMap \ --tests org.apache.iceberg.TestTrackedFileAdapters \ :iceberg-data:test \ --tests org.apache.iceberg.parquet.TestParquetMetrics.testMetricsForGeospatialTypes \ :iceberg-parquet:test \ --tests org.apache.iceberg.parquet.TestParquetDataWriter.testGeospatialRoundTrip ./gradlew :iceberg-api:revapi :iceberg-core:revapi :iceberg-parquet:revapi \ :iceberg-api:spotlessCheck :iceberg-core:spotlessCheck \ :iceberg-parquet:spotlessCheckAI Disclosure