[
https://issues.apache.org/jira/browse/CALCITE-2451?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=16571407#comment-16571407
]
Julian Hyde edited comment on CALCITE-2451 at 9/20/18 5:09 PM:
---------------------------------------------------------------
I've tried this earlier...with a slightly different goal for CALCITE-2326 but I
wasn't able to finish it; my experiences are:
* I think that rexbuilder shouldn't be running rexsimplify under the hood; only
at build time, since simplify may happen multiple times and/or simplify may
miss the simplification context...
* I feel that the rexsimplify api is a bit too broad...the many methods makes
it hard to change it. so I think Calcite-2338 would be good
* I've a feeling that at some point, we may not be able to do the
simplification with acceptable compute times without introducing something
which also keeps track what have been done so far.
* there are 2 different kind of logics with more or less the same goals:
** there are the predicates way...what this can't do is "further" simplification
** and in one of the and analyzers there's a lot of things going on - which is
limited to and; but its even able to notice a variable with an empty range in
one pass
but essentially these two are more or less the same; I stopped while I was
planning to merge these 2....
was (Author: kgyrtkirk):
I've tried this earlier...with a slightly different goal for calcite-2326 but I
wasn't able to finish it; my experiences are:
* I think that rexbuilder shouldn't be running rexsimplify under the hood; only
at build time, since simplify may happen multiple times and/or simplify may
miss the simplification context...
* I feel that the rexsimplify api is a bit too broad...the many methods makes
it hard to change it. so I think Calcite-2338 would be good
* I've a feeling that at some point, we may not be able to do the
simplification with acceptable compute times without introducing something
which also keeps track what have been done so far.
* there are 2 different kind of logics with more or less the same goals:
** there are the predicates way...what this can't do is "further" simplification
** and in one of the and analyzers there's a lot of things going on - which is
limited to and; but its even able to notice a variable with an empty range in
one pass
but essentially these two are more or less the same; I stopped while I was
planning to merge these 2....
> 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)