ClickHouse/src/Interpreters/InterpreterSetQuery.cpp
2021-09-07 01:37:28 +03:00

26 lines
602 B
C++

#include <Parsers/ASTSetQuery.h>
#include <Interpreters/Context.h>
#include <Interpreters/InterpreterSetQuery.h>
namespace DB
{
BlockIO InterpreterSetQuery::execute()
{
const auto & ast = query_ptr->as<ASTSetQuery &>();
getContext()->checkSettingsConstraints(ast.changes);
getContext()->getSessionContext()->applySettingsChanges(ast.changes);
return {};
}
void InterpreterSetQuery::executeForCurrentContext()
{
const auto & ast = query_ptr->as<ASTSetQuery &>();
getContext()->checkSettingsConstraints(ast.changes);
getContext()->applySettingsChanges(ast.changes);
}
}