thomasmueller commented on a change in pull request #465:
URL: https://github.com/apache/jackrabbit-oak/pull/465#discussion_r786910669
##########
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:
No, it might not work correctly... I think the property index
(incorrectly) relies on value to be "null" for the is-not-null condition, here:
ContentMirrorStoreStrategy
long count(Filter filter, NodeState root, NodeState indexMeta, final
String indexStorageNodeName,
Set<String> values, int max) {
NodeState index = indexMeta.getChildNode(indexStorageNodeName);
long count = -1;
if (values == null) {
// property is not null
Yes, it seems to be a bug in this index implementation. But it would no
longer work as it did work, I think. And to me it seems there are not enough
test cases in the property index, maybe.
--
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]