```sql
CREATE TABLE dt64test
(`dt64column` DateTime64(3))
ENGINE = MergeTree
PARTITION BY toYYYYMM(dt64column)
ORDER BY dt64column;

INSERT INTO dt64test  VALUES ('2020-01-13 13:37:00');

SELECT 1 FROM dt64test WHERE dt64column = toDateTime('2020-01-13 13:37:00');
DB::Exception: Key expression contains comparison between inconvertible types: DateTime64(3) and DateTime

SELECT 1 FROM dt64test WHERE dt64column = materialize(toDateTime('2020-01-13 13:37:00'));
┌─1─┐
│ 1 │
└───┘
```
{
    if (from.getType() == Field::Types::UInt64)
        return convertIntToDecimalType<UInt64>(from, type);
    if (from.getType() == Field::Types::Int64)
        return convertIntToDecimalType<Int64>(from, type);
    if (from.getType() == Field::Types::UInt128)
        return convertIntToDecimalType<UInt128>(from, type);
    if (from.getType() == Field::Types::Int128)
        return convertIntToDecimalType<Int128>(from, type);
    if (from.getType() == Field::Types::UInt256)
        return convertIntToDecimalType<UInt256>(from, type);
    if (from.getType() == Field::Types::Int256)
        return convertIntToDecimalType<Int256>(from, type);
    if (from.getType() == Field::Types::String)
        return convertStringToDecimalType(from, type);
    if (from.getType() == Field::Types::Decimal32)
        return convertDecimalToDecimalType<Decimal32>(from, type);
    if (from.getType() == Field::Types::Decimal64)
        return convertDecimalToDecimalType<Decimal64>(from, type);
    if (from.getType() == Field::Types::Decimal128)
        return convertDecimalToDecimalType<Decimal128>(from, type);
    throw Exception("Type mismatch in IN or VALUES section. Expected: " + type.getName() + ". Got: "
        + Field::Types::toString(from.getType()), ErrorCodes::TYPE_MISMATCH);
}
Field convertFieldToTypeImpl(const Field & src, const IDataType & type, const IDataType * from_type_hint)