[ 
https://issues.apache.org/jira/browse/CALCITE-5663?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=17714715#comment-17714715
 ] 

Marieke Gueye commented on CALCITE-5663:
----------------------------------------

My initial thought was to add a new method in the relSupplier that returns the 
relRoot if available, not sure this is the right place to add it though, any 
thoughts ?

> [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)

Reply via email to