@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 
buf << ", " << applyVisitor(FieldVisitorToString(), (*func->getConstArg().column)[0]);
                }
            }
            buf << ")";
        }
    };
    WriteBufferFromOwnString buf;
    switch (function)
    {
        case FUNCTION_AND:
            return "and";
        case FUNCTION_OR:
            return "or";
        case FUNCTION_NOT:
            return "not";
        case FUNCTION_UNKNOWN:
            return "unknown";
        case FUNCTION_NOT_IN_SET:
        case FUNCTION_IN_SET:
        {
            buf << "(";
            print_wrapped_column(buf);
            buf << (function == FUNCTION_IN_SET ? " in " : " notIn ");
            if (!set_index)
                buf << "unknown size set";
            else
                buf << set_index->size() << "-element set";
            buf << ")";
            return buf.str();
        }