Support Questions
Find answers, ask questions, and share your expertise
Announcements
Alert: Welcome to the Unified Cloudera Community. Former HCC members be sure to read and learn how to activate your account here.

Impala where xxx in () list operator not working correctly

Solved Go to solution

Impala where xxx in () list operator not working correctly

Rising Star

Hi,

running a simple query where in the WHERE condition is a column IN ( ) condition and the list contains 13 elements (numbers).

The column is type of int.

Every time I run a query I got a different result, sometimes 5 rows, sometimes 2 rows, sometimes 10 rows. 

 

Of course I checked ID by ID that all elements are in the table...

 

is this a known bug or I am missing something?

 

select * from tmp_ext_item where item_id in ( 3040607, 5645020, 69772482, 2030547, 1753459, 9972822, 1846553, 6098104, 1874789, 1834370, 1829598, 1779239, 7932306 )

 

T.

 

 

 

1 ACCEPTED SOLUTION

Accepted Solutions
Highlighted

Re: Impala where xxx in () list operator not working correctly

Rising Star

During my test I came to one (maybe not correct) conclusion.

The table is big and partitioned, and maybe Impala just limits the query to a subset of a table. 

Because if I change the query like 

create table result as

select * from tmp_ext_item where item_id in ( 3040607, 5645020, 69772482, 2030547, 1753459, 9972822, 1846553, 6098104, 1874789, 1834370, 1829598, 1779239, 7932306 )

 

then it runs correctly and returns all items with the specified item_id.

 

 

1 REPLY 1
Highlighted

Re: Impala where xxx in () list operator not working correctly

Rising Star

During my test I came to one (maybe not correct) conclusion.

The table is big and partitioned, and maybe Impala just limits the query to a subset of a table. 

Because if I change the query like 

create table result as

select * from tmp_ext_item where item_id in ( 3040607, 5645020, 69772482, 2030547, 1753459, 9972822, 1846553, 6098104, 1874789, 1834370, 1829598, 1779239, 7932306 )

 

then it runs correctly and returns all items with the specified item_id.

 

 

Don't have an account?
Coming from Hortonworks? Activate your account here