pitrou commented on a change in pull request #9432: URL: https://github.com/apache/arrow/pull/9432#discussion_r572032957
########## File path: cpp/src/parquet/column_reader.cc ########## @@ -1010,8 +1010,9 @@ int64_t TypedColumnReaderImpl<DType>::Skip(int64_t num_rows_to_skip) { // This will be enough scratch space to accommodate 16-bit levels or any // value type + int16_t value_size = type_traits<DType::type_num>::value_byte_size; Review comment: Why `int16_t`? This should probably be `int`. ########## File path: cpp/src/parquet/column_reader.cc ########## @@ -1010,8 +1010,9 @@ int64_t TypedColumnReaderImpl<DType>::Skip(int64_t num_rows_to_skip) { // This will be enough scratch space to accommodate 16-bit levels or any // value type + int16_t value_size = type_traits<DType::type_num>::value_byte_size; std::shared_ptr<ResizableBuffer> scratch = AllocateBuffer( - this->pool_, batch_size * type_traits<DType::type_num>::value_byte_size); + this->pool_, batch_size * std::max<int16_t>(sizeof(int16_t), value_size)); Review comment: Similarly, `std::max<int>`. ---------------------------------------------------------------- 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. For queries about this service, please contact Infrastructure at: us...@infra.apache.org