ClickHouse/src/Interpreters/SubqueryForSet.h

35 lines
755 B
C++
Raw Normal View History

#pragma once
#include <Core/Block.h>
#include <Storages/IStorage_fwd.h>
namespace DB
{
2020-09-15 13:25:14 +00:00
class QueryPlan;
2021-04-29 14:34:52 +00:00
class Set;
using SetPtr = std::shared_ptr<Set>;
/// Information on what to do when executing a subquery in the [GLOBAL] IN/JOIN section.
struct SubqueryForSet
{
2020-09-15 17:13:13 +00:00
~SubqueryForSet();
/// The source is obtained using the InterpreterSelectQuery subquery.
2020-09-15 13:25:14 +00:00
std::unique_ptr<QueryPlan> source;
/// If set, build it from result.
SetPtr set;
/// If set, put the result into the table.
/// This is a temporary table for transferring to remote servers for distributed query processing.
StoragePtr table;
};
/// ID of subquery -> what to do with it.
using SubqueriesForSets = std::unordered_map<String, SubqueryForSet>;
}