HappenLee commented on code in PR #59263:
URL: https://github.com/apache/doris/pull/59263#discussion_r3318025664
##########
be/src/storage/segment/segment_iterator.cpp:
##########
@@ -2841,8 +2855,19 @@ Status
SegmentIterator::_read_columns_by_rowids(std::vector<ColumnId>& read_colu
"SegmentIterator meet invalid column, return columns size
{}, cid {}",
_current_return_columns.size(), cid);
}
- RETURN_IF_ERROR(_column_iterators[cid]->read_by_rowids(rowids.data(),
select_size,
-
_current_return_columns[cid]));
+
+ auto* column_iter = _column_iterators[cid].get();
+ if (read_for_predicate &&
_support_lazy_read_pruned_columns.contains(cid)) {
+
column_iter->set_reading_mode(ColumnIterator::ReadingMode::PREDICATE);
+ } else {
+ column_iter->set_reading_mode(ColumnIterator::ReadingMode::NORMAL);
+ }
+ Defer defer {[column_iter]() {
Review Comment:
每次这种都要defer的设置回来的话,我建议你用一个宏或者包装一个类,然后来做这个事儿
--
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]