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

const auto & children = action.node->children;
        if (action.node->type == ActionsDAG::ActionType::FUNCTION
            && children.size() == 1
            && children[0]->result_name == expr_name)
        {
            if (!action.node->function_base->hasInformationAboutMonotonicity())
                return false;
            
            IFunction::Monotonicity monotonicity = action.node->function_base->getMonotonicityForRange(*out_type, Field(), Field());
            if (!monotonicity.is_always_monotonic)
                return false;
            
            std::tie(out_value, out_type) = applyFunctionForFieldOfUnknownType(
                action.node->function_builder,
                out_type, out_value);
            expr_name = action.node->result_name;
            
            auto it = key_columns.find(expr_name);
            if (key_columns.end() != it)
            {
                out_key_column_num = it->second;
                out_key_column_type = sample_block.getByName(it->first).type;
                found_transformation = true;
                break;
            }
        }
    }
    return found_transformation;
}
bool KeyCondition::canConstantBeWrappedByFunctions(