Skip to content
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

[multistage] Handle Integer.MIN_VALUE in FieldSelectionKeySelector #10596

Merged
merged 1 commit into from
Apr 13, 2023

Conversation

ankitsultana
Copy link
Contributor

Saw this in our production where one of the inputs hashes to Integer.MIN_VALUE.

Math.abs returns negation of the input number if the input number is negative. So for Integer.MIN_VALUE, it returns the same value. This is also documented in the docs for Math.abs.

In other places like MurmurPartitionFunction, HashCodePartitionFunction, etc. we seem to be already doing this so looks like it's a known thing.

@ankitsultana ankitsultana changed the title [multistage] Handle Integer.MIN_VALUE in hashCode based FieldSelectionKeySelector [multistage] Handle Integer.MIN_VALUE in FieldSelectionKeySelector Apr 12, 2023
@codecov-commenter
Copy link

Codecov Report

Merging #10596 (e585755) into master (7c1d10a) will decrease coverage by 41.29%.
The diff coverage is 0.00%.

@@              Coverage Diff              @@
##             master   #10596       +/-   ##
=============================================
- Coverage     69.04%   27.75%   -41.29%     
+ Complexity     6496       58     -6438     
=============================================
  Files          2106     2090       -16     
  Lines        113004   112572      -432     
  Branches      17026    16971       -55     
=============================================
- Hits          78021    31243    -46778     
- Misses        29495    78213    +48718     
+ Partials       5488     3116     -2372     
Flag Coverage Δ
integration1 24.46% <0.00%> (?)
integration2 24.04% <0.00%> (-0.11%) ⬇️
unittests1 ?
unittests2 ?

Flags with carried forward coverage won't be shown. Click here to find out more.

Impacted Files Coverage Δ
...lanner/partitioning/FieldSelectionKeySelector.java 0.00% <0.00%> (-60.00%) ⬇️

... and 1550 files with indirect coverage changes

📣 We’re building smart automated test selection to slash your CI/CD build times. Learn more

Copy link
Contributor

@yupeng9 yupeng9 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LG. can you check test failure?

@Jackie-Jiang Jackie-Jiang merged commit 0cb456a into apache:master Apr 13, 2023
@ankitsultana
Copy link
Contributor Author

LG. can you check test failure?

Thanks. Filed a separate issue for it: #10597

It might be a flaky test. The code change in this is unrelated since FieldSelectionKeySelector is only used for multistage queries during query execution, and the error in the UT was from some pulsar consumer test.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants