github-actions[bot] commented on code in PR #14722: URL: https://github.com/apache/doris/pull/14722#discussion_r1050322382
########## be/src/vec/olap/vgeneric_iterators.h: ########## @@ -120,6 +120,21 @@ class VMergeIteratorContext { void set_skip(bool skip) const { _skip = skip; } + bool is_same() const { return _same; } + + void set_same(bool same) const { _same = same; } + + std::vector<bool> get_pre_ctx_same() const { return _pre_ctx_same_bit; } + + void set_pre_ctx_same(VMergeIteratorContext* ctx) const { + int64_t index = ctx->get_cur_batch() - 1; + DCHECK(index >= 0); + DCHECK_LT(index, _pre_ctx_same_bit.size()); + _pre_ctx_same_bit[index] = ctx->is_same(); + } + + size_t get_cur_batch() { return _cur_batch_num; } Review Comment: warning: method 'get_cur_batch' can be made const [readability-make-member-function-const] ```suggestion size_t get_cur_batch() const { return _cur_batch_num; } ``` ########## be/src/vec/core/block.cpp: ########## @@ -198,6 +198,7 @@ void Block::erase_impl(size_t position) { ++it; } } + if (position < row_same_bit.size()) row_same_bit.erase(row_same_bit.begin() + position); Review Comment: warning: statement should be inside braces [readability-braces-around-statements] ```suggestion if (position < row_same_bit.size()) { row_same_bit.erase(row_same_bit.begin() + position); } ``` ########## be/src/vec/olap/block_reader.cpp: ########## @@ -407,6 +407,15 @@ void BlockReader::_update_agg_value(MutableColumns& columns, int begin, int end, } } +bool BlockReader::_get_next_row_same() { + if (_next_row.is_same) Review Comment: warning: statement should be inside braces [readability-braces-around-statements] ```suggestion if (_next_row.is_same) { ``` be/src/vec/olap/block_reader.cpp:412: ```diff - else { + } else { ``` -- 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