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


##########
cpp/src/arrow/compute/kernels/vector_hash.cc:
##########
@@ -285,8 +285,11 @@ class RegularHashKernel : public HashKernel {
   Status FlushFinal(ExecResult* out) override { return 
action_.FlushFinal(out); }
 
   Status GetDictionary(std::shared_ptr<ArrayData>* out) override {
-    return DictionaryTraits<Type>::GetDictionaryArrayData(pool_, type_, 
*memo_table_,
-                                                          0 /* start_offset 
*/, out);
+    Result<std::shared_ptr<ArrayData>> data;

Review Comment:
   Change made. 



##########
cpp/src/arrow/array/builder_dict.cc:
##########
@@ -106,8 +106,11 @@ class DictionaryMemoTable::DictionaryMemoTableImpl {
     enable_if_memoize<T, Status> Visit(const T&) {
       using ConcreteMemoTable = typename DictionaryTraits<T>::MemoTableType;
       auto memo_table = checked_cast<ConcreteMemoTable*>(memo_table_);
-      return DictionaryTraits<T>::GetDictionaryArrayData(pool_, value_type_, 
*memo_table,
-                                                         start_offset_, out_);
+      Result<std::shared_ptr<ArrayData>> data;
+      data = DictionaryTraits<T>::GetDictionaryArrayData(pool_, value_type_, 
*memo_table,
+                                                         start_offset_);
+      *out_ = data.ok() ? data.ValueOrDie() : nullptr;
+      return data.status();

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]

Reply via email to