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 │   │
└────────────┴───┴───┘
```

column_constraints[element.key_column] = Constraint::RANGE;
            }
            continue;
        }
        if (element.function == RPNElement::Function::FUNCTION_UNKNOWN)
        {
            continue;
        }
        return false;
    }
    auto min_constraint = column_constraints[0];
    if (min_constraint > Constraint::RANGE)
    {
        return false;
    }
    for (size_t i = 1; i < key_columns.size(); ++i)
    {
        if (column_constraints[i] < min_constraint)
        {
            return false;
        }
        if (column_constraints[i] == Constraint::RANGE && min_constraint == Constraint::RANGE)
        {
            return false;
        }
        min_constraint = column_constraints[i];
    }
    return true;
}
BoolMask KeyCondition::checkInHyperrectangle(