forked from apache/spark
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
[SPARK-29326][SQL] ANSI store assignment policy: throw exception on c…
…asting failure ### What changes were proposed in this pull request? 1. With ANSI store assignment policy, an exception is thrown on casting failure 2. Introduce a new expression `AnsiCast` for the ANSI store assignment policy, so that the store assignment policy configuration won't affect the general `Cast`. ### Why are the changes needed? As per ANSI SQL standard, ANSI store assignment policy should throw an exception on insertion failure, such as inserting out-of-range value to a numeric field. ### Does this PR introduce any user-facing change? With ANSI store assignment policy, an exception is thrown on casting failure ### How was this patch tested? Unit test Closes apache#25997 from gengliangwang/newCast. Authored-by: Gengliang Wang <[email protected]> Signed-off-by: Wenchen Fan <[email protected]>
- Loading branch information
1 parent
8b71e54
commit 91747bd
Showing
5 changed files
with
414 additions
and
270 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
Oops, something went wrong.