@zhyass and I found some codes may be incorrect in

https://github.com/ClickHouse/ClickHouse/blob/33ffe11d0397aa6904c246172223b1da1fbcf1cc/src/Storages/MergeTree/KeyCondition.cpp#L280-L297

It tries to extract fixed prefix from the like pattern to find the range, but it's wrong, A counterexample is ：

like_pattern  -> "a%c",  the prefix will be "a" and the range will be ` Range("a", true,"b", false)` yet the String "axxxxxd" still not match match this pattern (  axxxxxd not like a%c => true  ).

`Not like` is not the reverse of `Like` in continuous key ranges.

The only special case to work fine for "not like" to range is that string pattern ends with "%" or "_" , eg:    'a%', 'a\_'

cc @alexey-milovidov 
}
    };
    size_t left_args_count = 1;
    const auto * left_arg_tuple = left_arg->as<ASTFunction>();
    if (left_arg_tuple && left_arg_tuple->name == "tuple")
    {
        const auto & tuple_elements = left_arg_tuple->arguments->children;
        left_args_count = tuple_elements.size();
        for (size_t i = 0; i < left_args_count; ++i)
            get_key_tuple_position_mapping(tuple_elements[i], i);
    }
    else
        get_key_tuple_position_mapping(left_arg, 0);
    if (indexes_mapping.empty())
        return false;
    const ASTPtr & right_arg = args[1];
    SetPtr prepared_set;
    if (right_arg->as<ASTSubquery>() || right_arg->as<ASTTableIdentifier>())
    {
        auto set_it = prepared_sets.find(PreparedSetKey::forSubquery(*right_arg));
        if (set_it == prepared_sets.end())
            return false;
        prepared_set = set_it->second;
    }
    else
    {