Skip to content

Commit

Permalink
add plan
Browse files Browse the repository at this point in the history
  • Loading branch information
宋光璠 committed Dec 20, 2024
1 parent c40694a commit 487f53a
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 3 deletions.
2 changes: 1 addition & 1 deletion be/src/common/config.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -106,7 +106,7 @@ DEFINE_String(memory_mode, "moderate");

DEFINE_mBool(enable_use_cgroup_memory_info, "true");

DEFINE_mBool(enable_stream_load_mysql, "false");
DEFINE_mBool(enable_streamload_by_httpstream, "false");

// process memory limit specified as number of bytes
// ('<int>[bB]?'), megabytes ('<float>[mM]'), gigabytes ('<float>[gG]'),
Expand Down
2 changes: 1 addition & 1 deletion be/src/common/config.h
Original file line number Diff line number Diff line change
Expand Up @@ -226,7 +226,7 @@ DECLARE_mInt64(crash_in_alloc_large_memory_bytes);
DECLARE_mBool(crash_in_memory_tracker_inaccurate);

// config to enable Stream Load functionality through SQL statements.
DECLARE_mBool(enable_stream_load_mysql);
DECLARE_mBool(enable_streamload_by_httpstream);

// default is true. if any memory tracking in Orphan mem tracker will report error.
// !! not modify the default value of this conf!! otherwise memory errors cannot be detected in time.
Expand Down
4 changes: 3 additions & 1 deletion be/src/http/action/stream_load.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -445,7 +445,7 @@ Status StreamLoadAction::_process_put(HttpRequest* http_req,
ctx->body_sink = file_sink;
}

if (config::enable_stream_load_mysql) {
if (config::enable_streamload_by_httpstream) {
std::string table_name = ctx->table;
std::string columns, where_clause, column_separator = ",", format = "csv";
std::vector<std::string> sql_parts;
Expand Down Expand Up @@ -473,6 +473,8 @@ Status StreamLoadAction::_process_put(HttpRequest* http_req,

LOG(INFO) << "Generated SQL: " << full_sql;
request.__set_load_sql(full_sql);
ctx->sql_str = full_sql;
return _exec_env->stream_load_executor()->execute_plan_fragment(ctx);
}

if (!http_req->header(HTTP_COLUMNS).empty()) {
Expand Down

0 comments on commit 487f53a

Please sign in to comment.