xndai commented on a change in pull request #1884:
URL: https://github.com/apache/calcite/pull/1884#discussion_r416771885



##########
File path: 
core/src/main/java/org/apache/calcite/adapter/enumerable/EnumerableSort.java
##########
@@ -50,7 +50,8 @@ public static EnumerableSort create(RelNode child, 
RelCollation collation,
     final RelTraitSet traitSet =
         cluster.traitSetOf(EnumerableConvention.INSTANCE)
             .replace(collation);
-    return new EnumerableSort(cluster, traitSet, child, collation, offset,
+    return new EnumerableSort(cluster, traitSet, child,
+        (RelCollation) traitSet.getTrait(collation.getTraitDef()), offset,

Review comment:
       It's needed. There's an assert in Sort.java line 94, which checks the 
collation is indeed the same trait object within RelTraitSet. I am not sure why 
we would need such check. For now I just pass in the collation trait object 
within traitSet to make it happy.




----------------------------------------------------------------
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.

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


Reply via email to