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

Method readExecute

src/Processors/Transforms/JoiningTransform.cpp:240–261  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

238}
239
240Block JoiningTransform::readExecute(Chunk & chunk)
241{
242 if (!join_result)
243 {
244 Block block = inputs.front().getHeader().cloneWithColumns(chunk.detachColumns());
245 ProfileEvents::increment(ProfileEvents::JoinProbeTableRowCount, block.rows());
246 join_result = join->joinBlock(std::move(block));
247 }
248
249 auto data = join_result->next();
250 if (data.is_last && data.next_block)
251 {
252 data.next_block->filterBySelector();
253 auto next_block = std::move(*data.next_block).getSourceBlock();
254 chunk.setColumns(next_block.getColumns(), next_block.rows());
255 }
256
257 if (data.is_last)
258 join_result.reset();
259
260 return std::move(data.block);
261}
262
263FillingRightJoinSideTransform::FillingRightJoinSideTransform(SharedHeader input_header, JoinPtr join_, FinishCounterPtr finish_counter_)
264 : IProcessor({input_header}, {Block()}), join(std::move(join_)), finish_counter(std::move(finish_counter_))

Callers

nothing calls this directly

Calls 12

cloneWithColumnsMethod · 0.80
filterBySelectorMethod · 0.80
incrementFunction · 0.50
getHeaderMethod · 0.45
frontMethod · 0.45
detachColumnsMethod · 0.45
rowsMethod · 0.45
joinBlockMethod · 0.45
nextMethod · 0.45
setColumnsMethod · 0.45
getColumnsMethod · 0.45
resetMethod · 0.45

Tested by

no test coverage detected