vldpyatkov commented on code in PR #5393:
URL: https://github.com/apache/calcite/pull/5393#discussion_r4491494926


##########
core/src/main/java/org/apache/calcite/adapter/enumerable/PhysTypeImpl.java:
##########
@@ -544,6 +530,37 @@ private Expression generateComparator(RelCollation 
collation,
     });
   }
 
+  private static boolean isComposite(RelDataType type) {
+    return type.isStruct() || type.getComponentType() != null;
+  }
+
+  /** ROW and ARRAY sort keys are not Comparable.
+   * Use the same element-wise comparator as the single-key sort path. */
+  private static Expression generateComparison(RelDataType type, String method,

Review Comment:
   Thanks for the suggestion. I've refactored the comparison logic as you 
proposed; the generated code is much easier to follow now.



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