[
https://issues.apache.org/jira/browse/CALCITE-2848?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
]
Zoltan Haindrich resolved CALCITE-2848.
---------------------------------------
Resolution: Fixed
Fix Version/s: 1.19.0
fixed in
[9924699e534516f47363aa30d23fb9e64e34ed29|https://github.com/apache/calcite/commit/9924699e534516f47363aa30d23fb9e64e34ed29]
> 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
> Fix For: 1.19.0
>
> Time Spent: 0.5h
> Remaining Estimate: 0h
>
> 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)