Details
-
Bug
-
Status: Closed
-
Major
-
Resolution: Fixed
-
None
-
None
-
None
Description
There are a few Hive issues relating to constant reduction of NULL and CASE. Calcite should do the same.
select count(1) from store_sales where null=1; # should simplify to select count(1) from store_sales where false;
select count(1) from store_sales where (case ss_sold_date when '1998-01-01' then 1 else null end)=1; # should simplify to select count(1) from store_sales where ss_sold_date= '1998-01-01' ;