[
https://issues.apache.org/jira/browse/CALCITE-2841?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=16766041#comment-16766041
]
Zoltan Haindrich commented on CALCITE-2841:
---
sorry, I was noted that this would be usefull some time ago; just opened the
jira to not forgot it totally. I've added some testcases to the description.
> Simplification: push negation into Case expression
> --
>
> Key: CALCITE-2841
> URL: https://issues.apache.org/jira/browse/CALCITE-2841
> Project: Calcite
> Issue Type: Improvement
>Reporter: Zoltan Haindrich
>Assignee: Julian Hyde
>Priority: Major
>
> {code:java}
> @Test public void testNotIntoCase() {
> checkSimplify(
> not(
> case_(
> isTrue(vBool()), vBool(1),
> vBool(2))),
> "CASE(IS TRUE(?0.bool0), NOT(?0.bool1), NOT(?0.bool2))");
> }
> {code}
> actually NOT right now stops the simplification recursion so it would be best
> to also enable that as well; in case NOT is not is not pushed/handled -
> unknownAs need to be negated.
> {code}
> @Test public void testNotRecursion() {
> checkSimplify(
> not(coalesce(nullBool, trueLiteral)),
> "false");
> }
> {code}
--
This message was sent by Atlassian JIRA
(v7.6.3#76005)