1 | #pragma once |
2 | |
3 | #include <Parsers/IAST.h> |
4 | #include <Interpreters/Cluster.h> |
5 | |
6 | namespace DB |
7 | { |
8 | |
9 | struct Settings; |
10 | class Context; |
11 | class Cluster; |
12 | |
13 | namespace ClusterProxy |
14 | { |
15 | |
16 | class 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 |
20 | Context 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). |
25 | BlockInputStreams executeQuery( |
26 | IStreamFactory & stream_factory, const ClusterPtr & cluster, |
27 | const ASTPtr & query_ast, const Context & context, const Settings & settings); |
28 | |
29 | } |
30 | |
31 | } |
32 | |