Fix build.

This commit is contained in:
Nikolai Kochetov 2021-03-05 12:54:17 +03:00
parent 9a39459888
commit c481401b0b
3 changed files with 6 additions and 2 deletions

View File

@ -47,6 +47,7 @@
#include <Interpreters/DatabaseCatalog.h>
#include <Interpreters/DNSCacheUpdater.h>
#include <Interpreters/ExternalLoaderXMLConfigRepository.h>
#include <Interpreters/ExpressionJIT.h>
#include <Access/AccessControlManager.h>
#include <Storages/StorageReplicatedMergeTree.h>
#include <Storages/System/attachSystemTables.h>
@ -825,8 +826,7 @@ int Server::main(const std::vector<std::string> & /*args*/)
#if USE_EMBEDDED_COMPILER
size_t compiled_expression_cache_size = config().getUInt64("compiled_expression_cache_size", 500);
if (compiled_expression_cache_size)
global_context->setCompiledExpressionCache(compiled_expression_cache_size);
CompiledExpressionCacheFactory::instance().init(compiled_expression_cache_size);
#endif
/// Set path for format schema files

View File

@ -527,11 +527,13 @@ ActionsDAGPtr ActionsDAG::clone() const
return actions;
}
#if USE_EMBEDDED_COMPILER
void ActionsDAG::compileExpressions(size_t min_count_to_compile_expression)
{
compileFunctions(min_count_to_compile_expression);
removeUnusedActions();
}
#endif
// void ActionsDAG::transformHeader(Block & block)
// {

View File

@ -48,8 +48,10 @@ ExpressionActions::ExpressionActions(ActionsDAGPtr actions_dag_, const Expressio
{
actions_dag = actions_dag_->clone();
#if USE_EMBEDDED_COMPILER
if (settings.compile_expressions)
actions_dag->compileExpressions(settings.min_count_to_compile_expression);
#endif
linearizeActions();