You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@calcite.apache.org by "Zoltan Haindrich (JIRA)" <ji...@apache.org> on 2018/10/08 09:32:00 UTC
[jira] [Commented] (CALCITE-2451) RexSimplify: fuse unknownAsFalse
and IS TRUE handling
[ https://issues.apache.org/jira/browse/CALCITE-2451?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=16641579#comment-16641579 ]
Zoltan Haindrich commented on CALCITE-2451:
-------------------------------------------
sorry: in my last comment I was not talking clearly...I also disagree with that sentence...
[~julianhyde]: Today I was looking at some expression which was not simplified for some reason - and your comment have came into my mind...which gave me a probably different idea - which might have been something already explored...but I don't see any reference to your work branch around Sep/20 ...so I'm not sure...
In case of an expression like {{f() is true}} - right now we set unknownAsFalse and descend...I think it would be probably an alternative to do what you experiemented with around Sep/20 and add distributivity rules for IS TRUE (and its friends)..ex: {{(c1 and c2) IS TRUE}} <=> {{c1 IS TRUE and c2 IS TRUE}} - I'm not sure how much stress this will cause on the rex tree/etc; but methods which are strongly tied to unknownAsFalse states - might instead check for the return type being a nonNullable boolean.
> RexSimplify: fuse unknownAsFalse and IS TRUE handling
> -----------------------------------------------------
>
> Key: CALCITE-2451
> URL: https://issues.apache.org/jira/browse/CALCITE-2451
> Project: Calcite
> Issue Type: Sub-task
> Components: core
> Affects Versions: 1.17.0
> Reporter: Vladimir Sitnikov
> Assignee: Julian Hyde
> Priority: Major
>
> It looks like {{unknownAsFalse}} duplicates {{IS_TRUE}} handling.
> In other words, {{withUnknownAsFalse(true). simplfy(expr)}} is more or less comparable to {{simplify(isTrue(expr))}}
> Implementing {{IS_TRUE/IS_FALSE/...}} simplification possibilities might make {{unknownAsFalse}} obsolete.
--
This message was sent by Atlassian JIRA
(v7.6.3#76005)