Details
-
Bug
-
Status: Resolved
-
Critical
-
Resolution: Fixed
-
Impala 3.0
-
ghx-label-7
Description
The following query causes an analysis exception because decimal(38,2) and decimal(38,3) are not compatible, i.e. it is not possible to cast them to the same decimal type without losing information.
select cast(1 as decimal(38,2)) between 0.9 * cast(1 as decimal(38,3)) and 3
However, if we rewrite the between predicate, it succeeds.
select cast(1 as decimal(38,2)) >= 0.9*cast(1 as decimal(38,3)) and cast(1 as decimal(38,2)) <= 3
Both queries should execute successfully.
Attachments
Issue Links
- is broken by
-
IMPALA-6340 There is no error when inserting an invalid value into a decimal column under decimal_v2
- Resolved
-
IMPALA-6518 Fix the output type of a decimal union for decimal_v2
- Resolved