-
Notifications
You must be signed in to change notification settings - Fork 1.2k
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
Fix Decimal and Floating type coerce rule #4038
Conversation
(Decimal128(_, _), Float32 | Float64) => { | ||
Some(Float64) | ||
} | ||
(Float32 | Float64, Decimal128(_, _)) => { | ||
Some(Float64) | ||
} |
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.
Follow Spark's decimal type coercision rule.
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.
I think we need to add the same in comparison_binary_numeric_coercion
and that helps towards q6
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.
I think we need to add the same in
comparison_binary_numeric_coercion
and that helps towards q6
the rule between arithmetic op and logical op may be different.
9cb6e90
to
582cc14
Compare
582cc14
to
af10480
Compare
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. Thanks @viirya!
Thanks @viirya |
Benchmark runs are scheduled for baseline = a1c1cd2 and contender = 5cf090a. 5cf090a is a master commit associated with this PR. Results will be available as each benchmark for each run completes. |
Thanks @andygrove @Dandandan |
Which issue does this PR close?
Closes #4035.
Rationale for this change
Currently coerce rule coerces floating types to decimal type. It doesn't look correct.
What changes are included in this PR?
Are there any user-facing changes?