shishkovilja commented on code in PR #13095:
URL: https://github.com/apache/ignite/pull/13095#discussion_r3636324887


##########
modules/calcite/src/main/java/org/apache/ignite/internal/processors/query/calcite/message/QueryBatchMessage.java:
##########
@@ -99,6 +104,29 @@ public boolean last() {
      * @return Rows.
      */
     public List<Object> rows() {
-        return 
mRows.stream().map(GenericValueMessage::value).collect(Collectors.toList());
+        return rows;

Review Comment:
   Rows just can be eagerly initialized here.  Also we can use `F.transform` 
here.



##########
modules/calcite/src/main/java/org/apache/ignite/internal/processors/query/calcite/message/QueryBatchMessage.java:
##########
@@ -60,8 +66,7 @@ public QueryBatchMessage(UUID qryId, long fragmentId, long 
exchangeId, int batch
         this.exchangeId = exchangeId;
         this.batchId = batchId;
         this.last = last;
-
-        mRows = rows.stream().map(o -> o == null ? null : new 
GenericValueMessage(o)).collect(Collectors.toList());
+        this.rows = rows;

Review Comment:
   Can be replaced by lighweight view (`F.view`).



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