valepakh commented on code in PR #4817:
URL: https://github.com/apache/ignite-3/pull/4817#discussion_r1869467921


##########
modules/compute/src/main/java/org/apache/ignite/internal/compute/ComputeUtils.java:
##########
@@ -509,7 +510,7 @@ static ComputeJobDataHolder marshalAndWrapResult(Object 
result, @Nullable Marsha
             // Value is represented by 3 tuple elements: type, scale, value.
             var builder = new BinaryTupleBuilder(3, 3, false);
             ClientBinaryTupleUtils.appendObject(builder, result);
-            return new ComputeJobDataHolder(NATIVE, builder.build().array());
+            return new ComputeJobDataHolder(NATIVE, 
IgniteUtils.byteBufferToByteArray(builder.build()));

Review Comment:
   I decided to revert the split, it doesn't provide any meaningful value since 
we're copying the bytes anyway in the channel write method and there's no way 
around that. I clarified some names to better understand whether the holder 
holds an argument or result and moved on piece of code to the specific method 
for packing a result.



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