chrisjordansquire commented on code in PR #37754:
URL: https://github.com/apache/arrow/pull/37754#discussion_r1330492659
##########
cpp/src/arrow/array/array_dict.cc:
##########
@@ -299,10 +300,11 @@ class DictionaryUnifierImpl : public DictionaryUnifier {
}
// 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:
Done.
##########
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:
Done.
--
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]