[
https://issues.apache.org/jira/browse/CALCITE-6064?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=17778694#comment-17778694
]
Rong Rong commented on CALCITE-6064:
------------------------------------
hmm this is a good question. I might've interpreted this wrong, but I
encountered this issue when I was trying to implement the deprecated visitor
{{RelTraitPropagationVisitor}}, which calls {{RelOptUtil.addTrait(T rel,
RelTrait trait) { ...}}
after testing several plans I realized that all the traits we wanted to
propagate apply to all nodes we desired except for LogicalJoin. and upon
checking the stack trace we realized that the copy method is different between
LogicalJoin and other methods (such as LogicalAggregate I linked above)
> Incorrect TraitSet copying logic in LogicalJoin?
> ------------------------------------------------
>
> Key: CALCITE-6064
> URL: https://issues.apache.org/jira/browse/CALCITE-6064
> Project: Calcite
> Issue Type: Bug
> Components: core
> Affects Versions: 1.35.0
> Reporter: Rong Rong
> Priority: Major
>
> See: https://github.com/walterddr/calcite/pull/3/files
> seems like the traitSet is not copied but the default emptyTraitSet is being
> used with the Convention.NONE; while some other nodes (such as
> https://github.com/walterddr/calcite/blob/23b7931c3e516bdb6cfedda956213f7fe06c6b24/core/src/main/java/org/apache/calcite/rel/logical/LogicalAggregate.java#L154)
> are copying properly.
--
This message was sent by Atlassian Jira
(v8.20.10#820010)