IMPALA-1949: Analysis exception when a binary operator contain an IN

operator with values

This commit fixes an issue where a query is not successfully analyzed if an
IN operator with values appears in a binary predicate.

Change-Id: Ia3b83803a553b9a3b3489382fc53978a720c4b4f
Reviewed-on: http://gerrit.cloudera.org:8080/334
Reviewed-by: Dimitris Tsirogiannis <dtsirogiannis@cloudera.com>
Tested-by: Internal Jenkins
This commit is contained in:
Dimitris Tsirogiannis
2015-04-13 11:06:29 -07:00
committed by Internal Jenkins
parent 29a7368940
commit d8e5bbe2da
4 changed files with 41 additions and 3 deletions

View File

@@ -917,6 +917,21 @@ WHERE month IN (cast(tinyint_col as decimal(34,0)), int_col + 1, 12345, float_co
int,tinyint,int,float
====
---- QUERY
# Regression test for IMPALA-1949
select bool_col = (tinyint_col in (1,2)) from alltypestiny
---- RESULTS
false
false
false
false
false
false
false
false
---- TYPES
boolean
====
---- QUERY
# CASE expr - Basic functionality
select date_string_col, count(*) from alltypesagg where case date_string_col when "01/06/10" then (true)
else (false) end group by 1