Support Questions

Find answers, ask questions, and share your expertise
Announcements
Celebrating as our community reaches 100,000 members! Thank you!

Select in impala has different value with hive

avatar
Explorer

Hi All,

 

I have one table. When I compare the query result  from impala & hive, i found different value for some column.

The detail is like below

 

HIVE VS IMAPALA.PNG

that is same record, but for some column the value is not same.

please help me if you has any advice

 

Note: sorry for my english

 

Thanks

6 REPLIES 6

avatar
Champion

@hendry

 

Pls apply invalidate metadata and try again

 

INVALIDATE METADATA [[db_name.]table_name]

 

avatar
Explorer

@saranvisa

thanks for your answer.

I have run that script & refresh [[dbname.]tablename], unfortunately,  the result still same.

 

 

avatar
Champion

 

@hendry

 

There could be two possibilities for this scenario

 

1. May be the hive and impala tables are referring to the two different files. But chances are less for this scenario unless any minor mistakes in the tables (or) some other internal error

 

You can confirm this by 

> describe formatted db.tablename 

Run this command from both hive and impala and get the location and compare

 

2. Your file has duplicate records. I mean some key values are same but other columns may have different value. So it may return different value when you filter. So check your data in detail

 

 

 

avatar

To debug wrong results, it's very helpful for us to get an Impala query profile of the query that returns wrong results. Would you be able to provide that to help us debug?

avatar
Explorer

@alex.behmwrote:

To debug wrong results, it's very helpful for us to get an Impala query profile of the query that returns wrong results. Would you be able to provide that to help us debug?


Please see on this url for impala query profile.

 

Thanks

avatar
Explorer

@saranvisa

 

1) I have compare it & it is in the same location

2) actualy, value from column x in hive, show in column y in impala, please see below image for detail

 

compare.PNG

 

base on above image, we can see. value of n i p column in hive, show in am_name_senior in impala.

 

Thanks