yiguolei commented on code in PR #68610:
URL: https://github.com/apache/doris/pull/68610#discussion_r4279675209
##########
be/src/exec/scan/scanner.cpp:
##########
@@ -87,8 +89,17 @@ Status Scanner::init(RuntimeState* state, const
VExprContextSPtrs& conjuncts) {
return Status::OK();
}
+// Keep the single-use padding loop inline with its projection and LIMIT
accounting.
+// NOLINTNEXTLINE(readability-function-cognitive-complexity)
Status Scanner::get_block_after_projects(RuntimeState* state, Block* block,
bool* eos) {
SCOPED_CONCURRENCY_COUNT(ConcurrencyStatsManager::instance().vscanner_get_block);
+ // Peer scanners may have exhausted the shared LIMIT while this scanner
waited to be
+ // scheduled. Admission does not look at the LIMIT, so the scanner reports
EOS itself with an
+ // empty block instead of reading on; the operator already has enough rows
and cuts the rest.
+ if (_shared_scan_limit &&
_shared_scan_limit->load(std::memory_order_acquire) <= 0) {
+ *eos = true;
Review Comment:
这里return 空block 就可以了,不要设置eos。 limit 和eos 的含义不一样。
如果我们这里不设置eos,那么即使有什么问题,顶多造成查询超时,不会造成结果不对。
--
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: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]