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

    https://github.com/apache/geode/pull/591#discussion_r122848112
  
    --- Diff: 
geode-core/src/main/java/org/apache/geode/cache/query/internal/CompiledSelect.java
 ---
    @@ -1415,11 +1413,7 @@ public boolean evaluateCq(ExecutionContext context) 
throws FunctionDomainExcepti
             // add UNDEFINED to results only for NOT EQUALS queries
             if (this.whereClause.getType() == COMPARISON) {
               int operator = ((Filter) this.whereClause).getOperator();
    -          if ((operator != TOK_NE && operator != TOK_NE_ALT)) {
    -            return false;
    -          } else {
    -            return true;
    -          }
    +          return !(operator != TOK_NE && operator != TOK_NE_ALT);
    --- End diff --
    
    That's a lot of negatives.  `return operator == TOK_NE || operator == 
TOK_NE_ALT` read better, in my opinion.


---
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 infrastruct...@apache.org or file a JIRA ticket
with INFRA.
---

Reply via email to