HIVE-27484: Limit pushdown with offset generate wrong results - #4471
Merged
Conversation
okumin
force-pushed
the
HIVE-27484-limit-pushdown
branch
from
July 6, 2023 15:50
7d8cf36 to
544ada1
Compare
okumin
force-pushed
the
HIVE-27484-limit-pushdown
branch
from
July 7, 2023 09:21
609a975 to
22c1c4c
Compare
okumin
commented
Jul 7, 2023
| POSTHOOK: type: QUERY | ||
| POSTHOOK: Input: default@src | ||
| #### A masked pattern was here #### | ||
| 86 val_86 86 val_86 |
Contributor
Author
There was a problem hiding this comment.
The result was originally empty because it pushes LIMIT 1 OFFSET 1 twice.
aturoczy
approved these changes
Jul 7, 2023
aturoczy
left a comment
Contributor
There was a problem hiding this comment.
LGTM and this is an important fix for Hive 4.0! Nice job!
Contributor
|
@zabetak @kasakrisz Could you please check this change? |
okumin
commented
Jul 12, 2023
Contributor
Author
|
@zabetak @kasakrisz Could you please take a look when you have a chance? Thanks in advance! |
kasakrisz
requested changes
Jul 20, 2023
kasakrisz
left a comment
Contributor
There was a problem hiding this comment.
LGTM, left minor comments
|
Kudos, SonarCloud Quality Gate passed! |
Contributor
Author
|
Thanks for your reviews 👍 |
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.









What changes were proposed in this pull request?
Fix an incorrect push-down of LIMIT + OFFSET.
https://issues.apache.org/jira/browse/HIVE-27484
I know SemanticAnalyzer also doesn't handle LIMIT + OFFSET correctly when LIMIT + OFFSET is pushed down to parallel tasks. I will be working on it in HIVE-27480 after HIVE-27484.
Why are the changes needed?
To prevent wrong results.
Does this PR introduce any user-facing change?
Bug fix.
Is the change a dependency upgrade?
No
How was this patch tested?
Unit tests