Github user twdsilva commented on a diff in the pull request:

    https://github.com/apache/phoenix/pull/200#discussion_r77291213
  
    --- Diff: 
phoenix-core/src/main/java/org/apache/phoenix/compile/ExpressionCompiler.java 
---
    @@ -517,8 +518,13 @@ public Expression visitLeave(LikeParseNode node, 
List<Expression> children) thro
                           return new 
ComparisonExpression(Arrays.asList(lhs,rhs), op);
                       }
                     }
    -            } else if (index == 0 && pattern.length() == 1) {
    -                return IsNullExpression.create(lhs, true, 
context.getTempPtr());
    +            } else {
    +                byte[] nullExpressionString = new byte[pattern.length()];
    +                byte[] wildcard = {StringUtil.MULTI_CHAR_LIKE};
    +                StringUtil.fill(nullExpressionString, 0, pattern.length(), 
wildcard, 0, 1, false);
    +                if (pattern.equals(new String (nullExpressionString))) {
    --- End diff --
    
    Can we just check if pattern equals StringUtil.MULTI_CHAR_LIKE here ?


---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at [email protected] or file a JIRA ticket
with INFRA.
---

Reply via email to