rok commented on code in PR #41546:
URL: https://github.com/apache/arrow/pull/41546#discussion_r1590776471
##########
cpp/src/parquet/encoding.cc:
##########
@@ -2740,13 +2740,12 @@ class DeltaLengthByteArrayEncoder : public EncoderImpl,
: EncoderImpl(descr, Encoding::DELTA_LENGTH_BYTE_ARRAY,
pool = ::arrow::default_memory_pool()),
sink_(pool),
- length_encoder_(nullptr, pool),
- encoded_size_{0} {}
+ length_encoder_(nullptr, pool) {}
std::shared_ptr<Buffer> FlushValues() override;
int64_t EstimatedDataEncodedSize() override {
- return encoded_size_ + length_encoder_.EstimatedDataEncodedSize();
+ return sink_.length() + length_encoder_.EstimatedDataEncodedSize();
Review Comment:
Ah sorry in this case they wouldn't be different as we call `sink_.Reserve`
(and not `sink_.Resize` as I assumed).
--
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]