mirror of
https://github.com/ClickHouse/ClickHouse.git
synced 2024-12-17 03:42:48 +00:00
28 lines
769 B
C++
28 lines
769 B
C++
|
|
#include <Columns/Collator.h>
|
|
#include <Common/quoteString.h>
|
|
#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 == PartDestinationType::DISK)
|
|
{
|
|
settings.ostr << " TO DISK " << quoteString(destination_name);
|
|
}
|
|
else if (destination_type == PartDestinationType::VOLUME)
|
|
{
|
|
settings.ostr << " TO VOLUME " << quoteString(destination_name);
|
|
}
|
|
else if (destination_type == PartDestinationType::DELETE)
|
|
{
|
|
/// It would be better to output "DELETE" here but that will break compatibility with earlier versions.
|
|
}
|
|
}
|
|
|
|
}
|