Details
-
Bug
-
Status: Resolved
-
Minor
-
Resolution: Not A Bug
-
Impala 2.0
-
None
-
Server version: impalad version 2.0.0-cdh5 RELEASE (build ecf30af0b4d6e56ea80297df2189367ada6b7da7)
Description
cast ('-1.0' as int|bigint) should not return NULL but -1.
Issue:
Query: select cast("-1.0" as int) +---------------------+ | cast('-1.0' as int) | +---------------------+ | NULL | +---------------------+
Workaround:
Query: select cast(cast ("-1.0" as double) as int) +-------------------------------------+ | cast(cast('-1.0' as double) as int) | +-------------------------------------+ | -1 | +-------------------------------------+ Fetched 1 row(s) in 0.01s