2021-03-04 17:38:12 +00:00
|
|
|
#include <Interpreters/ExpressionActionsSettings.h>
|
2021-04-10 23:33:54 +00:00
|
|
|
|
2021-03-04 17:38:12 +00:00
|
|
|
#include <Core/Settings.h>
|
|
|
|
#include <Interpreters/Context.h>
|
|
|
|
|
|
|
|
namespace DB
|
|
|
|
{
|
|
|
|
|
2021-05-19 14:32:07 +00:00
|
|
|
ExpressionActionsSettings ExpressionActionsSettings::fromSettings(const Settings & from, CompileExpressions compile_expressions)
|
2021-03-04 17:38:12 +00:00
|
|
|
{
|
|
|
|
ExpressionActionsSettings settings;
|
2021-05-19 14:32:07 +00:00
|
|
|
settings.can_compile_expressions = from.compile_expressions;
|
2021-03-04 17:38:12 +00:00
|
|
|
settings.min_count_to_compile_expression = from.min_count_to_compile_expression;
|
|
|
|
settings.max_temporary_columns = from.max_temporary_columns;
|
|
|
|
settings.max_temporary_non_const_columns = from.max_temporary_non_const_columns;
|
2021-05-19 14:32:07 +00:00
|
|
|
settings.compile_expressions = compile_expressions;
|
2021-08-16 11:30:56 +00:00
|
|
|
settings.short_circuit_function_evaluation = from.short_circuit_function_evaluation;
|
2021-03-04 17:38:12 +00:00
|
|
|
|
|
|
|
return settings;
|
|
|
|
}
|
|
|
|
|
2021-05-19 14:32:07 +00:00
|
|
|
ExpressionActionsSettings ExpressionActionsSettings::fromContext(ContextPtr from, CompileExpressions compile_expressions)
|
2021-03-10 09:33:23 +00:00
|
|
|
{
|
2021-05-19 14:32:07 +00:00
|
|
|
return fromSettings(from->getSettingsRef(), compile_expressions);
|
2021-03-10 09:33:23 +00:00
|
|
|
}
|
2021-03-04 17:38:12 +00:00
|
|
|
|
|
|
|
}
|