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. 
   express in code: 
   _normal_columns_idx[x] = j  and  _return_columns_loc[j] = i 
   ==>
   _return_columns_loc[_normal_columns_idx[x]] equal to i
   
   why not _normal_columns_idx[x] save i directly? there is no need to got i by 
_return_columns_loc.




-- 
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

Reply via email to