MCPcopy Create free account
hub / github.com/ClickHouse/ClickHouse / dumpTreeImpl

Method dumpTreeImpl

src/Analyzer/QueryNode.cpp:174–346  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

172}
173
174void QueryNode::dumpTreeImpl(WriteBuffer & buffer, FormatState & format_state, size_t indent) const
175{
176 buffer << std::string(indent, ' ') << "QUERY id: " << format_state.getNodeId(this);
177
178 if (hasAlias())
179 buffer << ", alias: " << getAlias();
180
181 if (is_subquery)
182 buffer << ", is_subquery: " << is_subquery;
183
184 if (is_cte)
185 buffer << ", is_cte: " << is_cte;
186
187 if (is_materialized)
188 buffer << ", is_materialized: " << is_materialized;
189
190 if (is_recursive_with)
191 buffer << ", is_recursive_with: " << is_recursive_with;
192
193 if (is_distinct)
194 buffer << ", is_distinct: " << is_distinct;
195
196 if (is_limit_with_ties)
197 buffer << ", is_limit_with_ties: " << is_limit_with_ties;
198
199 if (is_group_by_with_totals)
200 buffer << ", is_group_by_with_totals: " << is_group_by_with_totals;
201
202 if (is_group_by_all)
203 buffer << ", is_group_by_all: " << is_group_by_all;
204
205 if (is_order_by_all)
206 buffer << ", is_order_by_all: " << is_order_by_all;
207
208 if (is_limit_by_all)
209 buffer << ", is_limit_by_all: " << is_limit_by_all;
210
211 std::string group_by_type;
212 if (is_group_by_with_rollup)
213 group_by_type = "rollup";
214 else if (is_group_by_with_cube)
215 group_by_type = "cube";
216 else if (is_group_by_with_grouping_sets)
217 group_by_type = "grouping_sets";
218
219 if (!group_by_type.empty())
220 buffer << ", group_by_type: " << group_by_type;
221
222 if (!cte_name.empty())
223 buffer << ", cte_name: " << cte_name;
224
225 if (isCorrelated())
226 {
227 buffer << ", is_correlated: 1\n" << std::string(indent + 2, ' ') << "CORRELATED COLUMNS\n";
228 getCorrelatedColumns().dumpTreeImpl(buffer, format_state, indent + 4);
229 }
230
231 if (hasWith())

Callers

nothing calls this directly

Calls 7

getWindowFunction · 0.85
fieldToStringFunction · 0.85
formatFunction · 0.50
getNodeIdMethod · 0.45
emptyMethod · 0.45
sizeMethod · 0.45
getNameMethod · 0.45

Tested by

no test coverage detected