| 238 | } |
| 239 | |
| 240 | Block 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 | |
| 263 | FillingRightJoinSideTransform::FillingRightJoinSideTransform(SharedHeader input_header, JoinPtr join_, FinishCounterPtr finish_counter_) |
| 264 | : IProcessor({input_header}, {Block()}), join(std::move(join_)), finish_counter(std::move(finish_counter_)) |
nothing calls this directly
no test coverage detected