You have to provide the following information whenever possible.

**Describe the bug**

Interval data type is not passed correctly from subquery

**Does it reproduce on recent release?**

Yes, tested on 21.6.5.37.

**How to reproduce**

```sql
SELECT
    toIntervalDay(5) AS interval,
    now() + interval AS res

┌─interval─┬─────────────────res─┐
│        5 │ 2021-07-03 13:11:45 │
└──────────┴─────────────────────┘
```

But if I wrap interval calculation in subquery:

```sql
SELECT
    (SELECT toIntervalDay(5)) AS interval,
    now() + interval AS res

Received exception from server (version 21.6.5):
Code: 70. DB::Exception: Received from localhost:9000. DB::Exception: Conversion from Int8 to IntervalDay is not supported: While processing CAST(5, 'IntervalDay') AS interval, now() + interval AS res.
```

**Expected behavior**

Both queries should work the same way.
ColumnsWithTypeAndName tmp_args;
                if (source_is_nullable)
                    tmp_args = createBlockWithNestedColumns(arguments);
                else
                    tmp_args = arguments;
                const ColumnNullable * nullable_source = nullptr;
                
                if (source_is_nullable)
                {
                    if (arguments.size() != 1)
                        throw Exception("Invalid number of arguments", ErrorCodes::LOGICAL_ERROR);
                    nullable_source = typeid_cast<const ColumnNullable *>(arguments.front().column.get());
                }
                
                auto tmp_res = wrapper(tmp_args, nested_type, nullable_source, input_rows_count);
                
                if (!tmp_res)
                    throw Exception("Couldn't convert " + arguments[0].type->getName() + " to "
                                    + nested_type->getName() + " in " + " prepareRemoveNullable wrapper.", ErrorCodes::LOGICAL_ERROR);
                return wrapInNullable(tmp_res, arguments, nested_type, input_rows_count);
            };
        }
        else if (source_is_nullable)
        {
            
            return [wrapper, skip_not_null_check]
                (ColumnsWithTypeAndName & arguments, const DataTypePtr & result_type, const ColumnNullable *, size_t input_rows_count) -> ColumnPtr
            {
                auto tmp_args = createBlockWithNestedColumns(arguments);
                auto nested_type = removeNullable(result_type);