ClickHouse/src/Parsers/ASTSelectWithUnionQuery.h
feng lv b4c933e585 fix
fix test
2020-11-09 16:03:52 +00:00

38 lines
715 B
C++

#pragma once
#include <Parsers/ASTQueryWithOutput.h>
namespace DB
{
/** Single SELECT query or multiple SELECT queries with UNION
* or UNION or UNION DISTINCT
*/
class ASTSelectWithUnionQuery : public ASTQueryWithOutput
{
public:
String getID(char) const override { return "SelectWithUnionQuery"; }
ASTPtr clone() const override;
void formatQueryImpl(const FormatSettings & settings, FormatState & state, FormatStateStacked frame) const override;
enum class Mode
{
Unspecified,
ALL,
DISTINCT
};
using UnionModes = std::vector<Mode>;
Mode union_mode;
UnionModes list_of_modes;
bool is_normalized = false;
ASTPtr list_of_selects;
};
}