These two queries are expected to be the same result (dataset = https://play.clickhouse.com/play?user=play), but actually _not_:

```sql
SELECT actor_login,
                    created_at,
                    toString(event_type) AS event_type,
                    toString(action) AS action, number,
                    merged_at
             FROM github_events
             WHERE repo_name = 'apache/pulsar'
               AND event_type IN
                 ('PullRequestEvent'
                 , 'PullRequestReviewCommentEvent'
                 , 'PullRequestReviewEvent'
                 , 'IssueCommentEvent')
               AND actor_login NOT IN ('github-actions[bot]'
                 , 'codecov-commenter')
AND number = 9276
```

gives:

<img width="1726" alt="image" src="https://user-images.githubusercontent.com/18818196/203365958-a7379e4d-a14d-4544-a36d-09c1bb8783be.png">

```sql
SELECT actor_login,
                    created_at,
                    toString(event_type) AS event_type,
                    toString(action) AS action, number,
                    merged_at
             FROM github_events
             WHERE repo_name = 'apache/pulsar'
               AND multiMatchAny(event_type,
                 ['PullRequestEvent'
                 , 'PullRequestReviewCommentEvent'
                 , 'PullRequestReviewEvent'
                 , 'IssueCommentEvent'])
               AND actor_login NOT IN ('github-actions[bot]'
                 , 'codecov-commenter')
AND number = 9276
```

gives:

<img width="1713" alt="image" src="https://user-images.githubusercontent.com/18818196/203366295-d6d6d55a-03f9-4be4-bb86-ab9dfc0849c6.png">

The latter is expected.

cc @alexey-milovidov 
}
            return createTupleToMapWrapper(from_kv_types, to_kv_types);
        }
        else if (const auto * from_array = typeid_cast<const DataTypeArray *>(from_type_untyped.get()))
        {
            const auto * nested_tuple = typeid_cast<const DataTypeTuple *>(from_array->getNestedType().get());
            if (!nested_tuple || nested_tuple->getElements().size() != 2)
                throw Exception{"CAST AS Map from array requeires nested tuple of 2 elements.\n"
                    "Left type: " + from_array->getName() + ", right type: " + to_type->getName(), ErrorCodes::TYPE_MISMATCH};
            return createArrayToMapWrrapper(nested_tuple->getElements(), to_type->getKeyValueTypes());
        }
        else if (const auto * from_type = checkAndGetDataType<DataTypeMap>(from_type_untyped.get()))
        {
            return createMapToMapWrrapper(from_type->getKeyValueTypes(), to_type->getKeyValueTypes());
        }
        else
        {
            throw Exception{"Unsupported types to CAST AS Map\n"
                "Left type: " + from_type_untyped->getName() + ", right type: " + to_type->getName(), ErrorCodes::TYPE_MISMATCH};
        }
    }
    WrapperType createTupleToObjectWrapper(const DataTypeTuple & from_tuple, bool has_nullable_subcolumns) const
    {
        if (!from_tuple.haveExplicitNames())
            throw Exception(ErrorCodes::TYPE_MISMATCH,
            "Cast to Object can be performed only from flatten Named Tuple. Got: {}", from_tuple.getName());
        PathsInData paths;
        DataTypes from_types;
        std::tie(paths, from_types) = flattenTuple(from_tuple.getPtr());
        auto to_types = from_types;