coderex2522 commented on code in PR #1275:
URL: https://github.com/apache/orc/pull/1275#discussion_r1002730947


##########
c++/src/io/OutputStream.cc:
##########
@@ -95,9 +91,11 @@ namespace orc {
 
   uint64_t BufferedOutputStream::flush() {
     uint64_t dataSize = dataBuffer->size();
+    for (uint64_t i = 0; i < dataBuffer->getBlockNumber(); ++i)
     {
       SCOPED_STOPWATCH(metrics, IOBlockingLatencyUs, IOCount);
-      outputStream->write(dataBuffer->data(), dataSize);
+      auto block = dataBuffer->getBlock(i);
+      outputStream->write(block.data, block.size);

Review Comment:
   I try to merge the adjacent write requests here. This part of the logic is 
like IO merge, so I thought it would be more appropriate to put it here.



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