Details
-
Improvement
-
Status: Closed
-
Major
-
Resolution: Fixed
-
1.13.0
Description
Currently the precision and scale derivation is not properly for decimal data arithmetics, e.g,
considering the following example:
select cast('10.1' as decimal(38, 19)) * cast('10.2' as decimal(38, 19)) from T
the result is `null`, which may confuses use a lot, because the result is actually not that big.
The root cause is the precision derivation for the above multiplication is:
(38, 19) * (38, 19) -> (38, 38)
So there is no space for integral digits, which leads to null results.
Attachments
Issue Links
- duplicates
-
FLINK-20471 flink1.10SQL Precision overflow return null when using decimal
- Closed
- is related to
-
FLINK-22182 Incorrect round when dividing decimals
- Closed
-
FLINK-20471 flink1.10SQL Precision overflow return null when using decimal
- Closed
- links to