#27685
{
    if (!initialized)
    {
        initialized = true;
        if (join->alwaysReturnsEmptySet() && !on_totals)
        {
            stop_reading = true;
            chunk.clear();
            return;
        }
    }
    Block block;
    if (on_totals)
    {
        const auto & left_totals = inputs.front().getHeader().cloneWithColumns(chunk.detachColumns());
        const auto & right_totals = join->getTotals();
        
        
        if (default_totals && !right_totals)
            return;
        block = outputs.front().getHeader().cloneEmpty();
        JoinCommon::joinTotals(left_totals, right_totals, join->getTableJoin(), block);
    }
    else
        block = readExecute(chunk);
    auto num_rows = block.rows();
    chunk.setColumns(block.getColumns(), num_rows);
}
Block JoiningTransform::readExecute(Chunk & chunk)