-
Notifications
You must be signed in to change notification settings - Fork 5.4k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Throw exception for cast of nan and infinity to int types
Fix cast of nan and infinity from DOUBLE/REAL to BIGINT/INT/SMALLINT/TINYTINT. Previously all except double -> bigint would return zero. Now they will all throw an INVALID_CAST_ARGUMENT exception. Fix silent overflow for casting from REAL to BIGINT type. We now throw an INVALID_CAST_ARGUMENT if the value is out of the BIGINT range. Change error code from NUMERIC_VALUE_OUT_OF_RANGE to INVALID_CAST_ARGUMENT for out of range values in casts from floating point to integer types. With the library we now use for the implementaiton for these casts, we can't always tell by the exception type that the value is out of range, so we return the more generic, but still relevant INVALID_CAST_ARGUMENT instead.
- Loading branch information
1 parent
7dfd981
commit b5b0dd8
Showing
6 changed files
with
111 additions
and
25 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
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