| 275 | return (isFinal() || isSingle() || isPartial()) && preGroupedKeys().empty() && |
| 276 | queryConfig.aggregationSpillEnabled(); |
| 277 | } |
| 278 | |
| 279 | void 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 |
nothing calls this directly
no test coverage detected