-
Notifications
You must be signed in to change notification settings - Fork 4.7k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
HIVE-27480: OFFSET without ORDER BY generates wrong results #4511
HIVE-27480: OFFSET without ORDER BY generates wrong results #4511
Conversation
Kudos, SonarCloud Quality Gate passed! |
@@ -1099,7 +1116,7 @@ limit 1 offset 1 | |||
POSTHOOK: type: QUERY | |||
POSTHOOK: Input: default@src | |||
#### A masked pattern was here #### | |||
86 val_86 86 val_86 | |||
238 val_238 238 val_238 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This is OK because the test query picks up any single row.
select *
from src src1 left outer join src src2
on src1.key = src2.key
limit 1 offset 1
@kasakrisz Could you please take a look when you have a chance? This PR is related to #4471. |
Kudos, SonarCloud Quality Gate passed! 0 Bugs No Coverage information The version of Java (11.0.8) you have used to run this analysis is deprecated and we will stop accepting it soon. Please update to at least Java 17. |
Thanks for your review! |
What changes were proposed in this pull request?
Add an additional shuffle with a single reducer when OFFSET is used without ORDER BY.
Why are the changes needed?
Prevent data integrity issues.
https://issues.apache.org/jira/browse/HIVE-27480
Does this PR introduce any user-facing change?
Execution plans can change but it should be OK since the original one had risks of wrong results.
This PR would also add a new param but the default value wouldn't change the behavior.
Is the change a dependency upgrade?
Not
How was this patch tested?
I added and updated itests