nssalian commented on code in PR #1478:
URL: https://github.com/apache/iceberg-go/pull/1478#discussion_r3611794652


##########
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:
   Nice catch. I fixed it. Turned out the gate alone wouldn't have done 
anything - `Variant()` was returning an empty collector, so variant fields 
never had a stats entry to check the mode against. 
   Couple of parts in my commit:
   1. `Variant()` now populates the collector with the resolved mode (default + 
per-column override), sharing a `resolveColumnMetricsMode` helper with 
Primitive().
   2. `collectVariantBounds` skips the parent variant field when it's 
none/counts (or missing) - same as Java's 
    `ParquetMetrics.variant()`. Per-column still wins over the default, so 
`column.<name>=full` emits bounds even under a global none. 
   
   I added unit + e2e tests for all the mode combos. PTAL



-- 
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]

Reply via email to