suibianwanwan created CALCITE-6611:
--------------------------------------
Summary: Rules that modify the sort collation cannot be applied in
VolcanoPlanner
Key: CALCITE-6611
URL: https://issues.apache.org/jira/browse/CALCITE-6611
Project: Calcite
Issue Type: Bug
Reporter: suibianwanwan
In VolcanoPlanner, the input to a RelNode is RelSubset, and when connecting
nodes, the TraitSet that looks up the input in the RelSet it belongs to looks
up the RelNode that satisfies it.
If we modify the TraitSet of a relNode and register the new relNode in the
VolcanoPlanner, the new relNode will not be selected by the parent.
Take SortRemoveConstantKeyRule as an example, suppose the original ordering is
[0,1].
If we optimize the order to [1], then because the input of the parent is
RelSubset([0,1]), the parent will not choose the RelNode after applying the
rule.
--
This message was sent by Atlassian Jira
(v8.20.10#820010)