-
Notifications
You must be signed in to change notification settings - Fork 29k
[Spark-13772][SQL] fix data type mismatch for decimal #11605
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
Conversation
| test("test for SPARK-13772") { | ||
| val rule = HiveTypeCoercion.IfCoercion | ||
| ruleTest(rule, | ||
| If(Literal(true), Literal(1.0), Cast(Literal(1.0), DecimalType(19, 0))), |
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.
Can you also check it with other database systems like Hive? Do they allow double type and decimal type in if and else branches?
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.
@cloud-fan It is ok in hive 1.2.1 and spark 1.4.1.
test case:
select if(1=1, cast(1 as double), cast(1 as decimal)) from test
|
ok to test |
|
add to whitelist |
|
Test build #53421 has finished for PR 11605 at commit
|
|
Test build #53422 has finished for PR 11605 at commit
|
|
LGTM. Thanks for fixing this! Merging to branch-1.6. |
Fix data type mismatch for decimal, patch for branch-1.6. Author: cenyuhai <[email protected]> Closes #11605 from cenyuhai/SPARK-13772.
|
BTW, next time please use the format like |
|
Hi, @cenyuhai . |
fix data type mismatch for decimal, patch for branch 1.6