-
Notifications
You must be signed in to change notification settings - Fork 139
feat: add mask support to StatisticsCollector #1665
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Draft
DrakeLin
wants to merge
6
commits into
delta-io:main
Choose a base branch
from
DrakeLin:stack/stats-collector-mask
base: main
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Draft
+1,380
−77
Conversation
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This was referenced Jan 23, 2026
This was referenced Jan 23, 2026
c67b904 to
0a9da9c
Compare
0a9da9c to
397df67
Compare
8b44391 to
37a216b
Compare
Codecov Report❌ Patch coverage is Additional details and impacted files@@ Coverage Diff @@
## main #1665 +/- ##
==========================================
- Coverage 84.65% 84.28% -0.37%
==========================================
Files 123 125 +2
Lines 34109 35333 +1224
Branches 34109 35333 +1224
==========================================
+ Hits 28875 29781 +906
- Misses 3905 4186 +281
- Partials 1329 1366 +37 ☔ View full report in Codecov by Sentry. 🚀 New features to boost your workflow:
|
ed3c8f9 to
226bff5
Compare
- Add stats_columns parameter to write_parquet_file trait - Add stats_schema(), stats_columns(), get_clustering_columns() to Transaction - Add stats_columns to WriteContext - Update get_write_context() to take engine parameter - Add clustering column support to expected_stats_schema()
- Add StatisticsCollector struct with new(), update(), finalize()
- Track numRecords across multiple RecordBatches
- Output StructArray with {numRecords, tightBounds}
- Basic unit tests for single/multiple batches
This is the foundation for full stats collection, adding column-level
stats (nullCount, minValues, maxValues) in subsequent PRs.
- Add null count tracking for all columns - Support nested struct null counts - Merge null counts across multiple batches - Only collect for columns in stats_columns - Tests for null counting across batches
- Add min/max tracking for all supported types - Primitive types (int8-64, uint8-64, float32/64) - Date, timestamp with all time units - Decimal128 - String types with truncation to 32 chars - Merge min/max across multiple batches - Tests for min/max across single and multiple batches
- Add NullBuffer mask parameter to update() - Only count masked-in rows for numRecords - Only count nulls in masked-in rows for nullCount - Filter column by mask before computing min/max - Tests for mask behavior with min/max and null counting This enables deletion vector support where masked-out rows should not contribute to file statistics.
226bff5 to
fc10d58
Compare
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
🥞 Stacked PR
Use this link to review incremental changes.
This enables deletion vector support where masked-out rows
should not contribute to file statistics.
What changes are proposed in this pull request?
How was this change tested?