-
Notifications
You must be signed in to change notification settings - Fork 28.5k
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
[SPARK-36926][SQL] Decimal average mistakenly overflow #34180
Conversation
@@ -97,7 +97,7 @@ case class Average( | |||
case d: DecimalType => |
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.
We can hide this d
then.
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.
Good catch!
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.
LGTM
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.
LGTM
Kubernetes integration test starting |
Kubernetes integration test status failure |
Merging to master |
@cloud-fan This PR can't be merged to branch-3.2 directly. Could you open a backport PR? |
Test build #143831 has finished for PR 34180 at commit
|
Thanks for fixing this quickly @cloud-fan ! |
This bug was introduced by apache#33177 When checking overflow of the sum value in the average function, we should use the `sumDataType` instead of the input decimal type. fix a regression Yes, the result was wrong before this PR. a new test Closes apache#34180 from cloud-fan/bug. Lead-authored-by: Wenchen Fan <wenchen@databricks.com> Co-authored-by: Wenchen Fan <cloud0fan@gmail.com> Signed-off-by: Gengliang Wang <gengliang@apache.org>
backport #34180 ### What changes were proposed in this pull request? This bug was introduced by #33177 When checking overflow of the sum value in the average function, we should use the `sumDataType` instead of the input decimal type. ### Why are the changes needed? fix a regression ### Does this PR introduce _any_ user-facing change? Yes, the result was wrong before this PR. ### How was this patch tested? a new test Closes #34193 from cloud-fan/bug. Authored-by: Wenchen Fan <wenchen@databricks.com> Signed-off-by: Gengliang Wang <gengliang@apache.org>
backport apache#34180 ### What changes were proposed in this pull request? This bug was introduced by apache#33177 When checking overflow of the sum value in the average function, we should use the `sumDataType` instead of the input decimal type. ### Why are the changes needed? fix a regression ### Does this PR introduce _any_ user-facing change? Yes, the result was wrong before this PR. ### How was this patch tested? a new test Closes apache#34193 from cloud-fan/bug. Authored-by: Wenchen Fan <wenchen@databricks.com> Signed-off-by: Gengliang Wang <gengliang@apache.org>
What changes were proposed in this pull request?
This bug was introduced by #33177
When checking overflow of the sum value in the average function, we should use the
sumDataType
instead of the input decimal type.Why are the changes needed?
fix a regression
Does this PR introduce any user-facing change?
Yes, the result was wrong before this PR.
How was this patch tested?
a new test