[
https://issues.apache.org/jira/browse/CALCITE-1942?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=16137889#comment-16137889
]
Julian Hyde commented on CALCITE-1942:
--------------------------------------
This sounds very useful. Will it always produce the same or better results than
toCnf?
Is it possible (and/or desirable) to add an argument to toCnf() that describes
which expressions to ignore, so that if no predicates are ignored it becomes
the regular toCnf() function?
> predicate pushingdown will not require toCNF
> --------------------------------------------
>
> Key: CALCITE-1942
> URL: https://issues.apache.org/jira/browse/CALCITE-1942
> Project: Calcite
> Issue Type: Improvement
> Reporter: wei lin
> Assignee: Julian Hyde
> Original Estimate: 168h
> Remaining Estimate: 168h
>
> Currently, if the expression is complicated, toCNF will run out of calling
> stack size and make the optimizer run out of time.
> we propose a new approach to do the predicate pushing down.
> When we consider the predicate pushing down to child, if there are some
> expressions contain some columns which are not belong to this child output
> schema (they comes from other children), then we treat as anyRexNode.
> Then we use the following way to extract interesting predicate for pushing
> down
> /*
> Decompose expressions into [InterestedPred, Rest] pair based on given
> RexChecker.
> anyRexNode or rexNode = anyRexNode
> anyRexNode and rexNode = rexNode
> not(anyRexNode) = anyRexNode.
> */
> for example, (A.a > 10 or B.a > 10) and (A.b > 4 or A.b < 2), we will extract
> the interesting prediate (A.b > 4 or A.b <2).
> (A.a > 10 or B.a > 10) and (A.b > 4 or A.b < 2)
> => (A.a > 10 or anyRexNode) and (A.b > 4 or A.b < 2)
> => anyRexNode and (A.b > 4 or A.b < 2)
> => (A.b > 4 or A.b < 2)
> Alibaba MaxCompute Optimizer Team
--
This message was sent by Atlassian JIRA
(v6.4.14#64029)