**Describe the bug**
Under certain conditions the equals comparison between String and Date yields the wrong result. Range Comparisons with greather-than-equals returns the correct result set.

**How to reproduce**
* Which ClickHouse server version to use: 21.2.5.5 (latest at the time of this issue)
* Which interface to use, if matters: HTTP (but should not matter)

```sql
CREATE TABLE default.myTable (
	myDay Date,
	myOrder Int32,
	someData String
) 
ENGINE = ReplacingMergeTree
PARTITION BY floor(toYYYYMMDD(myDay), -1)
ORDER BY (myOrder)
;

INSERT INTO default.myTable (myDay, myOrder) VALUES ('2021-01-01', 1);
INSERT INTO default.myTable (myDay, myOrder) VALUES ('2021-01-02', 2); // This row should be returned
INSERT INTO default.myTable (myDay, myOrder) VALUES ('2021-01-03', 3);

SELECT * FROM default.myTable mt
WHERE myDay = '2021-01-02';
```

**Expected behavior**
The last query in the example should yield the marked row. Instead it returns a empty result set.

There must be a connection to the used `PARTITION KEY`. The issue fails to reproduce as soon as I do any changes to the `PARTITION KEY` setting.

if (strict)
        return false;
    
    String expr_name = node->getColumnName();
    const auto & sample_block = key_expr->getSampleBlock();
    if (!sample_block.has(expr_name))
        return false;
    
    if (out_value.isNull())
        return false;
    bool found_transformation = false;
    auto input_column = sample_block.getByName(expr_name);
    auto const_column = out_type->createColumnConst(1, out_value);
    out_value = (*castColumn({const_column, out_type, "c"}, input_column.type))[0];
    out_type = input_column.type;
    for (const auto & action : key_expr->getActions())
    {
        /** The key functional expression constraint may be inferred from a plain column in the expression.
          * For example, if the key contains `toStartOfHour(Timestamp)` and query contains `WHERE Timestamp >= now()`,
          * it can be assumed that if `toStartOfHour()` is monotonic on [now(), inf), the `toStartOfHour(Timestamp) >= toStartOfHour(now())`
          * condition also holds, so the index may be used to select only parts satisfying this condition.
          *
          * To check the assumption, we'd need to assert that the inverse function to this transformation is also monotonic, however the
          * inversion isn't exported (or even viable for not strictly monotonic functions such as `toStartOfHour()`).
          * Instead, we can qualify only functions that do not transform the range (for example rounding),
          * which while not strictly monotonic, are monotonic everywhere on the input range.
          */