[ 
https://issues.apache.org/jira/browse/CALCITE-2338?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=16534944#comment-16534944
 ] 

Zoltan Haindrich commented on CALCITE-2338:
-------------------------------------------

The calls into these intermediate methods are makeing it harder to do things 
like the "unknownAsFalse generalization" - because RexUtil calls a method like 
"simplifyAnd2ForUnknownAsFalse"

I understand that the caller might know some things - but for a given formula 
the results may change if it is known that it's inside an "IS NULL" ...so I 
don't think running simplify externally by hand on all leaf nodes beforehand is 
preferable - I feel that tracking that what simplification have been tried so 
far should be probably tracked by something later - because in some tests 
simplification is invoked a few million times...on the same Nodes again and 
again....

I think reducing the externally visible methods is also possible without have 
to create a  a new call externally; so that we could probably get the best of 
both worlds...

> Reduce the externally visible api of RexSimplify
> ------------------------------------------------
>
>                 Key: CALCITE-2338
>                 URL: https://issues.apache.org/jira/browse/CALCITE-2338
>             Project: Calcite
>          Issue Type: Bug
>            Reporter: Zoltan Haindrich
>            Assignee: Zoltan Haindrich
>            Priority: Major
>
> Currently many lower level simplification methods are visible.
> While I was porting CALCITE-2247 to a branch near 1.16 I've bumped into an 
> issue because of the fact that by calling a specific simplify method may 
> leave out some otherwise applicable simplifications.
> For master there is already an extra safety feature by the presence of 
> CALCITE-2205; it seems like using less entry points may even lead to better 
> simplifications - by changing this; a filter have been removed.
> https://github.com/kgyrtkirk/calcite/commit/2e29a659792f6bd9419dc0f97bf5a3bdd9f6f2cc



--
This message was sent by Atlassian JIRA
(v7.6.3#76005)

Reply via email to