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.
}
        bool skip_not_null_check = false;
        if (from_low_cardinality && from_nested->isNullable() && !to_nested->isNullable())
            
            skip_not_null_check = true;
        auto wrapper = prepareRemoveNullable(from_nested, to_nested, skip_not_null_check);
        if (!from_low_cardinality && !to_low_cardinality)
            return wrapper;
        return [wrapper, from_low_cardinality, to_low_cardinality, skip_not_null_check]
                (ColumnsWithTypeAndName & arguments, const DataTypePtr & result_type, const ColumnNullable * nullable_source, size_t input_rows_count) -> ColumnPtr
        {
            ColumnsWithTypeAndName args = {arguments[0]};
            auto & arg = args.front();
            auto res_type = result_type;
            ColumnPtr converted_column;
            ColumnPtr res_indexes;
            
            bool src_converted_to_full_column = false;
            {
                auto tmp_rows_count = input_rows_count;
                if (to_low_cardinality)
                    res_type = to_low_cardinality->getDictionaryType();
                if (from_low_cardinality)
                {
                    const auto * col_low_cardinality = typeid_cast<const ColumnLowCardinality *>(arguments[0].column.get());
                    if (skip_not_null_check && col_low_cardinality->containsNull())
                        throw Exception{"Cannot convert NULL value to non-Nullable type",
                                        ErrorCodes::CANNOT_INSERT_NULL_IN_ORDINARY_COLUMN};
                    arg.column = col_low_cardinality->getDictionary().getNestedColumn();
                    arg.type = from_low_cardinality->getDictionaryType();