MSQ window functions: Fix partition boundary issues for arrays#16780
Merged
cryptoe merged 5 commits intoapache:masterfrom Jul 24, 2024
Merged
MSQ window functions: Fix partition boundary issues for arrays#16780cryptoe merged 5 commits intoapache:masterfrom
cryptoe merged 5 commits intoapache:masterfrom
Conversation
sreemanamala
approved these changes
Jul 23, 2024
Contributor
sreemanamala
left a comment
There was a problem hiding this comment.
lgtm. added a couple of nit comments. should be fine either way.
LakshSingla
requested changes
Jul 23, 2024
LakshSingla
approved these changes
Jul 23, 2024
Contributor
|
MSQ changes LGTM |
LakshSingla
reviewed
Jul 23, 2024
cryptoe
reviewed
Jul 24, 2024
cryptoe
approved these changes
Jul 24, 2024
sreemanamala
pushed a commit
to sreemanamala/druid
that referenced
this pull request
Aug 6, 2024
…e#16780) * MSQ window functions: Fix partition boundary issues for arrays * Address review comments * Cache type strategies * Trigger Build * Convert typeStrategies from list to array
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.
Description
Currently, queries like the following give incorrect results:
This is because while calculating the partitioning boundaries, we use Objects.equals() to check the value for partition column. But it returns false when trying to compare [1,2,null] against [1,2,null] because of the presence of null value.
This PR changes the comparison logic to use NullableTypeStrategy for the column type.
This PR has: