Repository navigation
Expose ColumnCloseResult on ArrowColumnChunk - #9773
Merged
Merged
Conversation
Adds `close()` and `close_mut()` accessors on `ArrowColumnChunk` so callers can inspect and mutate the `ColumnCloseResult` produced by `ArrowColumnWriter::close()` before appending the chunk to a row group. Motivation: enables dynamic, per-column-chunk policies for page-level index emission. For example, a pipelined writer can evaluate a rule over the collected page statistics and encodings after close, and drop `column_index` (or `bloom_filter`) for chunks where the index would be useless — e.g. high-cardinality byte columns that fell back to PLAIN encoding — without regenerating the data. Today the close result is locked away behind private fields, so this is only possible by bypassing `ArrowColumnWriter` and reimplementing the chunk path against the lower-level `ColumnWriter`. Both accessors are purely additive — they do not change `append_to_row_group` or any other existing behavior.
alamb
approved these changes
Apr 21, 2026
Contributor
|
Thanks again @leoyvens |
Rich-T-kid
pushed a commit
to Rich-T-kid/arrow-rs
that referenced
this pull request
Jun 2, 2026
Adds `close()` and `close_mut()` accessors on `ArrowColumnChunk` so callers can inspect and mutate the `ColumnCloseResult` produced by `ArrowColumnWriter::close()` before appending the chunk to a row group. My motivation is dynamic deciding whether to omit the page index. Should not be controversial given `ColumnCloseResult` is already public. # Which issue does this PR close? - Closes apache#9774. # What changes are included in this PR? Adds accessor to `ArrowColumnChunk` # Are these changes tested? An unit test is included, also illustrating a potential use case. # Are there any user-facing changes? Yes the accessors are public.
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
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.
Adds
close()andclose_mut()accessors onArrowColumnChunkso callers can inspect and mutate theColumnCloseResultproduced byArrowColumnWriter::close()before appending the chunk to a row group.My motivation is dynamic deciding whether to omit the page index.
Should not be controversial given
ColumnCloseResultis already public.Which issue does this PR close?
What changes are included in this PR?
Adds accessor to
ArrowColumnChunkAre these changes tested?
An unit test is included, also illustrating a potential use case.
Are there any user-facing changes?
Yes the accessors are public.