Skip to content

Commit

Permalink
2
Browse files Browse the repository at this point in the history
  • Loading branch information
xinyiZzz committed Nov 2, 2023
1 parent 68e0cfa commit 7a499a3
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 3 deletions.
2 changes: 1 addition & 1 deletion be/src/runtime/result_buffer_mgr.h
Original file line number Diff line number Diff line change
Expand Up @@ -66,7 +66,7 @@ class ResultBufferMgr {
Status fetch_arrow_data(const TUniqueId& finst_id, std::shared_ptr<arrow::RecordBatch>* result);

static void register_arrow_schema(const TUniqueId& query_id,
const std::shared_ptr<arrow::Schema>& arrow_schema);
const std::shared_ptr<arrow::Schema>& arrow_schema);
std::shared_ptr<arrow::Schema> find_arrow_schema(const TUniqueId& query_id);

// cancel
Expand Down
6 changes: 4 additions & 2 deletions be/src/util/arrow/row_batch.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -172,8 +172,10 @@ Status convert_expr_ctxs_arrow_schema(const vectorized::VExprContextSPtrs& outpu
std::shared_ptr<arrow::DataType> arrow_type;
auto root_expr = expr_ctx->root();
RETURN_IF_ERROR(convert_to_arrow_type(root_expr->type(), &arrow_type));
auto field_name = root_expr->is_slot_ref() ? root_expr->expr_name() : root_expr->data_type()->get_name();
fields.push_back(std::make_shared<arrow::Field>(field_name, arrow_type, root_expr->is_nullable()));
auto field_name = root_expr->is_slot_ref() ? root_expr->expr_name()
: root_expr->data_type()->get_name();
fields.push_back(
std::make_shared<arrow::Field>(field_name, arrow_type, root_expr->is_nullable()));
}
*result = arrow::schema(std::move(fields));
return Status::OK();
Expand Down

0 comments on commit 7a499a3

Please sign in to comment.