[SPARK-25457][SQL] IntegralDivide returns data type of the operands#22465
[SPARK-25457][SQL] IntegralDivide returns data type of the operands#22465mgaido91 wants to merge 2 commits intoapache:masterfrom
Conversation
| select null div 5; | ||
|
|
||
| set spark.sql.legacy.integralDivide.returnBigint=false; | ||
|
|
There was a problem hiding this comment.
Can we move these tests into the end of this file?
There was a problem hiding this comment.
I wanted to keep them close to the other div tests, but I am fine moving them. Let me know.
There was a problem hiding this comment.
Too many unrelated changes in the output file, so IMO it'd be better to do so. But, its ok to wait for other reviews.
There was a problem hiding this comment.
ok thanks, I see your point. cc @cloud-fan @dongjoon-hyun @viirya for their opinion on this. Thanks.
There was a problem hiding this comment.
Seems it's getting more complicated, can we create a new file for testing div?
|
Test build #96243 has finished for PR 22465 at commit
|
|
Test build #96263 has finished for PR 22465 at commit
|
|
retest this please |
| .booleanConf | ||
| .createWithDefault(false) | ||
|
|
||
| val LEGACY_INTEGRALDIVIDE_RETURN_LONG = buildConf("spark.sql.legacy.integralDivide.returnBigint") |
There was a problem hiding this comment.
returnBigint or returnLong? I think we use "long" instead of "big int" as type name?
There was a problem hiding this comment.
big int is more commonly used in the SQL world
|
Test build #96287 has finished for PR 22465 at commit
|
|
thanks, merging to master! |
|
thank you |
What changes were proposed in this pull request?
The PR proposes to return the data type of the operands as a result for the
divoperator. Before the PR,bigintis always returned. It introduces also aspark.sql.legacy.integralDivide.returnBigintconfig in order to let the users restore the legacy behavior.How was this patch tested?
added UTs