[
https://issues.apache.org/jira/browse/CALCITE-2848?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
]
ASF GitHub Bot updated CALCITE-2848:
------------------------------------
Labels: pull-request-available (was: )
> Simplifying a case statement's first branch should ignore 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
> Priority: Major
> Labels: pull-request-available
>
> 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)