acelyc111 commented on a change in pull request #4925: URL: https://github.com/apache/incubator-doris/pull/4925#discussion_r528290975
########## File path: be/src/olap/reader.cpp ########## @@ -599,13 +599,12 @@ OLAPStatus Reader::_init_params(const ReaderParams& read_params) { if (_tablet->tablet_schema().has_sequence_col()) { _sequence_col_idx = _tablet->tablet_schema().sequence_col_idx(); - if (_sequence_col_idx != -1) { - for (auto col : _return_columns) { - // query has sequence col - if (col == _sequence_col_idx) { - _has_sequence_col = true; - break; - } + DCHECK_NE(_sequence_col_idx, -1); Review comment: @morningman Because `has_sequence_col() ` in line 600 is `inline bool has_sequence_col() const { return _sequence_col_idx != -1; }`, so `_sequence_col_idx` shoule always be `-1` here. ---------------------------------------------------------------- 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. 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