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

Function createRemoteSourcePipe

src/Processors/Sources/RemoteSource.cpp:310–335  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

308}
309
310Pipe createRemoteSourcePipe(
311 RemoteQueryExecutorPtr query_executor,
312 bool add_aggregation_info,
313 bool add_totals,
314 bool add_extremes,
315 bool async_read,
316 bool async_query_sending,
317 size_t parallel_marshalling_threads)
318{
319 chassert(parallel_marshalling_threads);
320
321 Pipe pipe(std::make_shared<RemoteSource>(query_executor, add_aggregation_info, async_read, async_query_sending));
322 pipe.addSimpleTransform([&](const SharedHeader & header) { return std::make_shared<AddSequenceNumber>(header); });
323
324 if (add_totals)
325 pipe.addTotalsSource(std::make_shared<RemoteTotalsSource>(query_executor));
326
327 if (add_extremes)
328 pipe.addExtremesSource(std::make_shared<RemoteExtremesSource>(query_executor));
329
330 pipe.resize(parallel_marshalling_threads);
331 pipe.addSimpleTransform([&](const SharedHeader & header) { return std::make_shared<UnmarshallBlocksTransform>(header); });
332 pipe.addTransform(std::make_shared<SortChunksBySequenceNumber>(pipe.getHeader(), parallel_marshalling_threads));
333
334 return pipe;
335}
336
337}

Callers 3

addLazyPipeMethod · 0.85
addPipeMethod · 0.85

Calls 6

addTotalsSourceMethod · 0.80
addExtremesSourceMethod · 0.80
addSimpleTransformMethod · 0.45
resizeMethod · 0.45
addTransformMethod · 0.45
getHeaderMethod · 0.45

Tested by

no test coverage detected