#27685
{
    if (table_join.forceNullableLeft())
        JoinCommon::convertColumnsToNullable(left_totals);
    if (table_join.forceNullableRight())
        JoinCommon::convertColumnsToNullable(right_totals);
    for (auto & col : out_block)
    {
        if (const auto * left_col = left_totals.findByName(col.name))
            col = *left_col;
        else if (const auto * right_col = right_totals.findByName(col.name))
            col = *right_col;
        else
            col.column = col.type->createColumnConstWithDefaultValue(1)->convertToFullColumnIfConst();
        
        if (col.column->size() != 1)
            col.column = col.column->cloneResized(1);
    }
}
void addDefaultValues(IColumn & column, const DataTypePtr & type, size_t count)
{
    column.reserve(column.size() + count);
    for (size_t i = 0; i < count; ++i)
        type->insertDefaultInto(column);
}
bool typesEqualUpToNullability(DataTypePtr left_type, DataTypePtr right_type)