Gabriel39 commented on code in PR #71397:
URL: https://github.com/apache/doris/pull/71397#discussion_r4795876578
##########
be/src/format_v2/orc/orc_reader.cpp:
##########
@@ -2374,9 +2523,17 @@ Status OrcReader::_create_row_reader() {
if (_state->orc_lazy_read_enabled && _orc_filter == nullptr) {
_orc_filter = std::make_unique<OrcFilterImpl>(this);
}
+ // The SDK retains its SARG by reference; release the previous reader
before replacing
+ // the options it borrowed. Keep the original SARG for later safe
stripe ranges.
+ _state->row_reader.reset();
+ auto& options = _state->active_row_reader_options;
+ options = std::as_const(_state->row_reader_options);
+ if (_state->stripe_ranges_applied &&
!_state->selected_stripe_ranges.empty() &&
+
_state->selected_stripe_ranges[_state->current_stripe_range].disable_sarg) {
+ options.searchArgument(nullptr);
+ }
_state->row_reader = _state->reader->createRowReader(
- _state->row_reader_options,
- _state->orc_lazy_read_enabled ? _orc_filter.get() : nullptr,
+ options, _state->orc_lazy_read_enabled ? _orc_filter.get() :
nullptr,
Review Comment:
Fixed in d76640f505. Dictionary pruning and row selection now respect DATE
validation, and stripe-local match state is cleared before each RowReader
range. Regressions compare direct/dictionary encodings, absent and partial
string matches, SARG on/off, projected DATEs and lazy DATE predicate leaders
across safe/unsafe stripe transitions. They reproduced both eager bypasses and
the adjacent lazy-predicate bypass before the fix. Required DATE errors are
retained; lazy rejection before decoding an unneeded projected DATE remains
covered.
--
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]
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]