Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
[SPARK-36632][SQL] DivideYMInterval and DivideDTInterval should throw…
… the same exception when divide by zero ### What changes were proposed in this pull request? When dividing by zero, `DivideYMInterval` and `DivideDTInterval` output ``` java.lang.ArithmeticException / by zero ``` But, in ansi mode, `select 2 / 0` will output ``` org.apache.spark.SparkArithmeticException divide by zero ``` The behavior looks not inconsistent. ### Why are the changes needed? Make consistent behavior. ### Does this PR introduce _any_ user-facing change? 'Yes'. ### How was this patch tested? New tests. Closes #33889 from beliefer/SPARK-36632. Lead-authored-by: gengjiaan <gengjiaan@360.cn> Co-authored-by: beliefer <beliefer@163.com> Signed-off-by: Wenchen Fan <wenchen@databricks.com> (cherry picked from commit de0161a) Signed-off-by: Wenchen Fan <wenchen@databricks.com>
- Loading branch information
Showing
5 changed files
with
75 additions
and
24 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters