xiaokang commented on code in PR #15231: URL: https://github.com/apache/doris/pull/15231#discussion_r1054213845
########## be/src/vec/exec/scan/vscanner.cpp: ########## @@ -62,10 +62,18 @@ Status VScanner::get_block(RuntimeState* state, Block* block, bool* eof) { { SCOPED_TIMER(_parent->_filter_timer); RETURN_IF_ERROR(_filter_output_block(block)); + // record rows return (after filter) for _limit check + _num_rows_return += block->rows(); } } while (block->rows() == 0 && !(*eof) && raw_rows_read() < raw_rows_threshold); } + // set eof to true if per scanner limit is reached + // currently for query: ORDER BY key LIMIT n + if (_limit > 0 && _num_rows_return > _limit) { Review Comment: yes, it's more accurate using >= -- 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