kou commented on code in PR #39420:
URL: https://github.com/apache/arrow/pull/39420#discussion_r1439216010


##########
cpp/src/parquet/encoding.cc:
##########
@@ -1936,7 +1930,7 @@ class DictByteArrayDecoderImpl : public 
DictDecoderImpl<ByteArrayType>,
     // space for binary data.
     RETURN_NOT_OK(helper.Prepare());
 
-    auto dict_values = reinterpret_cast<const ByteArray*>(dictionary_->data());
+    const ByteArray* dict_values = dictionary_->data_as<ByteArray>();

Review Comment:
   Why do we need to stop using `auto` here?



##########
cpp/src/parquet/encoding.cc:
##########
@@ -2007,7 +2001,7 @@ class DictByteArrayDecoderImpl : public 
DictDecoderImpl<ByteArrayType>,
     // space for binary data.
     RETURN_NOT_OK(helper.Prepare());
 
-    auto dict_values = reinterpret_cast<const ByteArray*>(dictionary_->data());
+    const auto* dict_values = dictionary_->data_as<ByteArray>();

Review Comment:
   Do we need to specify `const` and `*` explicitly here?



-- 
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: github-unsubscr...@arrow.apache.org

For queries about this service, please contact Infrastructure at:
us...@infra.apache.org

Reply via email to