This is an automated email from the ASF dual-hosted git repository.
marong pushed a commit to branch main
in repository https://gitbox.apache.org/repos/asf/incubator-gluten.git
The following commit(s) were added to refs/heads/main by this push:
new cfae8dc71a [VL] Reduce triple map lookup to single find in dictionary
serialization (#11628)
cfae8dc71a is described below
commit cfae8dc71a2eb07d0d573a7318232cb8e42a1b36
Author: Ankita Victor <[email protected]>
AuthorDate: Mon Mar 2 20:59:18 2026 +0530
[VL] Reduce triple map lookup to single find in dictionary serialization
(#11628)
---
cpp/velox/shuffle/ArrowShuffleDictionaryWriter.cc | 8 ++++----
1 file changed, 4 insertions(+), 4 deletions(-)
diff --git a/cpp/velox/shuffle/ArrowShuffleDictionaryWriter.cc
b/cpp/velox/shuffle/ArrowShuffleDictionaryWriter.cc
index fcb43de106..7c67600c48 100644
--- a/cpp/velox/shuffle/ArrowShuffleDictionaryWriter.cc
+++ b/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(),
"Invalid dictionary field index: " + std::to_string(fieldIdx));
- const auto& dictionary = dictionaries_[fieldIdx];
- ARROW_RETURN_NOT_OK(dictionary->serialize(out));
+ ARROW_RETURN_NOT_OK(it->second->serialize(out));
- dictionaries_.erase(fieldIdx);
+ dictionaries_.erase(it);
}
return arrow::Status::OK();
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]