Reproduction steps:
```
CREATE TABLE table_left                                                                                                                                                                                              
(                                                                                                                                                                                                                    
    `date` Date,                                                                                                                                                                                                     
    `uid` String                                                                                                                                                                                                     
)                                                                                                                                                                                                                    
ENGINE = MergeTree()                                                                                                                                                                                                 
ORDER BY (date, uid)          
                                                                                                                                                                                       
CREATE TABLE table_right                                                                                                                                                                                             
(                                                                                                                                                                                                                    
    `date` Date,                                                                                                                                                                                                     
    `value` Decimal(18, 10)                                                                                                                                                                                          
)                                                                                                                                                                                                                    
ENGINE = MergeTree()                                                                                                                                                                                                 
ORDER BY date

INSERT INTO table_left values(toDate('2019-10-01'), 'hello');
INSERT INTO table_right values (toDate('2019-10-01'), 1), (toDate('2029-10-01'), 2);

SET join_use_nulls = 1;

SELECT ifNull(subquery_right.alias_value, 0)
FROM table_left
FULL OUTER JOIN 
(
    SELECT
        date,
        value AS alias_value
    FROM table_right
) AS subquery_right
ON table_left.date = subquery_right.date

Received exception from server (version 21.3.1):
Code: 43. DB::Exception: Received from localhost:9000. DB::Exception: Incompatible types of arguments corresponding to two conditional branches: while executing 'FUNCTION ifNull(alias_value :: 0, 0 :: 1) -> ifNull(alias_value, 0) Decimal(18, 10) : 2'. 
```
tuple_columns[i] = executeImpl(temporary_columns, tuple_result.getElements()[i], input_rows_count);
        }
        return ColumnTuple::create(tuple_columns);
    }
    static ColumnPtr executeGeneric(
        const ColumnUInt8 * cond_col, const ColumnsWithTypeAndName & arguments, size_t input_rows_count)
    {
        
        const ColumnWithTypeAndName & arg1 = arguments[1];
        const ColumnWithTypeAndName & arg2 = arguments[2];
        DataTypePtr common_type = getLeastSupertype({arg1.type, arg2.type});
        ColumnPtr col_then = castColumn(arg1, common_type);
        ColumnPtr col_else = castColumn(arg2, common_type);
        MutableColumnPtr result_column = common_type->createColumn();
        result_column->reserve(input_rows_count);
        bool then_is_const = isColumnConst(*col_then);
        bool else_is_const = isColumnConst(*col_else);
        const auto & cond_array = cond_col->getData();
        if (then_is_const && else_is_const)
        {
            const IColumn & then_nested_column = assert_cast<const ColumnConst &>(*col_then).getDataColumn();
            const IColumn & else_nested_column = assert_cast<const ColumnConst &>(*col_else).getDataColumn();
            for (size_t i = 0; i < input_rows_count; ++i)
            {
                if (cond_array[i])
                    result_column->insertFrom(then_nested_column, 0);
                else
                    result_column->insertFrom(else_nested_column, 0);
            }
        }