[
https://issues.apache.org/jira/browse/CALCITE-5663?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=17715437#comment-17715437
]
Benchao Li edited comment on CALCITE-5663 at 4/23/23 10:52 AM:
---------------------------------------------------------------
{{relBefore.getTraitSet().replace(EnumerableConvention.INSTANCE)}} will retain
other {{RelTrait}} s, and change {{Convention}} to {{EnumerableConvention}}, in
this way, the final plan should have already enforced the {{RelCollation}} if
{{relBefore}} contains it?
was (Author: libenchao):
{{relBefore.getTraitSet().replace(EnumerableConvention.INSTANCE)}} will retain
other {{RelTrait}}s, and change {{Convention}} to {{EnumerableConvention}}, in
this way, the final plan should have already enforced the {{RelCollation}} if
{{relBefore}} contains it?
> [TestKit] RelOptFixture does not enforce the collation
> ------------------------------------------------------
>
> Key: CALCITE-5663
> URL: https://issues.apache.org/jira/browse/CALCITE-5663
> Project: Calcite
> Issue Type: Bug
> Reporter: Marieke Gueye
> Priority: Minor
>
> In RelOptFixture, we currently change the traitsets to enforce
> EnumerableConvention.INSTANCE, however, in this instance we forget to port
> the collation in the traitset.
> {code:java}
> if (planner instanceof VolcanoPlanner)
> { r2 = planner.changeTraits(relBefore,
> relBefore.getTraitSet().replace(EnumerableConvention.INSTANCE)); }
> else
> { r2 = relBefore; }
>
> {code}
> The problem goes even deeper, as of now, there is no way to get access to the
> collation as it lives in the relRoot, and we currently only access the
> relNode through the relSupplier
>
> The consequence of this can be pretty dire as it may mean that some rules
> might be incorrectly tested.
>
>
--
This message was sent by Atlassian Jira
(v8.20.10#820010)