github-actions[bot] commented on code in PR #44020: URL: https://github.com/apache/doris/pull/44020#discussion_r1843291122
########## be/src/service/arrow_flight/arrow_flight_batch_reader.cpp: ########## @@ -17,53 +17,294 @@ #include "service/arrow_flight/arrow_flight_batch_reader.h" +#include <arrow/io/memory.h> +#include <arrow/ipc/reader.h> #include <arrow/status.h> +#include <arrow/type.h> +#include <gen_cpp/internal_service.pb.h> -#include "arrow/builder.h" #include "runtime/exec_env.h" +#include "runtime/memory/mem_tracker_limiter.h" #include "runtime/result_buffer_mgr.h" +#include "runtime/thread_context.h" +#include "service/backend_options.h" +#include "util/arrow/block_convertor.h" #include "util/arrow/row_batch.h" #include "util/arrow/utils.h" +#include "util/brpc_client_cache.h" +#include "util/ref_count_closure.h" +#include "util/runtime_profile.h" +#include "vec/core/block.h" -namespace doris { -namespace flight { +namespace doris::flight { -std::shared_ptr<arrow::Schema> ArrowFlightBatchReader::schema() const { - return schema_; +ArrowFlightBatchReaderBase::ArrowFlightBatchReaderBase( + const std::shared_ptr<QueryStatement>& statement) + : _statement(statement) {} + +std::shared_ptr<arrow::Schema> ArrowFlightBatchReaderBase::schema() const { + return _schema; +} + +arrow::Status ArrowFlightBatchReaderBase::_return_invalid_status(const std::string& msg) { + std::string status_msg = + fmt::format("ArrowFlightBatchReader {}, packet_seq={}, result={}:{}, finistId={}", msg, + _packet_seq, _statement->result_addr.hostname, _statement->result_addr.port, + print_id(_statement->query_id)); + LOG(WARNING) << status_msg; + return arrow::Status::Invalid(status_msg); } -ArrowFlightBatchReader::ArrowFlightBatchReader(std::shared_ptr<QueryStatement> statement, - std::shared_ptr<arrow::Schema> schema) - : statement_(std::move(statement)), schema_(std::move(schema)) {} +ArrowFlightBatchReaderBase::~ArrowFlightBatchReaderBase() { Review Comment: warning: use '= default' to define a trivial destructor [modernize-use-equals-default] ```cpp ArrowFlightBatchReaderBase::~ArrowFlightBatchReaderBase() { ^ ``` ########## be/src/runtime/result_buffer_mgr.h: ########## @@ -17,7 +17,9 @@ #pragma once +#include <cctz/time_zone.h> Review Comment: warning: 'cctz/time_zone.h' file not found [clang-diagnostic-error] ```cpp #include <cctz/time_zone.h> ^ ``` ########## be/src/runtime/buffer_control_block.h: ########## @@ -17,8 +17,11 @@ #pragma once +#include <arrow/type.h> Review Comment: warning: 'arrow/type.h' file not found [clang-diagnostic-error] ```cpp #include <arrow/type.h> ^ ``` ########## be/src/service/arrow_flight/arrow_flight_batch_reader.h: ########## @@ -17,40 +17,91 @@ #pragma once +#include <cctz/time_zone.h> Review Comment: warning: 'cctz/time_zone.h' file not found [clang-diagnostic-error] ```cpp #include <cctz/time_zone.h> ^ ``` -- 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