ClickHouse/dbms/src/Parsers/ASTKillQueryQuery.cpp
Vitaliy Lyudvichenko 1d247d0e31 Fixed segfault in case of WHERE <non-UInt8 type expression>. [#CLICKHOUSE-3616]
Prohibited non-UInt8 constants in WHERE expressions.
Fixed KILL QUERY syntax highlighting.
2018-03-06 18:42:00 +03:00

22 lines
729 B
C++

#include <Parsers/ASTKillQueryQuery.h>
namespace DB
{
String ASTKillQueryQuery::getID() const
{
return "KillQueryQuery_" + (where_expression ? where_expression->getID() : "") + "_" + String(sync ? "SYNC" : "ASYNC");
}
void ASTKillQueryQuery::formatQueryImpl(const FormatSettings & settings, FormatState & state, FormatStateStacked frame) const
{
settings.ostr << (settings.hilite ? hilite_keyword : "") << "KILL QUERY WHERE " << (settings.hilite ? hilite_none : "");
if (where_expression)
where_expression->formatImpl(settings, state, frame);
settings.ostr << " " << (settings.hilite ? hilite_keyword : "") << (test ? "TEST" : (sync ? "SYNC" : "ASYNC")) << (settings.hilite ? hilite_none : "");
}
}