[
https://issues.apache.org/jira/browse/CALCITE-5397?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=17637630#comment-17637630
]
Ruben Q L commented on CALCITE-5397:
------------------------------------
RelTraits should always be canonized, which allows them to be compared with ==
, see {{RelTrait}} javadoc and {{RelTraitDef#canonize}}.
Moreover, having two different Convention "NONE" seems odd, because everywhere
we should use {{org.apache.calcite.plan.Convention.NONE}}.
Can you provide a unit tests reproducing the error?
> There is a bug in judging whether traits are different in
> RelTraitSet#difference.
> ---------------------------------------------------------------------------------
>
> Key: CALCITE-5397
> URL: https://issues.apache.org/jira/browse/CALCITE-5397
> Project: Calcite
> Issue Type: Bug
> Components: core
> Affects Versions: 1.32.0
> Reporter: weibin0516
> Assignee: weibin0516
> Priority: Major
> Attachments: image-2022-11-23-16-01-06-098.png,
> image-2022-11-23-16-06-11-621.png
>
>
> I think
> {code:java}
> !thisTrait.equals(thatTrait){code}
> should be used here instead of
> {code:java}
> !={code}
> !image-2022-11-23-16-01-06-098.png|width=677,height=307!
>
> As shown in the figure below, the content of the two is consistent, but it is
> currently judged to have a difference.
> !image-2022-11-23-16-06-11-621.png|width=524,height=160!
--
This message was sent by Atlassian Jira
(v8.20.10#820010)