- Subscribe to RSS Feed
- Mark Question as New
- Mark Question as Read
- Float this Question for Current User
- Bookmark
- Subscribe
- Mute
- Printer Friendly Page
Impala where xxx in () list operator not working correctly
- Labels:
-
Apache Impala
Created on ‎12-08-2014 04:51 AM - edited ‎09-16-2022 02:14 AM
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
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.
Created ‎12-10-2014 04:59 AM
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
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.
Created ‎12-10-2014 04:59 AM
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
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.
