Reply
Explorer
Posts: 10
Registered: ‎04-17-2018

Select in impala has different value with hive

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

Posts: 511
Topics: 14
Kudos: 85
Solutions: 45
Registered: ‎09-02-2016

Re: Select in impala has different value with hive

@hendry

 

Pls apply invalidate metadata and try again

 

INVALIDATE METADATA [[db_name.]table_name]

 

Explorer
Posts: 10
Registered: ‎04-17-2018

Re: Select in impala has different value with hive

@saranvisa

thanks for your answer.

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

 

 

Posts: 511
Topics: 14
Kudos: 85
Solutions: 45
Registered: ‎09-02-2016

Re: Select in impala has different value with hive

 

@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

 

 

 

Cloudera Employee
Posts: 307
Registered: ‎10-16-2013

Re: Select in impala has different value with hive

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?

Explorer
Posts: 10
Registered: ‎04-17-2018

Re: Select in impala has different value with hive

[ Edited ]

@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

 

 

Explorer
Posts: 10
Registered: ‎04-17-2018

Re: Select in impala has different value with hive


@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

Announcements