pitrou commented on code in PR #49300:
URL: https://github.com/apache/arrow/pull/49300#discussion_r2816434364
##########
cpp/src/parquet/decoder.cc:
##########
@@ -1000,8 +1001,9 @@ class DictDecoderImpl : public TypedDecoderImpl<Type>,
public DictDecoder<Type>
inline void DecodeDict(TypedDecoder<Type>* dictionary) {
dictionary_length_ = static_cast<int32_t>(dictionary->values_left());
- PARQUET_THROW_NOT_OK(dictionary_->Resize(dictionary_length_ * sizeof(T),
- /*shrink_to_fit=*/false));
+ PARQUET_THROW_NOT_OK(
+ dictionary_->Resize(static_cast<int64_t>(dictionary_length_) *
sizeof(T),
Review Comment:
I thought about that, but it would introduce some downcasts to int/int32_t
in other places. Upcasts are safer, so I think it's better to keep it a int32_t.
--
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]