Details
-
Umbrella
-
Status: Open
-
Major
-
Resolution: Unresolved
-
3.2.0
-
None
-
None
Description
Create new Error-handling version SQL functions for existing SQL functions/operators, which returns NULL if overflow/error occurs. So that:
1. Users can manage to finish queries without interruptions in ANSI mode.
2. Users can get NULLs instead of unreasonable results if overflow occurs when ANSI mode is off.
For example, the behavior of the following SQL operations is unreasonable:
2147483647 + 2 => -2147483647 CAST(2147483648L AS INT) => -2147483648
With the new safe version SQL functions:
TRY_ADD(2147483647, 2) => null TRY_CAST(2147483648L AS INT) => null
Attachments
1.
|
New SQL Function: TRY_CAST |
|
Resolved | Gengliang Wang |
2.
|
New SQL functions: TRY_ADD/TRY_DIVIDE |
|
Resolved | Gengliang Wang |
3.
|
Add docs for try_cast/try_add/try_divide |
|
Resolved | Gengliang Wang |
4.
|
Enhance the docs and tests of try_add/try_divide |
|
Resolved | Gengliang Wang |
5.
|
New SQL function: try_element_at |
|
Resolved | Gengliang Wang |
6.
|
New SQL function: try_subtract and try_multiply |
|
Resolved | Gengliang Wang |
7.
|
New SQL function: try_sum |
|
Resolved | Gengliang Wang |
8.
|
New SQL function: try_avg |
|
Resolved | Gengliang Wang |
9.
|
New SQL function: try_to_binary |
|
Resolved | Gengliang Wang |
10.
|
Show hints for try_add/try_substract/try_multiply in error messages of int/long overflow |
|
Resolved | Gengliang Wang |