zuochunwei commented on a change in pull request #7642: URL: https://github.com/apache/incubator-doris/pull/7642#discussion_r780594023
########## File path: be/src/vec/olap/block_reader.cpp ########## @@ -129,7 +123,7 @@ OLAPStatus BlockReader::init(const ReaderParams& read_params) { for (int j = 0; j < read_params.return_columns.size(); ++j) { if (read_params.return_columns[j] == cid) { if (j < _tablet->num_key_columns() || _tablet->keys_type() != AGG_KEYS) { - _normal_columns_idx.emplace_back(j); + _normal_columns.emplace_back(i); Review comment: before modifying: _normal_columns_idx's elements store j in _init_agg_state() function, then used as the _return_columns_loc's subscript. expressing in code: _normal_columns_idx[x] = j _return_columns_loc[_normal_columns_idx[x]] because _return_columns_loc[j] is assigned to i. so why not _normal_columns_idx[x] save i directly? there is no need to got i by _return_columns_loc. _return_columns_loc keeping stable after setting in _init_agg_state function make this modification work. -- 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: commits-unsubscr...@doris.apache.org For queries about this service, please contact Infrastructure at: us...@infra.apache.org --------------------------------------------------------------------- To unsubscribe, e-mail: commits-unsubscr...@doris.apache.org For additional commands, e-mail: commits-h...@doris.apache.org