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'. 
```
{
        const ColumnWithTypeAndName & arg_cond = arguments[0];
        bool cond_is_null = arg_cond.column->onlyNull();
        ColumnPtr not_const_condition = arg_cond.column;
        bool cond_is_const = false;
        bool cond_is_true = false;
        bool cond_is_false = false;
        if (const auto * const_arg = checkAndGetColumn<ColumnConst>(*arg_cond.column))
        {
            cond_is_const = true;
            not_const_condition = const_arg->getDataColumnPtr();
            ColumnPtr data_column = const_arg->getDataColumnPtr();
            if (const auto * const_nullable_arg = checkAndGetColumn<ColumnNullable>(*data_column))
            {
                data_column = const_nullable_arg->getNestedColumnPtr();
                if (!data_column->empty())
                    cond_is_null = const_nullable_arg->getNullMapData()[0];
            }
            if (!data_column->empty())
            {
                cond_is_true = !cond_is_null && checkAndGetColumn<ColumnUInt8>(*data_column)->getBool(0);
                cond_is_false = !cond_is_null && !cond_is_true;
            }
        }
        const auto & column1 = arguments[1];
        const auto & column2 = arguments[2];