| 1 | |
|---|---|
| 2 | #include <Columns/Collator.h> | 
| 3 | #include <Common/quoteString.h> | 
| 4 | #include <Parsers/ASTTTLElement.h> | 
| 5 | |
| 6 | |
| 7 | namespace DB | 
| 8 | { | 
| 9 | |
| 10 | void ASTTTLElement::formatImpl(const FormatSettings & settings, FormatState & state, FormatStateStacked frame) const | 
| 11 | { | 
| 12 | children.front()->formatImpl(settings, state, frame); | 
| 13 | if (destination_type == PartDestinationType::DISK) | 
| 14 | { | 
| 15 | settings.ostr << " TO DISK "<< quoteString(destination_name); | 
| 16 | } | 
| 17 | else if (destination_type == PartDestinationType::VOLUME) | 
| 18 | { | 
| 19 | settings.ostr << " TO VOLUME "<< quoteString(destination_name); | 
| 20 | } | 
| 21 | else if (destination_type == PartDestinationType::DELETE) | 
| 22 | { | 
| 23 | /// It would be better to output "DELETE" here but that will break compatibility with earlier versions. | 
| 24 | } | 
| 25 | } | 
| 26 | |
| 27 | } | 
| 28 | 
