valepakh commented on code in PR #4817: URL: https://github.com/apache/ignite-3/pull/4817#discussion_r1869022137
########## 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 split the data holder class both for removing this copy and for better logic distinction between the two. The result data holder has custom serialization which writes the buffer to the stream, which still internally does a copy since the `OutputStream` can't write buffer directly so there's a `WritableByteChannel` which does a chunked writes. -- 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: notifications-unsubscr...@ignite.apache.org For queries about this service, please contact Infrastructure at: us...@infra.apache.org