Description
Create a table withe a column of decimal type(38,18) and insert '4327269606205.029297'. Then select with that value displays its rounded value, which is 4327269606205.029300000000000000
0: jdbc:hive2://os-r7-mvjkcu-hiveserver2-11-4> drop table if exists test; No rows affected (0.229 seconds) 0: jdbc:hive2://os-r7-mvjkcu-hiveserver2-11-4> 0: jdbc:hive2://os-r7-mvjkcu-hiveserver2-11-4> create table test (dc decimal(38,18)); No rows affected (0.125 seconds) 0: jdbc:hive2://os-r7-mvjkcu-hiveserver2-11-4> 0: jdbc:hive2://os-r7-mvjkcu-hiveserver2-11-4> insert into table test values (4327269606205.029297); No rows affected (2.372 seconds) 0: jdbc:hive2://os-r7-mvjkcu-hiveserver2-11-4> 0: jdbc:hive2://os-r7-mvjkcu-hiveserver2-11-4> select * from test; +-----------------------------------+--+ | test.dc | +-----------------------------------+--+ | 4327269606205.029297000000000000 | +-----------------------------------+--+ 1 row selected (0.123 seconds) 0: jdbc:hive2://os-r7-mvjkcu-hiveserver2-11-4> 0: jdbc:hive2://os-r7-mvjkcu-hiveserver2-11-4> select * from test where dc = 4327269606205.029297000000000000; +-----------------------------------+--+ | test.dc | +-----------------------------------+--+ | 4327269606205.029300000000000000 | +-----------------------------------+--+ 1 row selected (0.109 seconds)
Attachments
Attachments
Issue Links
- fixes
-
HIVE-25968 cast(double as bigint) may cause an error return
- Resolved
- is duplicated by
-
HIVE-13946 Decimal value need to be single-quoted when selecting where clause with that decimal value in order to get row
- Resolved
- is related to
-
HIVE-14134 Support automatic type conversion (or fail) when using struct_in with different types
- Open
-
HIVE-15334 HIVE-13945 changed scale rules for division
- Resolved
- relates to
-
HIVE-14077 add implicit decimal arithmetic q test, fix issues if found
- Closed
- links to