You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@gluten.apache.org by "jinchengchenghh (via GitHub)" <gi...@apache.org> on 2026/03/02 14:42:53 UTC

Re: [PR] [VL] Reduce triple map lookup to single find in dictionary serialization [incubator-gluten]

jinchengchenghh commented on code in PR #11628:
URL: https://github.com/apache/incubator-gluten/pull/11628#discussion_r2872830358


##########
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:
   GLUTEN_DCHECK means the code only executes on debug compilation mode, so we don't need to add complexity for it. Only if the code logic has something wrong, the check mai fail.



-- 
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: commits-unsubscribe@gluten.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@gluten.apache.org
For additional commands, e-mail: commits-help@gluten.apache.org