Details
-
Bug
-
Status: Resolved
-
Minor
-
Resolution: Fixed
-
Impala 2.0, Impala 2.1, Impala 2.2
Description
The following two queries should produce identical results, but this is not the case. Both queries use the functional database.
This query seems to produce correct results.
SELECT * FROM alltypestiny WHERE (smallint_col = double_col) IN (SELECT bool_col FROM alltypesagg)
In this query, we replace (smallint_col = double_col) with TRUE, and Impala throws AnalysisException.
SELECT * FROM alltypestiny WHERE TRUE IN (SELECT bool_col FROM alltypesagg)
Workaround
Wrap the TRUE constant in an inline view. To fix the example above:
SELECT * FROM alltypestiny, (SELECT TRUE tmp) v WHERE tmp IN (SELECT bool_col FROM alltypesagg)