You are viewing a plain text version of this content. The canonical link for it is here.
Posted to oak-commits@jackrabbit.apache.org by th...@apache.org on 2014/12/08 14:09:44 UTC
svn commit: r1643804 -
/jackrabbit/oak/branches/1.0/oak-core/src/main/java/org/apache/jackrabbit/oak/query/ast/DescendantNodeJoinConditionImpl.java
Author: thomasm
Date: Mon Dec 8 13:09:43 2014
New Revision: 1643804
URL: http://svn.apache.org/r1643804
Log:
OAK-2320 Wrong optimization for joins with ISDESCENDANTNODE conditions
Modified:
jackrabbit/oak/branches/1.0/oak-core/src/main/java/org/apache/jackrabbit/oak/query/ast/DescendantNodeJoinConditionImpl.java
Modified: jackrabbit/oak/branches/1.0/oak-core/src/main/java/org/apache/jackrabbit/oak/query/ast/DescendantNodeJoinConditionImpl.java
URL: http://svn.apache.org/viewvc/jackrabbit/oak/branches/1.0/oak-core/src/main/java/org/apache/jackrabbit/oak/query/ast/DescendantNodeJoinConditionImpl.java?rev=1643804&r1=1643803&r2=1643804&view=diff
==============================================================================
--- jackrabbit/oak/branches/1.0/oak-core/src/main/java/org/apache/jackrabbit/oak/query/ast/DescendantNodeJoinConditionImpl.java (original)
+++ jackrabbit/oak/branches/1.0/oak-core/src/main/java/org/apache/jackrabbit/oak/query/ast/DescendantNodeJoinConditionImpl.java Mon Dec 8 13:09:43 2014
@@ -67,14 +67,8 @@ public class DescendantNodeJoinCondition
@Override
public void restrict(FilterImpl f) {
if (f.getSelector().equals(ancestorSelector)) {
- String d = descendantSelector.currentPath();
- if (d == null && f.isPreparing() && f.isPrepared(descendantSelector)) {
- // during the prepare phase, if the selector is already
- // prepared, then we would know the value
- f.restrictPath(KNOWN_PARENT_PATH, Filter.PathRestriction.PARENT);
- } else if (d != null) {
- f.restrictPath(PathUtils.getParentPath(d), Filter.PathRestriction.PARENT);
- }
+ // we ca not currently optimize this case,
+ // as we would need a path restriction of type "ALL_PARENTS".
}
if (f.getSelector().equals(descendantSelector)) {
String a = ancestorSelector.currentPath();