Visorgood commented on issue #7639:
URL: 
https://github.com/apache/datafusion-comet/issues/7639#issuecomment-7078250069

   Plan after reading the write path:
   
   - Native writes don't keep iceberg-rust's metrics: 
`rebuildDataFilesWithJavaMetrics` re-reads each footer and runs the 
version-matched `ParquetUtil.footerMetrics` with `MetricsConfig.forTable`. 
Modes, truncation and the list/map rules are iceberg-java's code on both paths. 
What can still differ is the input: footer statistics from parquet-rs instead 
of parquet-java, and the float/double metrics carried over from iceberg-rust.
   - Checked one candidate first: parquet-java leaves a chunk's statistics out 
of the file when min + max reach 4096 bytes, and the native writer keeps them. 
The manifests still match, because iceberg-java takes its metrics from the 
footer it holds in memory. The test 
([77af0bf](https://github.com/Visorgood/datafusion-comet/commit/77af0bfb6)) 
writes 2047- and 2048-byte strings and binary, plus one column under `full` so 
the whole value is compared, and passes on 1.8.1 and 1.11.0. The files 
themselves do differ there (only native files carry those statistics), which 
the docs' list of physical differences doesn't mention yet; I can add a line in 
the PR.
   - Next: a helper that compares the raw `data_files` maps (value/null/NaN 
counts, bounds) per field id, file by file, with the two documented divergences 
(zero sign, float counts under a NULL struct on 1.9+) handled explicitly. 
Groups: integers/boolean/dates/timestamps, decimals (INT32, INT64, fixed, and 
`decimal(1, s)`), strings/binary across metrics modes, all-NULL columns and 
several row groups, nested leaves, metrics config, plus one partitioned and one 
copy-on-write write. UUID stays out until #7198 lands.
   
   The PR CI runs only Spark 4.1, so I'll run 3.5 and 4.0 locally and ask for 
`run-all-spark-profiles` on the PR. @andygrove could item 5 in #5644 point to 
this issue?


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