soumyakanti3578 commented on code in PR #6067:
URL: https://github.com/apache/hive/pull/6067#discussion_r2396310224


##########
ql/src/java/org/apache/hadoop/hive/ql/optimizer/calcite/reloperators/HiveSortExchange.java:
##########
@@ -87,6 +105,28 @@ public static HiveSortExchange create(RelNode input,
     return new HiveSortExchange(cluster, traitSet, input, distribution, 
collation, builder.build());
   }
 
+  private static ImmutableList<RexNode> getKeys(RelInput input) {
+    RelCollation collation = 
RelCollationTraitDef.INSTANCE.canonize(input.getCollation());
+    RelTraitSet traitSet = getTraitSet(input.getCluster(), collation, 
input.getDistribution());
+    RelCollation canonizedCollation = 
traitSet.canonize(RelCollationImpl.of(collation.getFieldCollations()));
+    ImmutableList.Builder<RexNode> builder = ImmutableList.builder();
+    for (RelFieldCollation relFieldCollation : 
canonizedCollation.getFieldCollations()) {
+      int index = relFieldCollation.getFieldIndex();
+      
builder.add(input.getCluster().getRexBuilder().makeInputRef(input.getInput(), 
index));
+    }
+
+    return builder.build();
+  }
+
+  private static RelDistribution getDistribution(RelInput input) {
+    RelDistribution result = input.getDistribution();
+    if (RelDistribution.Type.ANY == result.getType()) {

Review Comment:
   This is not needed anymore and can be removed. I believe this was a bug.



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


---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to