MCPcopy Create free account
hub / github.com/bytedance/bolt / addDetails

Method addDetails

bolt/core/PlanNode.cpp:277–323  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

275 return (isFinal() || isSingle() || isPartial()) && preGroupedKeys().empty() &&
276 queryConfig.aggregationSpillEnabled();
277}
278
279void AggregationNode::addDetails(std::stringstream& stream) const {
280 stream << stepName(step_) << " ";
281
282 if (isPreGrouped()) {
283 stream << "STREAMING ";
284 }
285
286 if (!groupingKeys_.empty()) {
287 stream << "[";
288 addFields(stream, groupingKeys_);
289 stream << "] ";
290 }
291
292 for (auto i = 0; i < aggregateNames_.size(); ++i) {
293 appendComma(i, stream);
294 const auto& aggregate = aggregates_[i];
295 stream << aggregateNames_[i] << " := " << aggregate.call->toString();
296 if (aggregate.distinct) {
297 stream << " distinct";
298 }
299
300 if (aggregate.mask) {
301 stream << " mask: " << aggregate.mask->name();
302 }
303
304 if (!aggregate.sortingKeys.empty()) {
305 stream << " ORDER BY ";
306 addSortingKeys(aggregate.sortingKeys, aggregate.sortingOrders, stream);
307 }
308 }
309
310 if (!globalGroupingSets_.empty()) {
311 stream << " global group IDs: [ " << folly::join(", ", globalGroupingSets_)
312 << " ]";
313 }
314
315 if (groupId_.has_value()) {
316 stream << " Group Id key: " << groupId_.value()->name();
317 }
318 if (ignoreNullKeys_) {
319 stream << " ignore null keys";
320 }
321
322#if defined BOLT_HAS_CUDF && BOLT_HAS_CUDF == 1
323 CudfEnable::addDetails(stream);
324#endif
325}
326

Callers

nothing calls this directly

Calls 15

addFieldsFunction · 0.85
addSortingKeysFunction · 0.85
addKeysFunction · 0.85
joinTypeNameFunction · 0.85
addWindowFunctionFunction · 0.85
has_valueMethod · 0.80
appendCommaFunction · 0.70
emptyMethod · 0.45
sizeMethod · 0.45
toStringMethod · 0.45
nameMethod · 0.45
valueMethod · 0.45

Tested by

no test coverage detected