```
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.
```
return std::make_shared<DataTypeLowCardinality>(getLeastSupertype(nested_types));
        }
    }
    
    {
        bool have_nullable = false;
        DataTypes nested_types;
        nested_types.reserve(types.size());
        for (const auto & type : types)
        {
            if (const DataTypeNullable * type_nullable = typeid_cast<const DataTypeNullable *>(type.get()))
            {
                have_nullable = true;
                if (!type_nullable->onlyNull())
                    nested_types.emplace_back(type_nullable->getNestedType());
            }
            else
                nested_types.emplace_back(type);
        }
        if (have_nullable)
        {
            return std::make_shared<DataTypeNullable>(getLeastSupertype(nested_types));
        }
    }
    
    std::unordered_set<TypeIndex> type_ids;
    for (const auto & type : types)
        type_ids.insert(type->getTypeId());