You are viewing a plain text version of this content. The canonical link for it is here.
Posted to github@arrow.apache.org by "Rich-T-kid (via GitHub)" <gi...@apache.org> on 2026/08/11 20:18:20 UTC

[PR] [Parquet] Add row group column stats [arrow-rs]

Rich-T-kid opened a new pull request, #10652:
URL: https://github.com/apache/arrow-rs/pull/10652

   # Which issue does this PR close?
   
   <!--
   We generally require a GitHub issue to be filed for all bug fixes and enhancements and this helps us generate change logs for our releases. You can link an issue to this PR using the GitHub syntax.
   -->
   
   - works towards #10650.
   - works towards [#24114 & ](https://github.com/apache/datafusion/issues/24114) &  https://github.com/apache/datafusion/issues/22891
   
   # Rationale for this change
   
   see #10650
   
   <!--
   Why are you proposing this change? If this is already explained clearly in the issue then this section is not needed.
   Explaining clearly why changes are proposed helps reviewers understand your changes and offer better suggestions for fixes.
   -->
   
   # What changes are included in this PR?
   Added StatisticsConverter::row_group_distinct_counts() to the parquet crate, which reads the distinct_count field from row group statistics and returns a UInt64Array with one entry per row group. 
   
   <!--
   There is no need to duplicate the description in the issue here but it is sometimes worth providing a summary of the individual changes in this PR.
   -->
   
   # Are these changes tested?
   yes this PR includes two test that assert that row group stats are being propogated
   <!--
   We typically require tests for all PRs in order to:
   1. Prevent the code from being accidentally broken by subsequent changes
   2. Serve as another way to document the expected behavior of the code
   
   If tests are not included in your PR, please explain why (for example, are they covered by existing tests)?
   
   If this PR claims a performance improvement, please include evidence such as benchmark results.
   -->
   
   # Are there any user-facing changes?
   yes, adds new public method for reading row group distinct stats 
   <!--
   If there are user-facing changes then we may require documentation to be updated before approving the PR.
   
   If there are any breaking changes to public APIs, please call them out.
   -->
   


-- 
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: github-unsubscribe@arrow.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


Re: [PR] [Parquet] Add row group distinct counts to `StatisticsConverter` [arrow-rs]

Posted by "Rich-T-kid (via GitHub)" <gi...@apache.org>.
Rich-T-kid commented on PR #10652:
URL: https://github.com/apache/arrow-rs/pull/10652#issuecomment-5260468895

   I'll try and see if I can make it more performant and push up the PR tomorrow 👍 


-- 
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: github-unsubscribe@arrow.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


Re: [PR] [Parquet] Add row group distinct counts to `StatisticsConverter` [arrow-rs]

Posted by "etseidl (via GitHub)" <gi...@apache.org>.
etseidl merged PR #10652:
URL: https://github.com/apache/arrow-rs/pull/10652


-- 
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: github-unsubscribe@arrow.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


Re: [PR] [Parquet] Add row group distinct counts to `StatisticsConverter` [arrow-rs]

Posted by "etseidl (via GitHub)" <gi...@apache.org>.
etseidl commented on PR #10652:
URL: https://github.com/apache/arrow-rs/pull/10652#issuecomment-5333349580

   I think this has waited long enough, thanks @Rich-T-kid.


-- 
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: github-unsubscribe@arrow.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


Re: [PR] [Parquet] Add row group distinct counts to `StatisticsConverter` [arrow-rs]

Posted by "etseidl (via GitHub)" <gi...@apache.org>.
etseidl commented on PR #10652:
URL: https://github.com/apache/arrow-rs/pull/10652#issuecomment-5260428685

   > i just ran a simple implementation gated by a boolean flag and it ranges from 1.4x-8.8x slower depending on the data type.
   
   That's quite the hit, glad it's gated. But I can see a use for write-once-read-many scenarios where you'd likely want the cardinality and are willing to pay for it. 


-- 
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: github-unsubscribe@arrow.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


Re: [PR] [Parquet] Add row group distinct counts to `StatisticsConverter` [arrow-rs]

Posted by "Rich-T-kid (via GitHub)" <gi...@apache.org>.
Rich-T-kid commented on PR #10652:
URL: https://github.com/apache/arrow-rs/pull/10652#issuecomment-5260367709

   > This seems sensible to me, esp. if there are writers that actually populate this statistic.
   > 
   > How to tackle the write side of this is still a matter of debate. 😅
   
   @etseidl i just ran a simple implementation gated by a boolean flag and it ranges from 1.4x-8.8x slower depending on the data type.


-- 
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: github-unsubscribe@arrow.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


Re: [PR] [Parquet] Add row group column stats [arrow-rs]

Posted by "Rich-T-kid (via GitHub)" <gi...@apache.org>.
Rich-T-kid commented on PR #10652:
URL: https://github.com/apache/arrow-rs/pull/10652#issuecomment-5258475059

   🤔 datafusion does do something similar here https://github.com/apache/datafusion/blob/041a71671c7a505a2e3ed58689a20137c8f3d172/datafusion/datasource-parquet/src/metadata.rs#L835, but with this PR we allow arrow-rs user to do it directly as well make a consistent api.


-- 
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: github-unsubscribe@arrow.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


Re: [PR] [Parquet] Add row group distinct counts to `StatisticsConverter` [arrow-rs]

Posted by "Rich-T-kid (via GitHub)" <gi...@apache.org>.
Rich-T-kid commented on PR #10652:
URL: https://github.com/apache/arrow-rs/pull/10652#issuecomment-5333535710

   thank you @etseidl 


-- 
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: github-unsubscribe@arrow.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org