Question

I made a hive external table to point a hbase one (mostly filled with floats). The Documentation of cloudera tells that "Impala automatically converts FLOAT to more precise DOUBLE values". But when I look to to Hbase (which are the true values of rows) and Impala, I have something like that for all rows:

Hbase value for a row/column family : 93.8447 (the exact value which was inserted)

Corresponding Impala value: 93.8447036743

It doesn't looks like a more precise value. Is there a way to get rid of the conversion ?

Was it helpful?

Solution

I figured it out. The simplest way to get rid of this problem is to create a table with double at the beginning, so Impala doesn't have to convert it after the creation of the table and thus, there is no alteration of data.

OTHER TIPS

Alternatively, you can use ROUND() function to set the precision

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top