HuaHuaY commented on code in PR #55856:
URL: https://github.com/apache/arrow/pull/55856#discussion_r4739154900
##########
cpp/src/parquet/column_writer.cc:
##########
@@ -1066,16 +1066,17 @@ void ColumnWriterImpl::BuildDataPageV2(int64_t
definition_levels_rle_size,
page_is_compressed =
(1.0 - static_cast<double>(compressed) / values->size()) >= minimum;
}
- std::shared_ptr<Buffer> compressed_values =
- (page_is_compressed ? compressor_temp_buffer_ : values);
-
- // Concatenate uncompressed levels and the possibly compressed values
- int64_t combined_size =
- definition_levels_rle_size + repetition_levels_rle_size +
compressed_values->size();
- std::shared_ptr<ResizableBuffer> combined = AllocateBuffer(allocator_,
combined_size);
-
- ConcatenateBuffers(definition_levels_rle_size, repetition_levels_rle_size,
- compressed_values, combined->mutable_data());
+ std::shared_ptr<Buffer> page_buffer =
+ page_is_compressed ? compressor_temp_buffer_ : values;
Review Comment:
I discovered that `BuildDataPageV1` already contained similar code six years
ago.
--
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]