-
Notifications
You must be signed in to change notification settings - Fork 28.4k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
[SPARK-42045][SQL] ANSI SQL mode: Round/Bround should return an error…
… on tiny/small/big integer overflow ### What changes were proposed in this pull request? Similar to #39546, this PR is to change Round/Bround to return an error on tiny/small/big integer overflow. ### Why are the changes needed? In ANSI SQL mode, integer overflow should cause error instead of returning an unreasonable result. For example, round(127y, -1) should return error instead of returning -126 ### Does this PR introduce _any_ user-facing change? Yes, in ANSI SQL mode, SQL function Round and Bround will return an error on tiny/small/big integer overflow ### How was this patch tested? UTs Closes #39557 from gengliangwang/fixRoundOtherInt. Authored-by: Gengliang Wang <[email protected]> Signed-off-by: Gengliang Wang <[email protected]>
- Loading branch information
1 parent
7f9c226
commit ba79d1a
Showing
5 changed files
with
970 additions
and
49 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
Oops, something went wrong.