felipecrv commented on code in PR #39420:
URL: https://github.com/apache/arrow/pull/39420#discussion_r1439661273
##########
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:
I like `auto*` because it communicates the assignment is just a pointer
assignment and not some expensive copy/move operation. And it's creates a good
symmetry with `auto&` that requires the `&` otherwise it becomes a copy.
--
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]