Hi,
if have a query that is working fine with Hive, and I'm trying to get it
working with impala (in the demo VM).
In the query I have a If-Statement in the Select clause and due to that
also in the Group By.
The query looks like:
SELECT table1.column1,
IF(table2.column1 = 'x', table2.column2, table1.column2) AS
somename
FROM
...........
WHERE
...........
GROUP BY IF(table2.column1 = 'x', table2.column2, table1.column2), s.time
HAVING .......,
ORDER BY ....... ASC;
This results in an Error that says: "No matching function with those
arguments: ifBOOLEAN, STRING,INT)"
(It prints that kind of typical AnalysisException stacktrace, but i guess
this is useless here)
The Query works fine (but is senseless for me) in Impala if i remove the if
parts.
So, I guess this is simply not supported in Impala? Is there another Way to
achieve something similar?