yiguolei commented on code in PR #30746: URL: https://github.com/apache/doris/pull/30746#discussion_r1477953751
########## be/src/vec/exec/scan/scanner_context.h: ########## @@ -58,6 +58,47 @@ class VScanNode; class ScannerScheduler; class SimplifiedScanScheduler; +class ScanTask { +public: + ScanTask(std::weak_ptr<ScannerDelegate> delegate_scanner, vectorized::BlockUPtr free_block) + : scanner(delegate_scanner), current_block(std::move(free_block)) {} + +private: + // whether current scanner is finished + bool eos = false; + Status status = Status::OK(); + +public: + std::weak_ptr<ScannerDelegate> scanner; + // cache the block of current loop + vectorized::BlockUPtr current_block; + // only take the size of the first block as estimated size + bool first_block = true; + uint64_t last_submit_time; // nanoseconds + + void set_status(Status _status) { + if (_status.is<ErrorCode::END_OF_FILE>()) { + // set `eos` if `END_OF_FILE`, don't take `END_OF_FILE` as error + eos = true; + } Review Comment: Do we need save OK instead of END_OF_FILE, since there are many codes check if (status.ok()) -- 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