[
https://issues.apache.org/jira/browse/CALCITE-5715?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=17724427#comment-17724427
]
Julian Hyde commented on CALCITE-5715:
--------------------------------------
What do you mean by 'prune old nodes'? (Sorry, I haven't read the PR. I want
the description of the case to be clear without reading the code.)
It's called ProjectMergeRule. Can you correct the summary and description
please.
Maybe you mean RelNodes that are equivalent but are obviously (for some
definition of obviously) worse.
You should choose your definition of 'obviously' carefully. There is a
particular problem with ProjectMergeRule that it may multiply the complexity of
expressions. The 'bloat' parameter exists to manage that problem. If the merged
Project has more RexNode instances than the two incoming Projects combined,
which, if either, do you consider to be 'obviously' superior?
> Prune old nodes after projection merging in ProjectionMergeRule
> ---------------------------------------------------------------
>
> Key: CALCITE-5715
> URL: https://issues.apache.org/jira/browse/CALCITE-5715
> Project: Calcite
> Issue Type: Improvement
> Components: core
> Affects Versions: 1.34.0
> Reporter: Benchao Li
> Priority: Major
>
> We already have many similar usages (prune old nodes) to reduce the search
> scope, I propose to also add this for {{ProjectionMergeRule}}. Do you have
> any concerns about this?
> The reason I propose to do this optimization for {{ProjectionMergeRule}} is
> that I met a problem that two sets will point to each other after projection
> merging, and the planner will run into dead loop. (It's hard to show the
> details, I haven't got a simple reproducible demo yet)
--
This message was sent by Atlassian Jira
(v8.20.10#820010)