TsukiokaKogane commented on code in PR #63850:
URL: https://github.com/apache/doris/pull/63850#discussion_r3360030560
##########
be/src/storage/rowset/beta_rowset_reader.cpp:
##########
@@ -135,14 +136,31 @@ Status
BetaRowsetReader::get_segment_iterators(RowsetReaderContext* read_context
std::vector<uint32_t> read_columns;
std::set<uint32_t> read_columns_set;
std::set<uint32_t> delete_columns_set;
+ auto add_read_column_if_absent = [&](uint32_t cid) {
+ if (read_columns_set.insert(cid).second) {
+ read_columns.push_back(cid);
+ }
+ };
for (int i = 0; i < _read_context->return_columns->size(); ++i) {
- read_columns.push_back(_read_context->return_columns->at(i));
- read_columns_set.insert(_read_context->return_columns->at(i));
+ add_read_column_if_absent(_read_context->return_columns->at(i));
}
_read_options.delete_condition_predicates->get_all_column_ids(delete_columns_set);
for (auto cid : delete_columns_set) {
- if (read_columns_set.find(cid) == read_columns_set.end()) {
- read_columns.push_back(cid);
+ add_read_column_if_absent(cid);
+ }
+ if (_read_context->predicates != nullptr) {
+ for (auto pred : *(_read_context->predicates)) {
+ add_read_column_if_absent(pred->column_id());
+ }
+ }
+ if (_should_push_down_value_predicates()) {
Review Comment:
will be removed
--
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]