jayzhan211 commented on PR #27546:
URL: https://github.com/apache/datafusion/pull/27546#issuecomment-7249126863

   @alamb the reason to bother: since 56.0, files from parquet-rs before 53.1 
(including DataFusion before 42.1) lose several optimizations, and the only fix 
we offer is rewriting the data. This PR reads a missing count as zero only for 
files from those writers, which never left out a non-zero count. Are you OK 
merging it, or would you rather park it until a user reports the slowdown?
   
   - **What 56.0 costs those files:** on nullable columns, `IS NULL` pruning, 
`COUNT(col)` from metadata, sort elimination and `NULLS FIRST` TopK pruning. 
Those writers left out `null_count` only when it was zero 
([arrow-rs#6490](https://github.com/apache/arrow-rs/pull/6490)), which covers 
most parquet-rs files written before October 2024.
   - **Wrong results:** need a file whose `created_by` names one of those old 
writers *and* that leaves out a non-zero count. Those writers never wrote that. 
parquet-rs 53.1 and later always write the count, so a current writer with an 
overridden `created_by` changes nothing. The bug #25242 fixed (#25239) was 
found by reading the code, not on a real file.
   - **Brittle parsing:** a missing, custom or unparseable `created_by` gets 
the 56.0 behavior, so a parsing mistake costs speed, not correctness.
   - **Compared with 55.x:** 55 read every missing count as zero, for every 
writer, in row-group pruning and file statistics. This PR does that only for 
the two writer ranges above.
   
   No one has reported the slowdown yet, but 56.0 is less than two weeks old.
   


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