zeroshade commented on code in PR #1478:
URL: https://github.com/apache/iceberg-go/pull/1478#discussion_r3608817110
##########
table/internal/parquet_files.go:
##########
@@ -989,15 +964,195 @@ func (p parquetFormat) DataFileStatsFromMeta(meta
Metadata, statsCols map[int]St
return ok
})
+ vlo, vup := p.collectVariantBounds(pqmeta, arrowSchema, colMapping)
Review Comment:
**Medium — variant bounds bypass the configured metrics mode**
`collectVariantBounds` is invoked unconditionally here and isn't passed
`statsCols`, so it can't consult the parent variant column's `MetricsMode`. The
normal-column path honors it — `MetricModeNone` skips the column entirely
(`DataFileStatsFromMeta`, ~L888-890) and `MetricModeCounts` skips min/max
(~L919) — but variant child lower/upper values are still written even when
`write.metadata.metrics.default=none`, `=counts`, or
`write.metadata.metrics.column.<name>=none` is configured, exposing variant
child data values in metadata that the user explicitly disabled.
Suggested fix: thread `statsCols` into `collectVariantBounds` and, per
parent variant field id, only emit bounds when the parent's mode permits them
(skip `None`/`Counts`). The bounds themselves are correct — this is a
metrics-config / info-exposure gap, not a wrong-bounds bug.
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]