marin-ma commented on code in PR #13548:
URL: https://github.com/apache/gluten/pull/13548#discussion_r4527330782


##########
cpp/velox/shuffle/VeloxHashShuffleWriter.cc:
##########
@@ -229,12 +229,9 @@ arrow::Result<std::shared_ptr<arrow::Buffer>> 
VeloxHashShuffleWriter::generateCo
   const facebook::velox::IndexRange allRows{0, vector->size()};
   serializer->append(vector, folly::Range(&allRows, 1));
   auto serializedSize = serializer->maxSerializedSize();
-  auto flushBuffer = complexTypeFlushBuffer_[0];

Review Comment:
   @LuciferYang Thank you for the fix. I think the idea of holding the 
`complexTypeFlushBuffer_` here is to avoid freeing up the allocated memory and 
then the future call can reuse it. 
   
   The code is wrong for this purpose. It's supposed to be `auto& flushBuffer = 
complexTypeFlushBuffer_[0];`



##########
cpp/velox/shuffle/VeloxHashShuffleWriter.cc:
##########
@@ -1172,13 +1161,10 @@ 
arrow::Result<std::vector<std::shared_ptr<arrow::Buffer>>> VeloxHashShuffleWrite
     }
   }
   if (hasComplexType_ && complexTypeData_[partitionId] != nullptr) {
-    auto flushBuffer = complexTypeFlushBuffer_[partitionId];

Review Comment:
   ditto



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


---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to