[branch-53] fix: InList Dictionary filter pushdown type mismatch (#20962)#20996
Open
alamb wants to merge 1 commit intoapache:branch-53from
Open
[branch-53] fix: InList Dictionary filter pushdown type mismatch (#20962)#20996alamb wants to merge 1 commit intoapache:branch-53from
alamb wants to merge 1 commit intoapache:branch-53from
Conversation
Closes apache#20937 `ArrayStaticFilter::contains()` unconditionally unwraps dictionary-encoded needles to evaluate against distinct values. This only works when `in_array` has the same type as the dictionary's value type. When `in_array` is also Dictionary, the unwrap creates a type mismatch in `make_comparator`. This became reachable after: - apache#20505 which removed dictionary flattening in the InList builder, allowing Dictionary arrays to reach `ArrayStaticFilter` via HashJoin dynamic filter pushdown with `pushdown_filters` enabled. - Guard the dictionary unwrap in `ArrayStaticFilter::contains()` to only fire when the dictionary value type matches `in_array`'s type. When both sides are Dictionary, fall through to `make_comparator(Dict, Dict)` which arrow-ord handles natively. - Update the sqllogictest from apache#20960 to expect success. - Add unit tests covering all `try_new_from_array` type combinations (primitive specializations, Utf8, Dictionary, Struct). Yes — unit tests and sqllogictest.
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.
53.0.0(Feb 2026 / Mar 2026) #19692This PR: