ClickHouse/dbms/src/Parsers/ASTTTLElement.cpp

28 lines
690 B
C++
Raw Normal View History

2019-10-09 13:02:05 +00:00
#include <Columns/Collator.h>
#include <Common/quoteString.h>
2019-10-09 13:02:05 +00:00
#include <Parsers/ASTTTLElement.h>
namespace DB
{
void ASTTTLElement::formatImpl(const FormatSettings & settings, FormatState & state, FormatStateStacked frame) const
{
children.front()->formatImpl(settings, state, frame);
if (destination_type == TTLDestinationType::DISK)
{
settings.ostr << " TO DISK " << quoteString(destination_name);
2019-10-09 13:02:05 +00:00
}
else if (destination_type == TTLDestinationType::VOLUME)
{
settings.ostr << " TO VOLUME " << quoteString(destination_name);
}
else if (destination_type == TTLDestinationType::DELETE)
{
settings.ostr << " DELETE";
2019-10-09 13:02:05 +00:00
}
}
}