21.5.1
```sql

create table test(d Date, k Int64, s String) 
Engine=MergeTree partition by (toYYYYMM(d),k) order by (d, k)

insert into test values ('2020-01-01', 1, '');
insert into test values ('2020-01-02', 1, '');

SELECT * FROM test WHERE d != '2020-01-01'
0 rows in set. Elapsed: 0.003 sec.


SELECT * FROM test WHERE identity(d) !=  '2020-01-01';
┌──────────d─┬─k─┬─s─┐
│ 2020-01-02 │ 1 │   │
└────────────┴───┴───┘

SELECT * FROM test WHERE toDate(d) != '2020-01-01';
┌──────────d─┬─k─┬─s─┐
│ 2020-01-02 │ 1 │   │
└────────────┴───┴───┘
```

: func->getMonotonicityForRange(*current_type.get(), key_range.left, key_range.right);
        if (!monotonicity.is_monotonic)
        {
            return {};
        }
        
        
        
        if (!key_range.left.isNull())
        {
            key_range.left = applyFunction(func, current_type, key_range.left);
            key_range.left_included = true;
        }
        if (!key_range.right.isNull())
        {
            key_range.right = applyFunction(func, current_type, key_range.right);
            key_range.right_included = true;
        }
        current_type = func->getResultType();
        if (!monotonicity.is_positive)
            key_range.swapLeftAndRight();
    }
    return key_range;
}
bool KeyCondition::matchesExactContinuousRange() const
{
    
    if (hasMonotonicFunctionsChain())
        return false;
    enum Constraint