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


##########
core/src/main/java/org/apache/calcite/adapter/enumerable/PhysTypeImpl.java:
##########
@@ -587,6 +587,11 @@ private RelDataType toStruct(RelDataType type) {
   @Override public @Nullable Expression comparer() {
     final Expression comparer = format.comparer();
     if (comparer != null) {
+      // ARRAY compares nested arrays by content, but a List or Map compares

Review Comment:
   I run a JMH benchmark comparing both comparers on flat arrays of 8 and 64 
strings or integers. On JDK 21, deepComparer() took 1.6–2.0× as long for 
strings and 2.6–3.4× for integers. On JDK 17.0.19, the difference was larger: 
8.5–10.4× and 19.8–22.2×, respectively.



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