mapleFU commented on code in PR #38784:
URL: https://github.com/apache/arrow/pull/38784#discussion_r1400731809


##########
cpp/src/parquet/encoding.cc:
##########
@@ -1983,7 +1990,7 @@ class DictByteArrayDecoderImpl : public 
DictDecoderImpl<ByteArrayType>,
     int values_decoded = 0;
 
     ArrowBinaryHelper<ByteArrayType> helper(out, num_values);
-    RETURN_NOT_OK(helper.Prepare(len_));
+    RETURN_NOT_OK(helper.Prepare());

Review Comment:
   ```c++
   template <>
   void DictDecoderImpl<ByteArrayType>::SetDict(TypedDecoder<ByteArrayType>* 
dictionary) {
     DecodeDict(dictionary);
   
     auto dict_values = 
reinterpret_cast<ByteArray*>(dictionary_->mutable_data());
   
     int total_size = 0;
     for (int i = 0; i < dictionary_length_; ++i) {
       total_size += dict_values[i].len;
     }
     PARQUET_THROW_NOT_OK(byte_array_data_->Resize(total_size,
                                                   /*shrink_to_fit=*/false));
     PARQUET_THROW_NOT_OK(
         byte_array_offsets_->Resize((dictionary_length_ + 1) * sizeof(int32_t),
                                     /*shrink_to_fit=*/false));
   
   ```
   
   I think it already handled this well :-)



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