MCPcopy Create free account
hub / github.com/ByConity/ByConity / needThrowRootCauseError

Function needThrowRootCauseError

src/Interpreters/executeQuery.cpp:332–355  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

330}
331
332bool 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
357static void checkASTSizeLimits(const IAST & ast, const Settings & settings)
358{

Callers 3

onExceptionBeforeStartFunction · 0.85
executeQueryImplFunction · 0.85
constructExceptionFunction · 0.85

Calls 7

isAmbiguosErrorFunction · 0.85
getCurrentQueryIdMethod · 0.80
getCoordinatorMethod · 0.80
waitUntilFinishMethod · 0.80
getMethod · 0.45
getContextMethod · 0.45

Tested by

no test coverage detected