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

Function executeTrivialBlockIO

src/Interpreters/executeQuery.cpp:2637–2666  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

2635}
2636
2637void executeTrivialBlockIO(BlockIO & streams, ContextPtr context, bool with_interactive_cancel)
2638{
2639 try
2640 {
2641 if (!streams.pipeline.initialized())
2642 return;
2643
2644 if (!streams.pipeline.completed())
2645 throw Exception(ErrorCodes::LOGICAL_ERROR, "Query pipeline requires output, but no output buffer provided, it's a bug");
2646
2647 streams.pipeline.setProgressCallback(context->getProgressCallback());
2648
2649 CompletedPipelineExecutor executor(streams.pipeline);
2650
2651 if (auto callback = context->getInteractiveCancelCallback(); callback && with_interactive_cancel)
2652 {
2653 auto interactive_delay = context->getSettingsRef()[Setting::interactive_delay];
2654 executor.setCancelCallback(std::move(callback), interactive_delay / 1000);
2655 }
2656
2657 executor.execute();
2658 }
2659 catch (...)
2660 {
2661 streams.onException();
2662 throw;
2663 }
2664
2665 streams.onFinish();
2666}
2667
2668}

Calls 10

completedMethod · 0.80
getProgressCallbackMethod · 0.80
ExceptionClass · 0.70
initializedMethod · 0.45
setProgressCallbackMethod · 0.45
setCancelCallbackMethod · 0.45
executeMethod · 0.45
onExceptionMethod · 0.45
onFinishMethod · 0.45

Tested by

no test coverage detected