yiguolei commented on code in PR #48368: URL: https://github.com/apache/doris/pull/48368#discussion_r1974721490
########## be/src/runtime/result_buffer_mgr.cpp: ########## @@ -140,28 +153,46 @@ Status ResultBufferMgr::find_mem_tracker(const TUniqueId& finst_id, } Status ResultBufferMgr::fetch_arrow_data(const TUniqueId& finst_id, - std::shared_ptr<vectorized::Block>* result, - cctz::time_zone& timezone_obj) { - std::shared_ptr<BufferControlBlock> cb = find_control_block(finst_id); + std::shared_ptr<vectorized::Block>* result) { + std::shared_ptr<ResultBlockBufferBase> cb = find_control_block(finst_id); if (cb == nullptr) { return Status::InternalError( "no result for this query, maybe query has been canceled, finst_id={}", print_id(finst_id)); } - RETURN_IF_ERROR(cb->get_arrow_batch(result, timezone_obj)); + RETURN_IF_ERROR( + assert_cast<vectorized::ArrowFlightResultBlockBuffer*>(cb.get())->get_arrow_batch( + result)); return Status::OK(); } -void ResultBufferMgr::fetch_arrow_data(const PUniqueId& finst_id, GetArrowResultBatchCtx* ctx) { +Status ResultBufferMgr::get_timezone(const TUniqueId& finst_id, cctz::time_zone& timezone_obj) { Review Comment: 我觉得,实际 get arrow schema 以及 这堆get timezone,实际跟result buffer manager 没关系。 我们不如直接把这堆代码删除。 然后上层调用的时候,返回result buffer,然后自己从里面去再调用arrow result buffer 里去获取这些信息。 这样result buffer manager 的接口就是干净的。 -- 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