| 330 | } |
| 331 | |
| 332 | bool needThrowRootCauseError(const Context * context, int & error_code, String & error_messge) |
| 333 | { |
| 334 | const String & query_id = context->getCurrentQueryId(); |
| 335 | auto coordinator = MPPQueryManager::instance().getCoordinator(query_id); |
| 336 | if (!coordinator) |
| 337 | return false; |
| 338 | |
| 339 | if (coordinator->getContext().get() != context) |
| 340 | return false; |
| 341 | |
| 342 | coordinator->updateSegmentInstanceStatus(RuntimeSegmentsStatus{ |
| 343 | .query_id = query_id, .segment_id = 0, .is_succeed = false, .message = error_messge, .code = error_code}); |
| 344 | if (isAmbiguosError(error_code)) |
| 345 | { |
| 346 | auto query_status = coordinator->waitUntilFinish(error_code, error_messge); |
| 347 | if (query_status.error_code != error_code) |
| 348 | { |
| 349 | error_code = query_status.error_code; |
| 350 | error_messge = query_status.summarized_error_msg; |
| 351 | return true; |
| 352 | } |
| 353 | } |
| 354 | return false; |
| 355 | } |
| 356 | |
| 357 | static void checkASTSizeLimits(const IAST & ast, const Settings & settings) |
| 358 | { |
no test coverage detected