xiedeyantu commented on code in PR #4704:
URL: https://github.com/apache/calcite/pull/4704#discussion_r2644415395


##########
core/src/main/java/org/apache/calcite/rel/rules/FilterProjectTransposeRule.java:
##########
@@ -175,11 +176,13 @@ protected FilterProjectTransposeRule(
       final RelNode input = project.getInput();
       final RelTraitSet traitSet = filter.getTraitSet()
           .replaceIfs(RelCollationTraitDef.INSTANCE,
-              () -> Collections.singletonList(
-                      
input.getTraitSet().getTrait(RelCollationTraitDef.INSTANCE)))
+              () -> 
input.getTraitSet().getTraits(RelCollationTraitDef.INSTANCE))

Review Comment:
   Yes, I'm not entirely sure why; I made some adjustments based on the error 
message. I will revert the changes to RelDistribution later.
   ```
   > Error while executing command ExplainCommand [sql: with t (a, b) as 
(select * from (values (60, 'b')))
   > select * from t where a in (select deptno from "scott".dept)]
   > java.sql.SQLException: Error while executing SQL "explain plan for with t 
(a, b) as (select * from (values (60, 'b')))
   > select * from t where a in (select deptno from "scott".dept)": class 
org.apache.calcite.plan.RelCompositeTrait cannot be cast to class 
org.apache.calcite.rel.RelCollation (org.apache.calcite.plan.RelCompositeTrait 
and org.apache.calcite.rel.RelCollation are in unnamed module of loader 'app')
   ```



-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]

Reply via email to