fix: TopK operator should return correct results on dictionary column with nulls#1033
Merged
andygrove merged 1 commit intoapache:mainfrom Oct 24, 2024
Merged
Conversation
297c242 to
574fc34
Compare
Member
Author
|
cc @huaxingao With this patch, the failed Iceberg test can pass now. |
viirya
commented
Oct 23, 2024
| cast_with_options(array, value_type.as_ref(), &options) | ||
| // We need to copy the array after `cast` because arrow-rs `take` kernel which is used | ||
| // to unpack dictionary array might reuse the input array's null buffer. | ||
| Ok(copy_array(&cast_with_options( |
Member
Author
There was a problem hiding this comment.
If apache/arrow-rs#6616 can merge, we don't need this extra copy.
This will do extra copy on data buffer too, although the issue happens on null buffer only.
Actually we can have custom unpack dictionary and take implementation to only copy null buffer, but I put this simply for now with the expectation that the fix at arrow-rs could be merged eventually.
If the arrow-rs patch is blocked on merging eventually, I will open another PR to have custom unpack dictionary and take implementation to reduce the copy cost here.
andygrove
approved these changes
Oct 24, 2024
Member
|
I ran TPC-H benchmarks comparing this PR to main and did not see any regression |
Member
Author
|
Thanks @huaxingao @andygrove |
coderfender
pushed a commit
to coderfender/datafusion-comet
that referenced
this pull request
Dec 13, 2025
… with nulls (apache#1033) (cherry picked from commit 0e9349f)
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 #1030.
Rationale for this change
What changes are included in this PR?
How are these changes tested?