MashrafeeAryan commented on code in PR #55577:
URL: https://github.com/apache/arrow/pull/55577#discussion_r4675507407
##########
cpp/src/parquet/column_reader.cc:
##########
@@ -2172,13 +2305,17 @@ template <typename DT, typename VS>
void TypedRecordReader<DT, VS>::Reserve(int64_t extra_values) {
value_sink_.ReserveValues(extra_values);
valid_bits_.ReserveValues(extra_values); // potentially no-op if void
- def_levels_.ReserveValues(extra_values); // potentially no-op if void
- rep_levels_.ReserveValues(extra_values); // potentially no-op if void
+ if (fixed_width_ == 0 || generic_batch_) {
+ def_levels_.ReserveValues(extra_values); // potentially no-op if void
+ rep_levels_.ReserveValues(extra_values); // potentially no-op if void
+ }
}
template <typename DT, typename VS>
void TypedRecordReader<DT, VS>::Reset() {
null_count_ = 0;
+ fixed_levels_ = 0;
+ generic_batch_ = has_buffered_levels() || !at_record_start_;
Review Comment:
Moved it so a page can now use the fast path even if earlier page falls back
to the regular path.
--
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]