chrisjordansquire commented on code in PR #37754:
URL: https://github.com/apache/arrow/pull/37754#discussion_r1330283087


##########
cpp/src/arrow/array/array_dict.cc:
##########
@@ -282,10 +282,11 @@ class DictionaryUnifierImpl : public DictionaryUnifier {
     *out_type = arrow::dictionary(index_type, value_type_);
 
     // Build unified dictionary array
-    std::shared_ptr<ArrayData> data;
-    RETURN_NOT_OK(DictTraits::GetDictionaryArrayData(pool_, value_type_, 
memo_table_,
-                                                     0 /* start_offset */, 
&data));
-    *out_dict = MakeArray(data);
+    Result<std::shared_ptr<ArrayData>> data;
+    data = DictTraits::GetDictionaryArrayData(pool_, value_type_, memo_table_,
+                                              0 /* start_offset */);
+    RETURN_NOT_OK(data.status());
+    *out_dict = MakeArray(data.ValueOrDie());

Review Comment:
   Awesome! I was trying to find such a macro and didn't succeed. Thanks for 
the pointer!



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