heguanhui commented on code in PR #63922:
URL: https://github.com/apache/doris/pull/63922#discussion_r3364691346
##########
be/src/format/orc/vorc_reader.cpp:
##########
@@ -1509,10 +1509,10 @@ Status OrcReader::_init_orc_row_reader() {
} catch (std::exception& e) {
std::string _err_msg = e.what();
- // ignore stop exception
Review Comment:
1. 为什么 catch 里要检查 _io_ctx->should_stop?
ORC 库在读文件时检测到 should_stop=true 会主动抛出 what()=="stop"
的异常(vorc_reader.cpp:172-173),这是正常的取消信号,不是错误,需要特殊处理以区分"查询取消"和"读取出错"。
2. 为什么返回 EOF?
与 _create_file_reader 保持一致,它对 "stop" 异常也返回
Status::EndOfFile("stop")(vorc_reader.cpp:418-419)。上层对 EOF 的处理是设置 eof=true
并优雅结束扫描,正好是"查询取消"想要的效果。
--
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]