Member since
01-20-2016
1
Post
0
Kudos Received
0
Solutions
01-20-2016
01:46 PM
Currently, all of our AMOUNT columns are defined as DOUBLE data types in our HIVE tables. We would like to convert them to DECIMAL(15,3) data type since according to Cloudera online documentation: FLOAT and DOUBLE can cause problems or unexpected behavior due to inability to precisely represent certain fractional values, for example dollar and cents values for currency. You might find output values slightly different than you inserted, equality tests that do not match precisely, or unexpected values for GROUP BY columns. DECIMAL can help reduce unexpected behavior and rounding errors, at the expense of some performance overhead for assignments and comparisons. However, since Avro doesn’t support DECIMAL, when I create an external HIVE table using Avro file format, I can only create DECIMAL column as DOUBLE data type. Is there any way which would allow me to create an external HIVE table with DECIMAL column data type while using Avro files?
... View more
Labels:
- Labels:
-
Apache Hive
-
Apache Impala