문제

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