Zoltan Haindrich created CALCITE-2848:
-----------------------------------------

             Summary: Simplifying a case statement's first branch should 
disregard its safety
                 Key: CALCITE-2848
                 URL: https://issues.apache.org/jira/browse/CALCITE-2848
             Project: Calcite
          Issue Type: Improvement
            Reporter: Zoltan Haindrich
            Assignee: Zoltan Haindrich


Example: a very simple CASE which is not get rewritten because the first 
condition branch contains an unknown UDF
{code:sql}
CASE
 WHEN to_date('2001-11-11') = '2000' THEN true
 ELSE false
END
{code}

This expression right now retained as is; because the "to_date" was an unknown 
UDF; but since the first branch of a CASE is always evaluated and that could 
unlock the rewrite of this case to it's boolean form.




--
This message was sent by Atlassian JIRA
(v7.6.3#76005)

Reply via email to