mirror of
https://github.com/ClickHouse/ClickHouse.git
synced 2024-11-12 02:23:14 +00:00
310ed66b00
This reverts commit 6f4f44ce7980cace32edd0913b8d1d53cd51682b.
40 lines
716 B
C++
40 lines
716 B
C++
#pragma once
|
|
|
|
#include <DB/DataTypes/IDataType.h>
|
|
|
|
#include <DB/Parsers/IAST.h>
|
|
|
|
|
|
namespace DB
|
|
{
|
|
|
|
|
|
/** Подзарос SELECT
|
|
*/
|
|
class ASTSubquery : public IAST
|
|
{
|
|
public:
|
|
ASTSubquery() = default;
|
|
ASTSubquery(const StringRange range_) : IAST(range_) {}
|
|
|
|
/** Получить текст, который идентифицирует этот элемент. */
|
|
String getID() const override { return "Subquery"; }
|
|
|
|
ASTPtr clone() const override
|
|
{
|
|
const auto res = new ASTSubquery{*this};
|
|
ASTPtr ptr{res};
|
|
|
|
res->children.clear();
|
|
|
|
for (const auto & child : children)
|
|
res->children.emplace_back(child->clone());
|
|
|
|
return ptr;
|
|
}
|
|
|
|
String getColumnName() const override { return getTreeID(); }
|
|
};
|
|
|
|
}
|