My query is like
create table abc as select * from (select x, (CASE WHEN ( y != '' and y is not null) THEN y ELSE z END ) AS testColumn from table1) q where q.testColumn is not null;
Whenever I am running this. It is giving me
SemanticException Line 0:-1 Invalid function 'IS NOT TRUE'
If I remove create table from the beginning it works, if I change column name from testColumn to x it works, if I change create table to insert into it works.
What is wrong with create table?
Thanks in advance.
There had been patching on our cluster, due to which it was not working. To make it work I need to set a property
set hive.cbo.enable=false;
After doing this my query worked.