Repository navigation
Fix Fields::filter_leaves for ListView and LargeListView - #11657
Merged
Jefffrey merged 1 commit intoOct 18, 2026
Merged
Conversation
Jefffrey
approved these changes
Oct 18, 2026
Jefffrey
enabled auto-merge
October 18, 2026 01:41
Contributor
|
thanks |
Jefffrey
disabled auto-merge
October 18, 2026 01:51
Jefffrey
requested changes
Oct 18, 2026
Jefffrey
left a comment
Contributor
There was a problem hiding this comment.
please ensure tests are run locally before submitting a PR
patrickswedish
force-pushed
the
fix/filter-leaves-list-view-11612
branch
from
October 18, 2026 02:00
b04c849 to
4d9598e
Compare
Contributor
Author
|
Apologies for the oversight on the test constructor. Corrected the field initialization to |
Jefffrey
approved these changes
Oct 18, 2026
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.
Which issue does this PR close?
Closes #11612.
Rationale for this change
Fields::filter_leavesandFields::try_filter_leavesperform a depth-first traversal over nestedDataTypevariants so that the filter predicate is invoked only on leaf fields (fields with no children). Currently,try_filter_leaveshandlesDataType::List,DataType::LargeList, andDataType::FixedSizeList, but omitsDataType::ListViewandDataType::LargeListView, causingListViewandLargeListViewfields to be treated as leaf fields instead of descending into their elementFieldRef.What changes are included in this PR?
DataType::ListView(child)andDataType::LargeListView(child)match arms inFields::try_filter_leaves(arrow-schema/src/fields.rs) to recursively filter their child element field, matching the behavior ofListandLargeList.test_filter_list_viewcovering leaf filtering and leaf index counting across nested and primitiveListViewandLargeListViewfields.Are there any user-facing changes?
Yes,
Fields::filter_leavesandFields::try_filter_leavesnow properly descend intoDataType::ListViewandDataType::LargeListViewchild fields.Diff minimization and pre-flight validation performed with ZeroSlop™ CI — Ribbsaeter Systems.