You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@calcite.apache.org by "Haisheng Yuan (Jira)" <ji...@apache.org> on 2020/04/11 21:13:00 UTC
[jira] [Created] (CALCITE-3917) Revive pruned node when a rule
generates RelNode that is already pruned
Haisheng Yuan created CALCITE-3917:
--------------------------------------
Summary: Revive pruned node when a rule generates RelNode that is already pruned
Key: CALCITE-3917
URL: https://issues.apache.org/jira/browse/CALCITE-3917
Project: Calcite
Issue Type: Improvement
Components: core
Reporter: Haisheng Yuan
Manually pruning nodes in rule can be dangerous. e.g.:
Logical transformation rule X matches RelNode A and generates RelNode B. Rule X thinks B is always better than A, prunes A in the rule. But if B is already in the MEMO, matched and pruned by another rule Y before X, and rule Y generates A. At the end, we may see CannotPlanException, because there is no available RelNode in the RelSet.
In this case, we'd better revive the node that is already pruned out by planner, even this can bring additional rule apply and overhead, but better than failure to plan.
--
This message was sent by Atlassian Jira
(v8.3.4#803005)