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 ?

有帮助吗?

解决方案

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.

其他提示

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

许可以下: CC-BY-SA归因
不隶属于 StackOverflow
scroll top