Support Questions

Find answers, ask questions, and share your expertise

Table is different in Hive and Impala

New Contributor

Hello,

 

I created Hive table with Spark Scala.

 

This table contains field "amount" decimal(24,3).

 

In Bive this field is always null. In Impala is correct not null values.

 

In yarn log I see correct dataset with not null values.

 

Other fields is ok in Hive 

 

What is the reason?

3 REPLIES 3

Guru
Hi,

Please suggest the version of CDH that you used to create and read the data so that I can do a quick test as well.

Please also share the spark code that creates the decimal data.

Cheers
Eric

New Contributor
Create external table if not exists sc.atr
(
Vtime timestamp timestamp,
Code string,
Ssum decimal(24,3)
)
Partitioned by (vdate string)
stored as parquet
location 'custdata/ap/atr'
tblproperties('serialization.null.format'='')

Cloudera version 5.8.3.

Spark code must be cut from the application. It will take some time.

New Contributor
I didn't see it. Vtime field also different Vtime (in Hive)= Vtime (in Impala)+3hours.