dssysolyatin commented on code in PR #2977:
URL: https://github.com/apache/calcite/pull/2977#discussion_r1044438897


##########
core/src/main/java/org/apache/calcite/adapter/enumerable/EnumerableWindow.java:
##########
@@ -693,7 +696,7 @@ private static Pair<Expression, Expression> 
getPartitionIterator(
     }
     Expression multiMap_ =
         builder.append(
-            "multiMap", Expressions.new_(SortedMultiMap.class));
+            "multiMap", Expressions.new_(SortedMultiMap.class), false);

Review Comment:
   Yes, the problem does not exists for "multiMap" at the moment. But this 
change avoids possible problem. Although I started to think, that I should 
revert changes for "multiMap" and create separate ticket for improving 
optimizer.
   
   It is quite bad idea to reuse mutable collections at all:
   
https://github.com/apache/calcite/commit/a7bedd6595ebe69bd93e9fcc3f05850da5f673b2



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