marin-ma commented on code in PR #11628:
URL: 
https://github.com/apache/incubator-gluten/pull/11628#discussion_r2873074150


##########
cpp/velox/shuffle/ArrowShuffleDictionaryWriter.cc:
##########
@@ -404,14 +404,14 @@ arrow::Status 
ArrowShuffleDictionaryWriter::serialize(arrow::io::OutputStream* o
   ARROW_RETURN_NOT_OK(out->Write(bitMap.data(), bitMapSize));
 
   for (auto fieldIdx : dictionaryFields_) {
+    auto it = dictionaries_.find(fieldIdx);
     GLUTEN_DCHECK(
-        dictionaries_.find(fieldIdx) != dictionaries_.end(),
+        it != dictionaries_.end(),

Review Comment:
   @jinchengchenghh This change makes sense as `dictionaries_.erase(fieldIdx)` 
also performs another lookup.



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