2021-03-04 17:38:12 +00:00
|
|
|
#pragma once
|
|
|
|
|
2021-04-10 23:33:54 +00:00
|
|
|
#include <Interpreters/Context_fwd.h>
|
|
|
|
|
2021-03-04 17:38:12 +00:00
|
|
|
#include <cstddef>
|
|
|
|
|
|
|
|
namespace DB
|
|
|
|
{
|
|
|
|
|
|
|
|
struct Settings;
|
|
|
|
|
2021-05-19 14:32:07 +00:00
|
|
|
enum class CompileExpressions: uint8_t
|
|
|
|
{
|
|
|
|
no = 0,
|
|
|
|
yes = 1,
|
|
|
|
};
|
|
|
|
|
2021-03-04 17:38:12 +00:00
|
|
|
struct ExpressionActionsSettings
|
|
|
|
{
|
2021-05-19 14:32:07 +00:00
|
|
|
bool can_compile_expressions = false;
|
2021-03-04 17:38:12 +00:00
|
|
|
size_t min_count_to_compile_expression = 0;
|
|
|
|
|
|
|
|
size_t max_temporary_columns = 0;
|
|
|
|
size_t max_temporary_non_const_columns = 0;
|
|
|
|
|
2021-05-19 14:32:07 +00:00
|
|
|
CompileExpressions compile_expressions = CompileExpressions::no;
|
|
|
|
|
|
|
|
static ExpressionActionsSettings fromSettings(const Settings & from, CompileExpressions compile_expressions = CompileExpressions::no);
|
|
|
|
static ExpressionActionsSettings fromContext(ContextPtr from, CompileExpressions compile_expressions = CompileExpressions::no);
|
2021-03-04 17:38:12 +00:00
|
|
|
};
|
|
|
|
|
|
|
|
}
|