```
qoega-dev.sas.yp-c.yandex.net :) SELECT toDate('2000-01-01') < toDateTime('2000-01-01 00:00:01', 'Europe/Moscow');

SELECT toDate('2000-01-01') < toDateTime('2000-01-01 00:00:01', 'Europe/Moscow')

Query id: baf63ad5-1893-401c-9728-63bd5c295df1

┌─less(toDate('2000-01-01'), toDateTime('2000-01-01 00:00:01', 'Europe/Moscow'))─┐
│                                                                              0 │
└────────────────────────────────────────────────────────────────────────────────┘

1 rows in set. Elapsed: 0.011 sec.

qoega-dev.sas.yp-c.yandex.net :) SELECT toDate('2000-01-01') < toDateTime('2000-01-01 00:00:01');

SELECT toDate('2000-01-01') < toDateTime('2000-01-01 00:00:01')

Query id: c2136446-a3a0-4567-a94e-68f40dc1f158

┌─less(toDate('2000-01-01'), toDateTime('2000-01-01 00:00:01'))─┐
│                                                             1 │
└───────────────────────────────────────────────────────────────┘

1 rows in set. Elapsed: 0.011 sec.
```
{
        DataTypes non_nothing_types;
        non_nothing_types.reserve(types.size());
        for (const auto & type : types)
            if (!typeid_cast<const DataTypeNothing *>(type.get()))
                non_nothing_types.emplace_back(type);
        if (non_nothing_types.size() < types.size())
            return getLeastSupertype(non_nothing_types);
    }
    
    {
        bool have_array = false;
        bool all_arrays = true;
        DataTypes nested_types;
        nested_types.reserve(types.size());
        for (const auto & type : types)
        {
            if (const DataTypeArray * type_array = typeid_cast<const DataTypeArray *>(type.get()))
            {
                have_array = true;
                nested_types.emplace_back(type_array->getNestedType());
            }
            else
                all_arrays = false;
        }
        if (have_array)
        {
            if (!all_arrays)
                throw Exception(getExceptionMessagePrefix(types) + " because some of them are Array and some of them are not", ErrorCodes::NO_COMMON_TYPE);
            return std::make_shared<DataTypeArray>(getLeastSupertype(nested_types));