nit0906 commented on a change in pull request #465:
URL: https://github.com/apache/jackrabbit-oak/pull/465#discussion_r787040369



##########
File path: 
oak-core/src/main/java/org/apache/jackrabbit/oak/query/ast/PropertyValueImpl.java
##########
@@ -125,12 +125,7 @@ public void restrict(FilterImpl f, Operator operator, 
PropertyValue v) {
                     f.restrictPath(v.getValue(Type.STRING), 
PathRestriction.EXACT);
                 }
             } else {
-                if (operator == Operator.NOT_EQUAL && v != null) {
-                    // "x <> 1" also means "x is not null"
-                    f.restrictProperty(pn, Operator.NOT_EQUAL, null, 
propertyType);

Review comment:
       Oh..I see.
   >And to me it seems there are not enough test cases in the property index, 
maybe.
   Yes, because no tests are failing with current changes.
   
   Also, I tried to add both the property restrictions i.e
   f.restrictProperty(pn, Operator.NOT_EQUAL, null, propertyType);
   and 
   f.restrictProperty(pn, operator, v, propertyType));
   
   But it seems that the FilterImpl only returns the first one when we try and 
get all the PropertyRestrictions for a given property, so only the first of the 
2 restrictions are honored.
   




-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]


Reply via email to