zanmato1984 commented on code in PR #49512:
URL: https://github.com/apache/arrow/pull/49512#discussion_r3232033679


##########
cpp/src/arrow/util/hashing.h:
##########
@@ -534,12 +536,10 @@ class ScalarMemoTable : public MemoTable {
   // Merge entries from `other_table` into `this->hash_table_`.
   Status MergeTable(const ScalarMemoTable& other_table) {
     const HashTableType& other_hashtable = other_table.hash_table_;
-
-    other_hashtable.VisitEntries([this](const HashTableEntry* other_entry) {
+    RETURN_NOT_OK(other_hashtable.VisitEntries([this](const HashTableEntry* 
other_entry) {

Review Comment:
   Inline nit: since `VisitEntries(...)` now returns `Status` and this is the 
final fallible call in the function, you can simplify the tail by directly 
returning it.
   
   ```suggestion
       return other_hashtable.VisitEntries([this](const HashTableEntry* 
other_entry) {
         int32_t unused;
         return this->GetOrInsert(other_entry->payload.value, &unused);
       });
   ```



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