1#pragma once
2
3#include <Parsers/IAST.h>
4#include <Interpreters/Cluster.h>
5
6namespace DB
7{
8
9struct Settings;
10class Context;
11class Cluster;
12
13namespace ClusterProxy
14{
15
16class IStreamFactory;
17
18/// removes different restrictions (like max_concurrent_queries_for_user, max_memory_usage_for_user, etc.)
19/// from settings and creates new context with them
20Context removeUserRestrictionsFromSettings(const Context & context, const Settings & settings);
21
22/// Execute a distributed query, creating a vector of BlockInputStreams, from which the result can be read.
23/// `stream_factory` object encapsulates the logic of creating streams for a different type of query
24/// (currently SELECT, DESCRIBE).
25BlockInputStreams executeQuery(
26 IStreamFactory & stream_factory, const ClusterPtr & cluster,
27 const ASTPtr & query_ast, const Context & context, const Settings & settings);
28
29}
30
31}
32