| 87 | } |
| 88 | |
| 89 | void WindowStep::describeActions(FormatSettings & settings) const |
| 90 | { |
| 91 | const String & prefix = settings.detail_prefix; |
| 92 | settings.out << prefix << "Window: ("; |
| 93 | if (!window_description.partition_by.empty()) |
| 94 | { |
| 95 | settings.out << "PARTITION BY "; |
| 96 | for (size_t i = 0; i < window_description.partition_by.size(); ++i) |
| 97 | { |
| 98 | if (i > 0) |
| 99 | { |
| 100 | settings.out << ", "; |
| 101 | } |
| 102 | const auto & column_name = window_description.partition_by[i].column_name; |
| 103 | settings.out << (settings.pretty ? QueryPlanFormat::formatColumnPretty(column_name, settings.pretty_names) : column_name); |
| 104 | } |
| 105 | } |
| 106 | if (!window_description.partition_by.empty() |
| 107 | && !window_description.order_by.empty()) |
| 108 | { |
| 109 | settings.out << " "; |
| 110 | } |
| 111 | if (!window_description.order_by.empty()) |
| 112 | { |
| 113 | settings.out << "ORDER BY "; |
| 114 | dumpSortDescription(window_description.order_by, settings); |
| 115 | } |
| 116 | settings.out << ")\n"; |
| 117 | |
| 118 | for (size_t i = 0; i < window_functions.size(); ++i) |
| 119 | { |
| 120 | settings.out << prefix << (i == 0 ? "Functions: " |
| 121 | : " "); |
| 122 | const auto & column_name = window_functions[i].column_name; |
| 123 | settings.out << (settings.pretty ? QueryPlanFormat::formatColumnPretty(column_name, settings.pretty_names) : column_name) << "\n"; |
| 124 | } |
| 125 | } |
| 126 | |
| 127 | void WindowStep::describeActions(JSONBuilder::JSONMap & map) const |
| 128 | { |
nothing calls this directly
no test coverage detected