Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[GLUTEN-7534][CH] Refactor logics about jit settings #7536

Closed
wants to merge 1 commit into from
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
7 changes: 5 additions & 2 deletions cpp-ch/local-engine/Common/CHUtil.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -705,12 +705,14 @@ DB::Field BackendInitializerUtil::toField(const String & key, const String & val

void BackendInitializerUtil::initSettings(const std::map<std::string, std::string> & spark_conf_map, DB::Settings & settings)
{
/// Initialize default setting.
/// Initialize default setting. Could be overrided by spark_conf_map
settings.set("date_time_input_format", "best_effort");
settings.set(MERGETREE_MERGE_AFTER_INSERT, true);
settings.set(MERGETREE_INSERT_WITHOUT_LOCAL_STORAGE, false);
settings.set(DECIMAL_OPERATIONS_ALLOW_PREC_LOSS, true);
settings.set("remote_filesystem_read_prefetch", false);
settings.set("compile_expressions", true); // Enable JIT by default, which is different from ClickHouse
settings.set("min_count_to_compile_expression", 0); // Compile expression no matter how many times it appears

for (const auto & [key, value] : spark_conf_map)
{
Expand Down Expand Up @@ -756,7 +758,8 @@ void BackendInitializerUtil::initSettings(const std::map<std::string, std::strin
LOG_DEBUG(&Poco::Logger::get("CHUtil"), "Set settings key:{} value:{}", key, value);
}
}
/// Finally apply some fixed kvs to settings.

/// Finally apply some fixed kvs to settings. Could not be overrided by spark_conf_map
settings.set("join_use_nulls", true);
settings.set("input_format_orc_allow_missing_columns", true);
settings.set("input_format_orc_case_insensitive_column_matching", true);
Expand Down
4 changes: 2 additions & 2 deletions cpp-ch/local-engine/Parser/SerializedPlanParser.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -304,11 +304,11 @@ DB::QueryPipelineBuilderPtr SerializedPlanParser::buildQueryPipeline(DB::QueryPl
settings,
0);
const QueryPlanOptimizationSettings optimization_settings{.optimize_plan = settings[Setting::query_plan_enable_optimizations]};
ExpressionActionsSettings actions_settings = ExpressionActionsSettings::fromContext(context, CompileExpressions::yes);
return query_plan.buildQueryPipeline(
optimization_settings,
BuildQueryPipelineSettings{
.actions_settings
= ExpressionActionsSettings{.can_compile_expressions = true, .min_count_to_compile_expression = 3, .compile_expressions = CompileExpressions::yes},
.actions_settings = actions_settings,
.process_list_element = query_status});
}

Expand Down
Loading