mirror of
https://github.com/ClickHouse/ClickHouse.git
synced 2024-11-21 15:12:02 +00:00
97f2a2213e
* Move some code outside dbms/src folder * Fix paths
37 lines
758 B
C++
37 lines
758 B
C++
#pragma once
|
|
|
|
#include <Parsers/ASTWithAlias.h>
|
|
|
|
|
|
namespace DB
|
|
{
|
|
|
|
|
|
/** SELECT subquery
|
|
*/
|
|
class ASTSubquery : public ASTWithAlias
|
|
{
|
|
public:
|
|
/** Get the text that identifies this element. */
|
|
String getID(char) const override { return "Subquery"; }
|
|
|
|
ASTPtr clone() const override
|
|
{
|
|
const auto res = std::make_shared<ASTSubquery>(*this);
|
|
ASTPtr ptr{res};
|
|
|
|
res->children.clear();
|
|
|
|
for (const auto & child : children)
|
|
res->children.emplace_back(child->clone());
|
|
|
|
return ptr;
|
|
}
|
|
|
|
protected:
|
|
void formatImplWithoutAlias(const FormatSettings & settings, FormatState & state, FormatStateStacked frame) const override;
|
|
void appendColumnNameImpl(WriteBuffer & ostr) const override;
|
|
};
|
|
|
|
}
|