Vladsz83 commented on code in PR #9987:
URL: https://github.com/apache/ignite/pull/9987#discussion_r859840417
##########
modules/calcite/src/main/java/org/apache/ignite/internal/processors/query/calcite/trait/TraitUtils.java:
##########
@@ -123,16 +126,23 @@ else if (converter == RewindabilityTraitDef.INSTANCE)
}
/** */
- @Nullable public static RelNode convertCollation(RelOptPlanner planner,
- RelCollation toTrait, RelNode rel) {
+ @Nullable public static RelNode convertCollation(RelOptPlanner planner,
RelCollation toTrait, RelNode rel) {
RelCollation fromTrait = collation(rel);
if (fromTrait.satisfies(toTrait))
return rel;
RelTraitSet traits = rel.getTraitSet().replace(toTrait);
- return new IgniteSort(rel.getCluster(), traits, rel, toTrait);
+ Sort sortNode = null;
+
+ if (rel instanceof SortNode)
+ sortNode = (Sort)rel;
+ if (rel instanceof RelSubset && ((RelSubset)rel).getOriginal()
instanceof Sort)
Review Comment:
Fixed
--
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]