jackrabbit-oak-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From thom...@apache.org
Subject svn commit: r1382008 [2/2] - in /jackrabbit/oak/trunk/oak-core/src: main/java/org/apache/jackrabbit/oak/query/ main/java/org/apache/jackrabbit/oak/query/ast/ test/java/org/apache/jackrabbit/oak/query/ test/resources/org/apache/jackrabbit/oak/query/
Date Fri, 07 Sep 2012 13:14:41 GMT
Modified: jackrabbit/oak/trunk/oak-core/src/test/resources/org/apache/jackrabbit/oak/query/sql2.txt
URL: http://svn.apache.org/viewvc/jackrabbit/oak/trunk/oak-core/src/test/resources/org/apache/jackrabbit/oak/query/sql2.txt?rev=1382008&r1=1382007&r2=1382008&view=diff
==============================================================================
--- jackrabbit/oak/trunk/oak-core/src/test/resources/org/apache/jackrabbit/oak/query/sql2.txt (original)
+++ jackrabbit/oak/trunk/oak-core/src/test/resources/org/apache/jackrabbit/oak/query/sql2.txt Fri Sep  7 13:14:40 2012
@@ -108,205 +108,9 @@ select * from [nt:base] as b where local
 /test/jcr:resource
 /test/resource
 
-select * from [nt:base] as x where isdescendantnode(x, '/')
+select * from [nt:base] as x where isdescendantnode(x, '/') and not isdescendantnode(x, '/jcr:system')
 /
 /jcr:system
-/jcr:system/jcr:activities
-/jcr:system/jcr:nodeTypes
-/jcr:system/jcr:nodeTypes/mix:created
-/jcr:system/jcr:nodeTypes/mix:created/jcr:propertyDefinition1
-/jcr:system/jcr:nodeTypes/mix:created/jcr:propertyDefinition2
-/jcr:system/jcr:nodeTypes/mix:etag
-/jcr:system/jcr:nodeTypes/mix:etag/jcr:propertyDefinition1
-/jcr:system/jcr:nodeTypes/mix:language
-/jcr:system/jcr:nodeTypes/mix:language/jcr:propertyDefinition1
-/jcr:system/jcr:nodeTypes/mix:lastModified
-/jcr:system/jcr:nodeTypes/mix:lastModified/jcr:propertyDefinition1
-/jcr:system/jcr:nodeTypes/mix:lastModified/jcr:propertyDefinition2
-/jcr:system/jcr:nodeTypes/mix:lifecycle
-/jcr:system/jcr:nodeTypes/mix:lifecycle/jcr:propertyDefinition1
-/jcr:system/jcr:nodeTypes/mix:lifecycle/jcr:propertyDefinition2
-/jcr:system/jcr:nodeTypes/mix:lockable
-/jcr:system/jcr:nodeTypes/mix:lockable/jcr:propertyDefinition1
-/jcr:system/jcr:nodeTypes/mix:lockable/jcr:propertyDefinition2
-/jcr:system/jcr:nodeTypes/mix:mimeType
-/jcr:system/jcr:nodeTypes/mix:mimeType/jcr:propertyDefinition1
-/jcr:system/jcr:nodeTypes/mix:mimeType/jcr:propertyDefinition2
-/jcr:system/jcr:nodeTypes/mix:referenceable
-/jcr:system/jcr:nodeTypes/mix:referenceable/jcr:propertyDefinition1
-/jcr:system/jcr:nodeTypes/mix:shareable
-/jcr:system/jcr:nodeTypes/mix:simpleVersionable
-/jcr:system/jcr:nodeTypes/mix:simpleVersionable/jcr:propertyDefinition1
-/jcr:system/jcr:nodeTypes/mix:title
-/jcr:system/jcr:nodeTypes/mix:title/jcr:propertyDefinition1
-/jcr:system/jcr:nodeTypes/mix:title/jcr:propertyDefinition2
-/jcr:system/jcr:nodeTypes/mix:versionable
-/jcr:system/jcr:nodeTypes/mix:versionable/jcr:propertyDefinition1
-/jcr:system/jcr:nodeTypes/mix:versionable/jcr:propertyDefinition2
-/jcr:system/jcr:nodeTypes/mix:versionable/jcr:propertyDefinition3
-/jcr:system/jcr:nodeTypes/mix:versionable/jcr:propertyDefinition4
-/jcr:system/jcr:nodeTypes/mix:versionable/jcr:propertyDefinition5
-/jcr:system/jcr:nodeTypes/mix:versionable/jcr:propertyDefinition6
-/jcr:system/jcr:nodeTypes/nt:activity
-/jcr:system/jcr:nodeTypes/nt:activity/jcr:propertyDefinition1
-/jcr:system/jcr:nodeTypes/nt:address
-/jcr:system/jcr:nodeTypes/nt:address/jcr:propertyDefinition1
-/jcr:system/jcr:nodeTypes/nt:address/jcr:propertyDefinition2
-/jcr:system/jcr:nodeTypes/nt:address/jcr:propertyDefinition3
-/jcr:system/jcr:nodeTypes/nt:address/jcr:propertyDefinition4
-/jcr:system/jcr:nodeTypes/nt:address/jcr:propertyDefinition5
-/jcr:system/jcr:nodeTypes/nt:address/jcr:propertyDefinition6
-/jcr:system/jcr:nodeTypes/nt:address/jcr:propertyDefinition7
-/jcr:system/jcr:nodeTypes/nt:base
-/jcr:system/jcr:nodeTypes/nt:base/jcr:propertyDefinition1
-/jcr:system/jcr:nodeTypes/nt:base/jcr:propertyDefinition2
-/jcr:system/jcr:nodeTypes/nt:childNodeDefinition
-/jcr:system/jcr:nodeTypes/nt:childNodeDefinition/jcr:propertyDefinition1
-/jcr:system/jcr:nodeTypes/nt:childNodeDefinition/jcr:propertyDefinition2
-/jcr:system/jcr:nodeTypes/nt:childNodeDefinition/jcr:propertyDefinition3
-/jcr:system/jcr:nodeTypes/nt:childNodeDefinition/jcr:propertyDefinition4
-/jcr:system/jcr:nodeTypes/nt:childNodeDefinition/jcr:propertyDefinition5
-/jcr:system/jcr:nodeTypes/nt:childNodeDefinition/jcr:propertyDefinition6
-/jcr:system/jcr:nodeTypes/nt:childNodeDefinition/jcr:propertyDefinition7
-/jcr:system/jcr:nodeTypes/nt:childNodeDefinition/jcr:propertyDefinition8
-/jcr:system/jcr:nodeTypes/nt:configuration
-/jcr:system/jcr:nodeTypes/nt:configuration/jcr:propertyDefinition1
-/jcr:system/jcr:nodeTypes/nt:file
-/jcr:system/jcr:nodeTypes/nt:file/jcr:childNodeDefinition1
-/jcr:system/jcr:nodeTypes/nt:folder
-/jcr:system/jcr:nodeTypes/nt:folder/jcr:childNodeDefinition1
-/jcr:system/jcr:nodeTypes/nt:frozenNode
-/jcr:system/jcr:nodeTypes/nt:frozenNode/jcr:childNodeDefinition1
-/jcr:system/jcr:nodeTypes/nt:frozenNode/jcr:propertyDefinition1
-/jcr:system/jcr:nodeTypes/nt:frozenNode/jcr:propertyDefinition2
-/jcr:system/jcr:nodeTypes/nt:frozenNode/jcr:propertyDefinition3
-/jcr:system/jcr:nodeTypes/nt:frozenNode/jcr:propertyDefinition4
-/jcr:system/jcr:nodeTypes/nt:frozenNode/jcr:propertyDefinition5
-/jcr:system/jcr:nodeTypes/nt:hierarchyNode
-/jcr:system/jcr:nodeTypes/nt:linkedFile
-/jcr:system/jcr:nodeTypes/nt:linkedFile/jcr:propertyDefinition1
-/jcr:system/jcr:nodeTypes/nt:nodeType
-/jcr:system/jcr:nodeTypes/nt:nodeType/jcr:childNodeDefinition1
-/jcr:system/jcr:nodeTypes/nt:nodeType/jcr:childNodeDefinition2
-/jcr:system/jcr:nodeTypes/nt:nodeType/jcr:propertyDefinition1
-/jcr:system/jcr:nodeTypes/nt:nodeType/jcr:propertyDefinition2
-/jcr:system/jcr:nodeTypes/nt:nodeType/jcr:propertyDefinition3
-/jcr:system/jcr:nodeTypes/nt:nodeType/jcr:propertyDefinition4
-/jcr:system/jcr:nodeTypes/nt:nodeType/jcr:propertyDefinition5
-/jcr:system/jcr:nodeTypes/nt:nodeType/jcr:propertyDefinition6
-/jcr:system/jcr:nodeTypes/nt:nodeType/jcr:propertyDefinition7
-/jcr:system/jcr:nodeTypes/nt:propertyDefinition
-/jcr:system/jcr:nodeTypes/nt:propertyDefinition/jcr:propertyDefinition1
-/jcr:system/jcr:nodeTypes/nt:propertyDefinition/jcr:propertyDefinition10
-/jcr:system/jcr:nodeTypes/nt:propertyDefinition/jcr:propertyDefinition11
-/jcr:system/jcr:nodeTypes/nt:propertyDefinition/jcr:propertyDefinition12
-/jcr:system/jcr:nodeTypes/nt:propertyDefinition/jcr:propertyDefinition2
-/jcr:system/jcr:nodeTypes/nt:propertyDefinition/jcr:propertyDefinition3
-/jcr:system/jcr:nodeTypes/nt:propertyDefinition/jcr:propertyDefinition4
-/jcr:system/jcr:nodeTypes/nt:propertyDefinition/jcr:propertyDefinition5
-/jcr:system/jcr:nodeTypes/nt:propertyDefinition/jcr:propertyDefinition6
-/jcr:system/jcr:nodeTypes/nt:propertyDefinition/jcr:propertyDefinition7
-/jcr:system/jcr:nodeTypes/nt:propertyDefinition/jcr:propertyDefinition8
-/jcr:system/jcr:nodeTypes/nt:propertyDefinition/jcr:propertyDefinition9
-/jcr:system/jcr:nodeTypes/nt:query
-/jcr:system/jcr:nodeTypes/nt:query/jcr:propertyDefinition1
-/jcr:system/jcr:nodeTypes/nt:query/jcr:propertyDefinition2
-/jcr:system/jcr:nodeTypes/nt:resource
-/jcr:system/jcr:nodeTypes/nt:resource/jcr:propertyDefinition1
-/jcr:system/jcr:nodeTypes/nt:unstructured
-/jcr:system/jcr:nodeTypes/nt:unstructured/jcr:childNodeDefinition1
-/jcr:system/jcr:nodeTypes/nt:unstructured/jcr:propertyDefinition1
-/jcr:system/jcr:nodeTypes/nt:unstructured/jcr:propertyDefinition2
-/jcr:system/jcr:nodeTypes/nt:version
-/jcr:system/jcr:nodeTypes/nt:version/jcr:childNodeDefinition1
-/jcr:system/jcr:nodeTypes/nt:version/jcr:propertyDefinition1
-/jcr:system/jcr:nodeTypes/nt:version/jcr:propertyDefinition2
-/jcr:system/jcr:nodeTypes/nt:version/jcr:propertyDefinition3
-/jcr:system/jcr:nodeTypes/nt:version/jcr:propertyDefinition4
-/jcr:system/jcr:nodeTypes/nt:versionHistory
-/jcr:system/jcr:nodeTypes/nt:versionHistory/jcr:childNodeDefinition1
-/jcr:system/jcr:nodeTypes/nt:versionHistory/jcr:childNodeDefinition2
-/jcr:system/jcr:nodeTypes/nt:versionHistory/jcr:childNodeDefinition3
-/jcr:system/jcr:nodeTypes/nt:versionHistory/jcr:propertyDefinition1
-/jcr:system/jcr:nodeTypes/nt:versionHistory/jcr:propertyDefinition2
-/jcr:system/jcr:nodeTypes/nt:versionLabels
-/jcr:system/jcr:nodeTypes/nt:versionLabels/jcr:propertyDefinition1
-/jcr:system/jcr:nodeTypes/nt:versionedChild
-/jcr:system/jcr:nodeTypes/nt:versionedChild/jcr:propertyDefinition1
-/jcr:system/jcr:nodeTypes/rep:ACE
-/jcr:system/jcr:nodeTypes/rep:ACE/jcr:propertyDefinition1
-/jcr:system/jcr:nodeTypes/rep:ACE/jcr:propertyDefinition2
-/jcr:system/jcr:nodeTypes/rep:ACE/jcr:propertyDefinition3
-/jcr:system/jcr:nodeTypes/rep:ACE/jcr:propertyDefinition4
-/jcr:system/jcr:nodeTypes/rep:ACE/jcr:propertyDefinition5
-/jcr:system/jcr:nodeTypes/rep:ACL
-/jcr:system/jcr:nodeTypes/rep:ACL/jcr:childNodeDefinition1
-/jcr:system/jcr:nodeTypes/rep:AccessControl
-/jcr:system/jcr:nodeTypes/rep:AccessControl/jcr:childNodeDefinition1
-/jcr:system/jcr:nodeTypes/rep:AccessControl/jcr:childNodeDefinition2
-/jcr:system/jcr:nodeTypes/rep:AccessControllable
-/jcr:system/jcr:nodeTypes/rep:AccessControllable/jcr:childNodeDefinition1
-/jcr:system/jcr:nodeTypes/rep:Activities
-/jcr:system/jcr:nodeTypes/rep:Activities/jcr:childNodeDefinition1
-/jcr:system/jcr:nodeTypes/rep:Activities/jcr:childNodeDefinition2
-/jcr:system/jcr:nodeTypes/rep:Authorizable
-/jcr:system/jcr:nodeTypes/rep:Authorizable/jcr:childNodeDefinition1
-/jcr:system/jcr:nodeTypes/rep:Authorizable/jcr:propertyDefinition1
-/jcr:system/jcr:nodeTypes/rep:Authorizable/jcr:propertyDefinition2
-/jcr:system/jcr:nodeTypes/rep:Authorizable/jcr:propertyDefinition3
-/jcr:system/jcr:nodeTypes/rep:Authorizable/jcr:propertyDefinition4
-/jcr:system/jcr:nodeTypes/rep:AuthorizableFolder
-/jcr:system/jcr:nodeTypes/rep:AuthorizableFolder/jcr:childNodeDefinition1
-/jcr:system/jcr:nodeTypes/rep:AuthorizableFolder/jcr:childNodeDefinition2
-/jcr:system/jcr:nodeTypes/rep:Configurations
-/jcr:system/jcr:nodeTypes/rep:Configurations/jcr:childNodeDefinition1
-/jcr:system/jcr:nodeTypes/rep:Configurations/jcr:childNodeDefinition2
-/jcr:system/jcr:nodeTypes/rep:DenyACE
-/jcr:system/jcr:nodeTypes/rep:GrantACE
-/jcr:system/jcr:nodeTypes/rep:Group
-/jcr:system/jcr:nodeTypes/rep:Group/jcr:childNodeDefinition1
-/jcr:system/jcr:nodeTypes/rep:Group/jcr:propertyDefinition1
-/jcr:system/jcr:nodeTypes/rep:Impersonatable
-/jcr:system/jcr:nodeTypes/rep:Impersonatable/jcr:propertyDefinition1
-/jcr:system/jcr:nodeTypes/rep:Members
-/jcr:system/jcr:nodeTypes/rep:Members/jcr:childNodeDefinition1
-/jcr:system/jcr:nodeTypes/rep:Members/jcr:propertyDefinition1
-/jcr:system/jcr:nodeTypes/rep:MergeConflict
-/jcr:system/jcr:nodeTypes/rep:MergeConflict/jcr:childNodeDefinition1
-/jcr:system/jcr:nodeTypes/rep:Policy
-/jcr:system/jcr:nodeTypes/rep:PrincipalAccessControl
-/jcr:system/jcr:nodeTypes/rep:PrincipalAccessControl/jcr:childNodeDefinition1
-/jcr:system/jcr:nodeTypes/rep:Privilege
-/jcr:system/jcr:nodeTypes/rep:Privilege/jcr:propertyDefinition1
-/jcr:system/jcr:nodeTypes/rep:Privilege/jcr:propertyDefinition2
-/jcr:system/jcr:nodeTypes/rep:Privileges
-/jcr:system/jcr:nodeTypes/rep:Privileges/jcr:childNodeDefinition1
-/jcr:system/jcr:nodeTypes/rep:RepoAccessControllable
-/jcr:system/jcr:nodeTypes/rep:RepoAccessControllable/jcr:childNodeDefinition1
-/jcr:system/jcr:nodeTypes/rep:RetentionManageable
-/jcr:system/jcr:nodeTypes/rep:RetentionManageable/jcr:propertyDefinition1
-/jcr:system/jcr:nodeTypes/rep:RetentionManageable/jcr:propertyDefinition2
-/jcr:system/jcr:nodeTypes/rep:User
-/jcr:system/jcr:nodeTypes/rep:User/jcr:propertyDefinition1
-/jcr:system/jcr:nodeTypes/rep:User/jcr:propertyDefinition2
-/jcr:system/jcr:nodeTypes/rep:VersionReference
-/jcr:system/jcr:nodeTypes/rep:VersionReference/jcr:propertyDefinition1
-/jcr:system/jcr:nodeTypes/rep:nodeTypes
-/jcr:system/jcr:nodeTypes/rep:nodeTypes/jcr:childNodeDefinition1
-/jcr:system/jcr:nodeTypes/rep:root
-/jcr:system/jcr:nodeTypes/rep:root/jcr:childNodeDefinition1
-/jcr:system/jcr:nodeTypes/rep:system
-/jcr:system/jcr:nodeTypes/rep:system/jcr:childNodeDefinition1
-/jcr:system/jcr:nodeTypes/rep:system/jcr:childNodeDefinition2
-/jcr:system/jcr:nodeTypes/rep:system/jcr:childNodeDefinition3
-/jcr:system/jcr:nodeTypes/rep:system/jcr:childNodeDefinition4
-/jcr:system/jcr:nodeTypes/rep:system/jcr:childNodeDefinition5
-/jcr:system/jcr:nodeTypes/rep:system/jcr:childNodeDefinition6
-/jcr:system/jcr:nodeTypes/rep:versionStorage
-/jcr:system/jcr:nodeTypes/rep:versionStorage/jcr:childNodeDefinition1
-/jcr:system/jcr:nodeTypes/rep:versionStorage/jcr:childNodeDefinition2
-/jcr:system/jcr:versionStorage
-/jcr:system/rep:privileges
 /oak-index
 /oak-index/indexes
 /test
@@ -340,6 +144,9 @@ select * from [nt:base] as p inner join 
 /parents, /parents/p1
 /parents, /parents/p2
 
+explain select * from [nt:base] as p inner join [nt:base] as p2 on issamenode(p2, p) where p.[jcr:path] = '/parents'
+[nt:base] as p /* traverse "//*" where p.jcr:path = cast('/parents' as string) */ inner join [nt:base] as p2 /* traverse "" */ on issamenode(p2, p, [.])
+
 select * from [nt:base] as p inner join [nt:base] as p2 on issamenode(p2, p) where p.[jcr:path] = '/parents'
 /parents, /parents
 
@@ -353,26 +160,54 @@ select id from [nt:base] where id is not
 1
 0
 
-select * from [nt:base] as c right outer join [nt:base] as p on p.id = c.p where p.id is not null
+measure select * from [nt:base] as c right outer join [nt:base] as p on p.id = c.p where p.id is not null and not isdescendantnode(p, '/jcr:system')
+c, 630
+p, 210
+query, 4
+
+select * from [nt:base] as c right outer join [nt:base] as p on p.id = c.p where p.id is not null and not isdescendantnode(p, '/jcr:system')
 /children/c1, /parents/p1
 /children/c2, /parents/p1
 /children/c3, /parents/p2
 null, /parents/p0
 
+measure select * from [nt:base] as p left outer join [nt:base] as c on p.id = c.p where p.id is not null
+c, 630
+p, 210
+query, 4
+
 select * from [nt:base] as p left outer join [nt:base] as c on p.id = c.p where p.id is not null
 /parents/p0, null
 /parents/p1, /children/c1
 /parents/p1, /children/c2
 /parents/p2, /children/c3
 
+measure select * from [nt:base] as p left outer join [nt:base] as c on p.id = c.p where p.id is not null and c.p is null
+c, 630
+p, 210
+query, 1
+
 select * from [nt:base] as p left outer join [nt:base] as c on p.id = c.p where p.id is not null and c.p is null
 /parents/p0, null
 
+measure select * from [nt:base] as p left outer join [nt:base] as c on p.id = c.p where p.id is not null and c.p is not null
+c, 630
+p, 210
+query, 3
+
 select * from [nt:base] as p left outer join [nt:base] as c on p.id = c.p where p.id is not null and c.p is not null
 /parents/p1, /children/c1
 /parents/p1, /children/c2
 /parents/p2, /children/c3
 
+explain select * from [nt:base] as p inner join [nt:base] as c on p.id = c.p
+[nt:base] as p /* traverse "//*" where p.id is not null */ inner join [nt:base] as c /* traverse "//*" where c.p is not null */ on p.id = c.p
+
+measure select * from [nt:base] as p inner join [nt:base] as c on p.id = c.p
+c, 630
+p, 210
+query, 3
+
 select * from [nt:base] as p inner join [nt:base] as c on p.id = c.p
 /parents/p1, /children/c1
 /parents/p1, /children/c2
@@ -384,205 +219,9 @@ commit / - "children"
 commit / + "test": { "hello": { "x": "1" }, "world": { "x": "2" } }
 commit / + "test2": { "id":"1", "x": "2" }
 
-select * from [nt:base]
+select * from [nt:base] where not isdescendantnode('/jcr:system')
 /
 /jcr:system
-/jcr:system/jcr:activities
-/jcr:system/jcr:nodeTypes
-/jcr:system/jcr:nodeTypes/mix:created
-/jcr:system/jcr:nodeTypes/mix:created/jcr:propertyDefinition1
-/jcr:system/jcr:nodeTypes/mix:created/jcr:propertyDefinition2
-/jcr:system/jcr:nodeTypes/mix:etag
-/jcr:system/jcr:nodeTypes/mix:etag/jcr:propertyDefinition1
-/jcr:system/jcr:nodeTypes/mix:language
-/jcr:system/jcr:nodeTypes/mix:language/jcr:propertyDefinition1
-/jcr:system/jcr:nodeTypes/mix:lastModified
-/jcr:system/jcr:nodeTypes/mix:lastModified/jcr:propertyDefinition1
-/jcr:system/jcr:nodeTypes/mix:lastModified/jcr:propertyDefinition2
-/jcr:system/jcr:nodeTypes/mix:lifecycle
-/jcr:system/jcr:nodeTypes/mix:lifecycle/jcr:propertyDefinition1
-/jcr:system/jcr:nodeTypes/mix:lifecycle/jcr:propertyDefinition2
-/jcr:system/jcr:nodeTypes/mix:lockable
-/jcr:system/jcr:nodeTypes/mix:lockable/jcr:propertyDefinition1
-/jcr:system/jcr:nodeTypes/mix:lockable/jcr:propertyDefinition2
-/jcr:system/jcr:nodeTypes/mix:mimeType
-/jcr:system/jcr:nodeTypes/mix:mimeType/jcr:propertyDefinition1
-/jcr:system/jcr:nodeTypes/mix:mimeType/jcr:propertyDefinition2
-/jcr:system/jcr:nodeTypes/mix:referenceable
-/jcr:system/jcr:nodeTypes/mix:referenceable/jcr:propertyDefinition1
-/jcr:system/jcr:nodeTypes/mix:shareable
-/jcr:system/jcr:nodeTypes/mix:simpleVersionable
-/jcr:system/jcr:nodeTypes/mix:simpleVersionable/jcr:propertyDefinition1
-/jcr:system/jcr:nodeTypes/mix:title
-/jcr:system/jcr:nodeTypes/mix:title/jcr:propertyDefinition1
-/jcr:system/jcr:nodeTypes/mix:title/jcr:propertyDefinition2
-/jcr:system/jcr:nodeTypes/mix:versionable
-/jcr:system/jcr:nodeTypes/mix:versionable/jcr:propertyDefinition1
-/jcr:system/jcr:nodeTypes/mix:versionable/jcr:propertyDefinition2
-/jcr:system/jcr:nodeTypes/mix:versionable/jcr:propertyDefinition3
-/jcr:system/jcr:nodeTypes/mix:versionable/jcr:propertyDefinition4
-/jcr:system/jcr:nodeTypes/mix:versionable/jcr:propertyDefinition5
-/jcr:system/jcr:nodeTypes/mix:versionable/jcr:propertyDefinition6
-/jcr:system/jcr:nodeTypes/nt:activity
-/jcr:system/jcr:nodeTypes/nt:activity/jcr:propertyDefinition1
-/jcr:system/jcr:nodeTypes/nt:address
-/jcr:system/jcr:nodeTypes/nt:address/jcr:propertyDefinition1
-/jcr:system/jcr:nodeTypes/nt:address/jcr:propertyDefinition2
-/jcr:system/jcr:nodeTypes/nt:address/jcr:propertyDefinition3
-/jcr:system/jcr:nodeTypes/nt:address/jcr:propertyDefinition4
-/jcr:system/jcr:nodeTypes/nt:address/jcr:propertyDefinition5
-/jcr:system/jcr:nodeTypes/nt:address/jcr:propertyDefinition6
-/jcr:system/jcr:nodeTypes/nt:address/jcr:propertyDefinition7
-/jcr:system/jcr:nodeTypes/nt:base
-/jcr:system/jcr:nodeTypes/nt:base/jcr:propertyDefinition1
-/jcr:system/jcr:nodeTypes/nt:base/jcr:propertyDefinition2
-/jcr:system/jcr:nodeTypes/nt:childNodeDefinition
-/jcr:system/jcr:nodeTypes/nt:childNodeDefinition/jcr:propertyDefinition1
-/jcr:system/jcr:nodeTypes/nt:childNodeDefinition/jcr:propertyDefinition2
-/jcr:system/jcr:nodeTypes/nt:childNodeDefinition/jcr:propertyDefinition3
-/jcr:system/jcr:nodeTypes/nt:childNodeDefinition/jcr:propertyDefinition4
-/jcr:system/jcr:nodeTypes/nt:childNodeDefinition/jcr:propertyDefinition5
-/jcr:system/jcr:nodeTypes/nt:childNodeDefinition/jcr:propertyDefinition6
-/jcr:system/jcr:nodeTypes/nt:childNodeDefinition/jcr:propertyDefinition7
-/jcr:system/jcr:nodeTypes/nt:childNodeDefinition/jcr:propertyDefinition8
-/jcr:system/jcr:nodeTypes/nt:configuration
-/jcr:system/jcr:nodeTypes/nt:configuration/jcr:propertyDefinition1
-/jcr:system/jcr:nodeTypes/nt:file
-/jcr:system/jcr:nodeTypes/nt:file/jcr:childNodeDefinition1
-/jcr:system/jcr:nodeTypes/nt:folder
-/jcr:system/jcr:nodeTypes/nt:folder/jcr:childNodeDefinition1
-/jcr:system/jcr:nodeTypes/nt:frozenNode
-/jcr:system/jcr:nodeTypes/nt:frozenNode/jcr:childNodeDefinition1
-/jcr:system/jcr:nodeTypes/nt:frozenNode/jcr:propertyDefinition1
-/jcr:system/jcr:nodeTypes/nt:frozenNode/jcr:propertyDefinition2
-/jcr:system/jcr:nodeTypes/nt:frozenNode/jcr:propertyDefinition3
-/jcr:system/jcr:nodeTypes/nt:frozenNode/jcr:propertyDefinition4
-/jcr:system/jcr:nodeTypes/nt:frozenNode/jcr:propertyDefinition5
-/jcr:system/jcr:nodeTypes/nt:hierarchyNode
-/jcr:system/jcr:nodeTypes/nt:linkedFile
-/jcr:system/jcr:nodeTypes/nt:linkedFile/jcr:propertyDefinition1
-/jcr:system/jcr:nodeTypes/nt:nodeType
-/jcr:system/jcr:nodeTypes/nt:nodeType/jcr:childNodeDefinition1
-/jcr:system/jcr:nodeTypes/nt:nodeType/jcr:childNodeDefinition2
-/jcr:system/jcr:nodeTypes/nt:nodeType/jcr:propertyDefinition1
-/jcr:system/jcr:nodeTypes/nt:nodeType/jcr:propertyDefinition2
-/jcr:system/jcr:nodeTypes/nt:nodeType/jcr:propertyDefinition3
-/jcr:system/jcr:nodeTypes/nt:nodeType/jcr:propertyDefinition4
-/jcr:system/jcr:nodeTypes/nt:nodeType/jcr:propertyDefinition5
-/jcr:system/jcr:nodeTypes/nt:nodeType/jcr:propertyDefinition6
-/jcr:system/jcr:nodeTypes/nt:nodeType/jcr:propertyDefinition7
-/jcr:system/jcr:nodeTypes/nt:propertyDefinition
-/jcr:system/jcr:nodeTypes/nt:propertyDefinition/jcr:propertyDefinition1
-/jcr:system/jcr:nodeTypes/nt:propertyDefinition/jcr:propertyDefinition10
-/jcr:system/jcr:nodeTypes/nt:propertyDefinition/jcr:propertyDefinition11
-/jcr:system/jcr:nodeTypes/nt:propertyDefinition/jcr:propertyDefinition12
-/jcr:system/jcr:nodeTypes/nt:propertyDefinition/jcr:propertyDefinition2
-/jcr:system/jcr:nodeTypes/nt:propertyDefinition/jcr:propertyDefinition3
-/jcr:system/jcr:nodeTypes/nt:propertyDefinition/jcr:propertyDefinition4
-/jcr:system/jcr:nodeTypes/nt:propertyDefinition/jcr:propertyDefinition5
-/jcr:system/jcr:nodeTypes/nt:propertyDefinition/jcr:propertyDefinition6
-/jcr:system/jcr:nodeTypes/nt:propertyDefinition/jcr:propertyDefinition7
-/jcr:system/jcr:nodeTypes/nt:propertyDefinition/jcr:propertyDefinition8
-/jcr:system/jcr:nodeTypes/nt:propertyDefinition/jcr:propertyDefinition9
-/jcr:system/jcr:nodeTypes/nt:query
-/jcr:system/jcr:nodeTypes/nt:query/jcr:propertyDefinition1
-/jcr:system/jcr:nodeTypes/nt:query/jcr:propertyDefinition2
-/jcr:system/jcr:nodeTypes/nt:resource
-/jcr:system/jcr:nodeTypes/nt:resource/jcr:propertyDefinition1
-/jcr:system/jcr:nodeTypes/nt:unstructured
-/jcr:system/jcr:nodeTypes/nt:unstructured/jcr:childNodeDefinition1
-/jcr:system/jcr:nodeTypes/nt:unstructured/jcr:propertyDefinition1
-/jcr:system/jcr:nodeTypes/nt:unstructured/jcr:propertyDefinition2
-/jcr:system/jcr:nodeTypes/nt:version
-/jcr:system/jcr:nodeTypes/nt:version/jcr:childNodeDefinition1
-/jcr:system/jcr:nodeTypes/nt:version/jcr:propertyDefinition1
-/jcr:system/jcr:nodeTypes/nt:version/jcr:propertyDefinition2
-/jcr:system/jcr:nodeTypes/nt:version/jcr:propertyDefinition3
-/jcr:system/jcr:nodeTypes/nt:version/jcr:propertyDefinition4
-/jcr:system/jcr:nodeTypes/nt:versionHistory
-/jcr:system/jcr:nodeTypes/nt:versionHistory/jcr:childNodeDefinition1
-/jcr:system/jcr:nodeTypes/nt:versionHistory/jcr:childNodeDefinition2
-/jcr:system/jcr:nodeTypes/nt:versionHistory/jcr:childNodeDefinition3
-/jcr:system/jcr:nodeTypes/nt:versionHistory/jcr:propertyDefinition1
-/jcr:system/jcr:nodeTypes/nt:versionHistory/jcr:propertyDefinition2
-/jcr:system/jcr:nodeTypes/nt:versionLabels
-/jcr:system/jcr:nodeTypes/nt:versionLabels/jcr:propertyDefinition1
-/jcr:system/jcr:nodeTypes/nt:versionedChild
-/jcr:system/jcr:nodeTypes/nt:versionedChild/jcr:propertyDefinition1
-/jcr:system/jcr:nodeTypes/rep:ACE
-/jcr:system/jcr:nodeTypes/rep:ACE/jcr:propertyDefinition1
-/jcr:system/jcr:nodeTypes/rep:ACE/jcr:propertyDefinition2
-/jcr:system/jcr:nodeTypes/rep:ACE/jcr:propertyDefinition3
-/jcr:system/jcr:nodeTypes/rep:ACE/jcr:propertyDefinition4
-/jcr:system/jcr:nodeTypes/rep:ACE/jcr:propertyDefinition5
-/jcr:system/jcr:nodeTypes/rep:ACL
-/jcr:system/jcr:nodeTypes/rep:ACL/jcr:childNodeDefinition1
-/jcr:system/jcr:nodeTypes/rep:AccessControl
-/jcr:system/jcr:nodeTypes/rep:AccessControl/jcr:childNodeDefinition1
-/jcr:system/jcr:nodeTypes/rep:AccessControl/jcr:childNodeDefinition2
-/jcr:system/jcr:nodeTypes/rep:AccessControllable
-/jcr:system/jcr:nodeTypes/rep:AccessControllable/jcr:childNodeDefinition1
-/jcr:system/jcr:nodeTypes/rep:Activities
-/jcr:system/jcr:nodeTypes/rep:Activities/jcr:childNodeDefinition1
-/jcr:system/jcr:nodeTypes/rep:Activities/jcr:childNodeDefinition2
-/jcr:system/jcr:nodeTypes/rep:Authorizable
-/jcr:system/jcr:nodeTypes/rep:Authorizable/jcr:childNodeDefinition1
-/jcr:system/jcr:nodeTypes/rep:Authorizable/jcr:propertyDefinition1
-/jcr:system/jcr:nodeTypes/rep:Authorizable/jcr:propertyDefinition2
-/jcr:system/jcr:nodeTypes/rep:Authorizable/jcr:propertyDefinition3
-/jcr:system/jcr:nodeTypes/rep:Authorizable/jcr:propertyDefinition4
-/jcr:system/jcr:nodeTypes/rep:AuthorizableFolder
-/jcr:system/jcr:nodeTypes/rep:AuthorizableFolder/jcr:childNodeDefinition1
-/jcr:system/jcr:nodeTypes/rep:AuthorizableFolder/jcr:childNodeDefinition2
-/jcr:system/jcr:nodeTypes/rep:Configurations
-/jcr:system/jcr:nodeTypes/rep:Configurations/jcr:childNodeDefinition1
-/jcr:system/jcr:nodeTypes/rep:Configurations/jcr:childNodeDefinition2
-/jcr:system/jcr:nodeTypes/rep:DenyACE
-/jcr:system/jcr:nodeTypes/rep:GrantACE
-/jcr:system/jcr:nodeTypes/rep:Group
-/jcr:system/jcr:nodeTypes/rep:Group/jcr:childNodeDefinition1
-/jcr:system/jcr:nodeTypes/rep:Group/jcr:propertyDefinition1
-/jcr:system/jcr:nodeTypes/rep:Impersonatable
-/jcr:system/jcr:nodeTypes/rep:Impersonatable/jcr:propertyDefinition1
-/jcr:system/jcr:nodeTypes/rep:Members
-/jcr:system/jcr:nodeTypes/rep:Members/jcr:childNodeDefinition1
-/jcr:system/jcr:nodeTypes/rep:Members/jcr:propertyDefinition1
-/jcr:system/jcr:nodeTypes/rep:MergeConflict
-/jcr:system/jcr:nodeTypes/rep:MergeConflict/jcr:childNodeDefinition1
-/jcr:system/jcr:nodeTypes/rep:Policy
-/jcr:system/jcr:nodeTypes/rep:PrincipalAccessControl
-/jcr:system/jcr:nodeTypes/rep:PrincipalAccessControl/jcr:childNodeDefinition1
-/jcr:system/jcr:nodeTypes/rep:Privilege
-/jcr:system/jcr:nodeTypes/rep:Privilege/jcr:propertyDefinition1
-/jcr:system/jcr:nodeTypes/rep:Privilege/jcr:propertyDefinition2
-/jcr:system/jcr:nodeTypes/rep:Privileges
-/jcr:system/jcr:nodeTypes/rep:Privileges/jcr:childNodeDefinition1
-/jcr:system/jcr:nodeTypes/rep:RepoAccessControllable
-/jcr:system/jcr:nodeTypes/rep:RepoAccessControllable/jcr:childNodeDefinition1
-/jcr:system/jcr:nodeTypes/rep:RetentionManageable
-/jcr:system/jcr:nodeTypes/rep:RetentionManageable/jcr:propertyDefinition1
-/jcr:system/jcr:nodeTypes/rep:RetentionManageable/jcr:propertyDefinition2
-/jcr:system/jcr:nodeTypes/rep:User
-/jcr:system/jcr:nodeTypes/rep:User/jcr:propertyDefinition1
-/jcr:system/jcr:nodeTypes/rep:User/jcr:propertyDefinition2
-/jcr:system/jcr:nodeTypes/rep:VersionReference
-/jcr:system/jcr:nodeTypes/rep:VersionReference/jcr:propertyDefinition1
-/jcr:system/jcr:nodeTypes/rep:nodeTypes
-/jcr:system/jcr:nodeTypes/rep:nodeTypes/jcr:childNodeDefinition1
-/jcr:system/jcr:nodeTypes/rep:root
-/jcr:system/jcr:nodeTypes/rep:root/jcr:childNodeDefinition1
-/jcr:system/jcr:nodeTypes/rep:system
-/jcr:system/jcr:nodeTypes/rep:system/jcr:childNodeDefinition1
-/jcr:system/jcr:nodeTypes/rep:system/jcr:childNodeDefinition2
-/jcr:system/jcr:nodeTypes/rep:system/jcr:childNodeDefinition3
-/jcr:system/jcr:nodeTypes/rep:system/jcr:childNodeDefinition4
-/jcr:system/jcr:nodeTypes/rep:system/jcr:childNodeDefinition5
-/jcr:system/jcr:nodeTypes/rep:system/jcr:childNodeDefinition6
-/jcr:system/jcr:nodeTypes/rep:versionStorage
-/jcr:system/jcr:nodeTypes/rep:versionStorage/jcr:childNodeDefinition1
-/jcr:system/jcr:nodeTypes/rep:versionStorage/jcr:childNodeDefinition2
-/jcr:system/jcr:versionStorage
-/jcr:system/rep:privileges
 /oak-index
 /oak-index/indexes
 /test
@@ -600,409 +239,17 @@ select * from [nt:base] where id = '1' o
 /test/world
 /test2
 
-select * from [nt:base] where not (id = '1' or x = '2')
+select * from [nt:base] where not (id = '1' or x = '2') and not isdescendantnode('/jcr:system')
 /
 /jcr:system
-/jcr:system/jcr:activities
-/jcr:system/jcr:nodeTypes
-/jcr:system/jcr:nodeTypes/mix:created
-/jcr:system/jcr:nodeTypes/mix:created/jcr:propertyDefinition1
-/jcr:system/jcr:nodeTypes/mix:created/jcr:propertyDefinition2
-/jcr:system/jcr:nodeTypes/mix:etag
-/jcr:system/jcr:nodeTypes/mix:etag/jcr:propertyDefinition1
-/jcr:system/jcr:nodeTypes/mix:language
-/jcr:system/jcr:nodeTypes/mix:language/jcr:propertyDefinition1
-/jcr:system/jcr:nodeTypes/mix:lastModified
-/jcr:system/jcr:nodeTypes/mix:lastModified/jcr:propertyDefinition1
-/jcr:system/jcr:nodeTypes/mix:lastModified/jcr:propertyDefinition2
-/jcr:system/jcr:nodeTypes/mix:lifecycle
-/jcr:system/jcr:nodeTypes/mix:lifecycle/jcr:propertyDefinition1
-/jcr:system/jcr:nodeTypes/mix:lifecycle/jcr:propertyDefinition2
-/jcr:system/jcr:nodeTypes/mix:lockable
-/jcr:system/jcr:nodeTypes/mix:lockable/jcr:propertyDefinition1
-/jcr:system/jcr:nodeTypes/mix:lockable/jcr:propertyDefinition2
-/jcr:system/jcr:nodeTypes/mix:mimeType
-/jcr:system/jcr:nodeTypes/mix:mimeType/jcr:propertyDefinition1
-/jcr:system/jcr:nodeTypes/mix:mimeType/jcr:propertyDefinition2
-/jcr:system/jcr:nodeTypes/mix:referenceable
-/jcr:system/jcr:nodeTypes/mix:referenceable/jcr:propertyDefinition1
-/jcr:system/jcr:nodeTypes/mix:shareable
-/jcr:system/jcr:nodeTypes/mix:simpleVersionable
-/jcr:system/jcr:nodeTypes/mix:simpleVersionable/jcr:propertyDefinition1
-/jcr:system/jcr:nodeTypes/mix:title
-/jcr:system/jcr:nodeTypes/mix:title/jcr:propertyDefinition1
-/jcr:system/jcr:nodeTypes/mix:title/jcr:propertyDefinition2
-/jcr:system/jcr:nodeTypes/mix:versionable
-/jcr:system/jcr:nodeTypes/mix:versionable/jcr:propertyDefinition1
-/jcr:system/jcr:nodeTypes/mix:versionable/jcr:propertyDefinition2
-/jcr:system/jcr:nodeTypes/mix:versionable/jcr:propertyDefinition3
-/jcr:system/jcr:nodeTypes/mix:versionable/jcr:propertyDefinition4
-/jcr:system/jcr:nodeTypes/mix:versionable/jcr:propertyDefinition5
-/jcr:system/jcr:nodeTypes/mix:versionable/jcr:propertyDefinition6
-/jcr:system/jcr:nodeTypes/nt:activity
-/jcr:system/jcr:nodeTypes/nt:activity/jcr:propertyDefinition1
-/jcr:system/jcr:nodeTypes/nt:address
-/jcr:system/jcr:nodeTypes/nt:address/jcr:propertyDefinition1
-/jcr:system/jcr:nodeTypes/nt:address/jcr:propertyDefinition2
-/jcr:system/jcr:nodeTypes/nt:address/jcr:propertyDefinition3
-/jcr:system/jcr:nodeTypes/nt:address/jcr:propertyDefinition4
-/jcr:system/jcr:nodeTypes/nt:address/jcr:propertyDefinition5
-/jcr:system/jcr:nodeTypes/nt:address/jcr:propertyDefinition6
-/jcr:system/jcr:nodeTypes/nt:address/jcr:propertyDefinition7
-/jcr:system/jcr:nodeTypes/nt:base
-/jcr:system/jcr:nodeTypes/nt:base/jcr:propertyDefinition1
-/jcr:system/jcr:nodeTypes/nt:base/jcr:propertyDefinition2
-/jcr:system/jcr:nodeTypes/nt:childNodeDefinition
-/jcr:system/jcr:nodeTypes/nt:childNodeDefinition/jcr:propertyDefinition1
-/jcr:system/jcr:nodeTypes/nt:childNodeDefinition/jcr:propertyDefinition2
-/jcr:system/jcr:nodeTypes/nt:childNodeDefinition/jcr:propertyDefinition3
-/jcr:system/jcr:nodeTypes/nt:childNodeDefinition/jcr:propertyDefinition4
-/jcr:system/jcr:nodeTypes/nt:childNodeDefinition/jcr:propertyDefinition5
-/jcr:system/jcr:nodeTypes/nt:childNodeDefinition/jcr:propertyDefinition6
-/jcr:system/jcr:nodeTypes/nt:childNodeDefinition/jcr:propertyDefinition7
-/jcr:system/jcr:nodeTypes/nt:childNodeDefinition/jcr:propertyDefinition8
-/jcr:system/jcr:nodeTypes/nt:configuration
-/jcr:system/jcr:nodeTypes/nt:configuration/jcr:propertyDefinition1
-/jcr:system/jcr:nodeTypes/nt:file
-/jcr:system/jcr:nodeTypes/nt:file/jcr:childNodeDefinition1
-/jcr:system/jcr:nodeTypes/nt:folder
-/jcr:system/jcr:nodeTypes/nt:folder/jcr:childNodeDefinition1
-/jcr:system/jcr:nodeTypes/nt:frozenNode
-/jcr:system/jcr:nodeTypes/nt:frozenNode/jcr:childNodeDefinition1
-/jcr:system/jcr:nodeTypes/nt:frozenNode/jcr:propertyDefinition1
-/jcr:system/jcr:nodeTypes/nt:frozenNode/jcr:propertyDefinition2
-/jcr:system/jcr:nodeTypes/nt:frozenNode/jcr:propertyDefinition3
-/jcr:system/jcr:nodeTypes/nt:frozenNode/jcr:propertyDefinition4
-/jcr:system/jcr:nodeTypes/nt:frozenNode/jcr:propertyDefinition5
-/jcr:system/jcr:nodeTypes/nt:hierarchyNode
-/jcr:system/jcr:nodeTypes/nt:linkedFile
-/jcr:system/jcr:nodeTypes/nt:linkedFile/jcr:propertyDefinition1
-/jcr:system/jcr:nodeTypes/nt:nodeType
-/jcr:system/jcr:nodeTypes/nt:nodeType/jcr:childNodeDefinition1
-/jcr:system/jcr:nodeTypes/nt:nodeType/jcr:childNodeDefinition2
-/jcr:system/jcr:nodeTypes/nt:nodeType/jcr:propertyDefinition1
-/jcr:system/jcr:nodeTypes/nt:nodeType/jcr:propertyDefinition2
-/jcr:system/jcr:nodeTypes/nt:nodeType/jcr:propertyDefinition3
-/jcr:system/jcr:nodeTypes/nt:nodeType/jcr:propertyDefinition4
-/jcr:system/jcr:nodeTypes/nt:nodeType/jcr:propertyDefinition5
-/jcr:system/jcr:nodeTypes/nt:nodeType/jcr:propertyDefinition6
-/jcr:system/jcr:nodeTypes/nt:nodeType/jcr:propertyDefinition7
-/jcr:system/jcr:nodeTypes/nt:propertyDefinition
-/jcr:system/jcr:nodeTypes/nt:propertyDefinition/jcr:propertyDefinition1
-/jcr:system/jcr:nodeTypes/nt:propertyDefinition/jcr:propertyDefinition10
-/jcr:system/jcr:nodeTypes/nt:propertyDefinition/jcr:propertyDefinition11
-/jcr:system/jcr:nodeTypes/nt:propertyDefinition/jcr:propertyDefinition12
-/jcr:system/jcr:nodeTypes/nt:propertyDefinition/jcr:propertyDefinition2
-/jcr:system/jcr:nodeTypes/nt:propertyDefinition/jcr:propertyDefinition3
-/jcr:system/jcr:nodeTypes/nt:propertyDefinition/jcr:propertyDefinition4
-/jcr:system/jcr:nodeTypes/nt:propertyDefinition/jcr:propertyDefinition5
-/jcr:system/jcr:nodeTypes/nt:propertyDefinition/jcr:propertyDefinition6
-/jcr:system/jcr:nodeTypes/nt:propertyDefinition/jcr:propertyDefinition7
-/jcr:system/jcr:nodeTypes/nt:propertyDefinition/jcr:propertyDefinition8
-/jcr:system/jcr:nodeTypes/nt:propertyDefinition/jcr:propertyDefinition9
-/jcr:system/jcr:nodeTypes/nt:query
-/jcr:system/jcr:nodeTypes/nt:query/jcr:propertyDefinition1
-/jcr:system/jcr:nodeTypes/nt:query/jcr:propertyDefinition2
-/jcr:system/jcr:nodeTypes/nt:resource
-/jcr:system/jcr:nodeTypes/nt:resource/jcr:propertyDefinition1
-/jcr:system/jcr:nodeTypes/nt:unstructured
-/jcr:system/jcr:nodeTypes/nt:unstructured/jcr:childNodeDefinition1
-/jcr:system/jcr:nodeTypes/nt:unstructured/jcr:propertyDefinition1
-/jcr:system/jcr:nodeTypes/nt:unstructured/jcr:propertyDefinition2
-/jcr:system/jcr:nodeTypes/nt:version
-/jcr:system/jcr:nodeTypes/nt:version/jcr:childNodeDefinition1
-/jcr:system/jcr:nodeTypes/nt:version/jcr:propertyDefinition1
-/jcr:system/jcr:nodeTypes/nt:version/jcr:propertyDefinition2
-/jcr:system/jcr:nodeTypes/nt:version/jcr:propertyDefinition3
-/jcr:system/jcr:nodeTypes/nt:version/jcr:propertyDefinition4
-/jcr:system/jcr:nodeTypes/nt:versionHistory
-/jcr:system/jcr:nodeTypes/nt:versionHistory/jcr:childNodeDefinition1
-/jcr:system/jcr:nodeTypes/nt:versionHistory/jcr:childNodeDefinition2
-/jcr:system/jcr:nodeTypes/nt:versionHistory/jcr:childNodeDefinition3
-/jcr:system/jcr:nodeTypes/nt:versionHistory/jcr:propertyDefinition1
-/jcr:system/jcr:nodeTypes/nt:versionHistory/jcr:propertyDefinition2
-/jcr:system/jcr:nodeTypes/nt:versionLabels
-/jcr:system/jcr:nodeTypes/nt:versionLabels/jcr:propertyDefinition1
-/jcr:system/jcr:nodeTypes/nt:versionedChild
-/jcr:system/jcr:nodeTypes/nt:versionedChild/jcr:propertyDefinition1
-/jcr:system/jcr:nodeTypes/rep:ACE
-/jcr:system/jcr:nodeTypes/rep:ACE/jcr:propertyDefinition1
-/jcr:system/jcr:nodeTypes/rep:ACE/jcr:propertyDefinition2
-/jcr:system/jcr:nodeTypes/rep:ACE/jcr:propertyDefinition3
-/jcr:system/jcr:nodeTypes/rep:ACE/jcr:propertyDefinition4
-/jcr:system/jcr:nodeTypes/rep:ACE/jcr:propertyDefinition5
-/jcr:system/jcr:nodeTypes/rep:ACL
-/jcr:system/jcr:nodeTypes/rep:ACL/jcr:childNodeDefinition1
-/jcr:system/jcr:nodeTypes/rep:AccessControl
-/jcr:system/jcr:nodeTypes/rep:AccessControl/jcr:childNodeDefinition1
-/jcr:system/jcr:nodeTypes/rep:AccessControl/jcr:childNodeDefinition2
-/jcr:system/jcr:nodeTypes/rep:AccessControllable
-/jcr:system/jcr:nodeTypes/rep:AccessControllable/jcr:childNodeDefinition1
-/jcr:system/jcr:nodeTypes/rep:Activities
-/jcr:system/jcr:nodeTypes/rep:Activities/jcr:childNodeDefinition1
-/jcr:system/jcr:nodeTypes/rep:Activities/jcr:childNodeDefinition2
-/jcr:system/jcr:nodeTypes/rep:Authorizable
-/jcr:system/jcr:nodeTypes/rep:Authorizable/jcr:childNodeDefinition1
-/jcr:system/jcr:nodeTypes/rep:Authorizable/jcr:propertyDefinition1
-/jcr:system/jcr:nodeTypes/rep:Authorizable/jcr:propertyDefinition2
-/jcr:system/jcr:nodeTypes/rep:Authorizable/jcr:propertyDefinition3
-/jcr:system/jcr:nodeTypes/rep:Authorizable/jcr:propertyDefinition4
-/jcr:system/jcr:nodeTypes/rep:AuthorizableFolder
-/jcr:system/jcr:nodeTypes/rep:AuthorizableFolder/jcr:childNodeDefinition1
-/jcr:system/jcr:nodeTypes/rep:AuthorizableFolder/jcr:childNodeDefinition2
-/jcr:system/jcr:nodeTypes/rep:Configurations
-/jcr:system/jcr:nodeTypes/rep:Configurations/jcr:childNodeDefinition1
-/jcr:system/jcr:nodeTypes/rep:Configurations/jcr:childNodeDefinition2
-/jcr:system/jcr:nodeTypes/rep:DenyACE
-/jcr:system/jcr:nodeTypes/rep:GrantACE
-/jcr:system/jcr:nodeTypes/rep:Group
-/jcr:system/jcr:nodeTypes/rep:Group/jcr:childNodeDefinition1
-/jcr:system/jcr:nodeTypes/rep:Group/jcr:propertyDefinition1
-/jcr:system/jcr:nodeTypes/rep:Impersonatable
-/jcr:system/jcr:nodeTypes/rep:Impersonatable/jcr:propertyDefinition1
-/jcr:system/jcr:nodeTypes/rep:Members
-/jcr:system/jcr:nodeTypes/rep:Members/jcr:childNodeDefinition1
-/jcr:system/jcr:nodeTypes/rep:Members/jcr:propertyDefinition1
-/jcr:system/jcr:nodeTypes/rep:MergeConflict
-/jcr:system/jcr:nodeTypes/rep:MergeConflict/jcr:childNodeDefinition1
-/jcr:system/jcr:nodeTypes/rep:Policy
-/jcr:system/jcr:nodeTypes/rep:PrincipalAccessControl
-/jcr:system/jcr:nodeTypes/rep:PrincipalAccessControl/jcr:childNodeDefinition1
-/jcr:system/jcr:nodeTypes/rep:Privilege
-/jcr:system/jcr:nodeTypes/rep:Privilege/jcr:propertyDefinition1
-/jcr:system/jcr:nodeTypes/rep:Privilege/jcr:propertyDefinition2
-/jcr:system/jcr:nodeTypes/rep:Privileges
-/jcr:system/jcr:nodeTypes/rep:Privileges/jcr:childNodeDefinition1
-/jcr:system/jcr:nodeTypes/rep:RepoAccessControllable
-/jcr:system/jcr:nodeTypes/rep:RepoAccessControllable/jcr:childNodeDefinition1
-/jcr:system/jcr:nodeTypes/rep:RetentionManageable
-/jcr:system/jcr:nodeTypes/rep:RetentionManageable/jcr:propertyDefinition1
-/jcr:system/jcr:nodeTypes/rep:RetentionManageable/jcr:propertyDefinition2
-/jcr:system/jcr:nodeTypes/rep:User
-/jcr:system/jcr:nodeTypes/rep:User/jcr:propertyDefinition1
-/jcr:system/jcr:nodeTypes/rep:User/jcr:propertyDefinition2
-/jcr:system/jcr:nodeTypes/rep:VersionReference
-/jcr:system/jcr:nodeTypes/rep:VersionReference/jcr:propertyDefinition1
-/jcr:system/jcr:nodeTypes/rep:nodeTypes
-/jcr:system/jcr:nodeTypes/rep:nodeTypes/jcr:childNodeDefinition1
-/jcr:system/jcr:nodeTypes/rep:root
-/jcr:system/jcr:nodeTypes/rep:root/jcr:childNodeDefinition1
-/jcr:system/jcr:nodeTypes/rep:system
-/jcr:system/jcr:nodeTypes/rep:system/jcr:childNodeDefinition1
-/jcr:system/jcr:nodeTypes/rep:system/jcr:childNodeDefinition2
-/jcr:system/jcr:nodeTypes/rep:system/jcr:childNodeDefinition3
-/jcr:system/jcr:nodeTypes/rep:system/jcr:childNodeDefinition4
-/jcr:system/jcr:nodeTypes/rep:system/jcr:childNodeDefinition5
-/jcr:system/jcr:nodeTypes/rep:system/jcr:childNodeDefinition6
-/jcr:system/jcr:nodeTypes/rep:versionStorage
-/jcr:system/jcr:nodeTypes/rep:versionStorage/jcr:childNodeDefinition1
-/jcr:system/jcr:nodeTypes/rep:versionStorage/jcr:childNodeDefinition2
-/jcr:system/jcr:versionStorage
-/jcr:system/rep:privileges
 /oak-index
 /oak-index/indexes
 /test
 /test/hello
 
-select * from [nt:base] where x is null
+select * from [nt:base] where x is null and not isdescendantnode('/jcr:system')
 /
 /jcr:system
-/jcr:system/jcr:activities
-/jcr:system/jcr:nodeTypes
-/jcr:system/jcr:nodeTypes/mix:created
-/jcr:system/jcr:nodeTypes/mix:created/jcr:propertyDefinition1
-/jcr:system/jcr:nodeTypes/mix:created/jcr:propertyDefinition2
-/jcr:system/jcr:nodeTypes/mix:etag
-/jcr:system/jcr:nodeTypes/mix:etag/jcr:propertyDefinition1
-/jcr:system/jcr:nodeTypes/mix:language
-/jcr:system/jcr:nodeTypes/mix:language/jcr:propertyDefinition1
-/jcr:system/jcr:nodeTypes/mix:lastModified
-/jcr:system/jcr:nodeTypes/mix:lastModified/jcr:propertyDefinition1
-/jcr:system/jcr:nodeTypes/mix:lastModified/jcr:propertyDefinition2
-/jcr:system/jcr:nodeTypes/mix:lifecycle
-/jcr:system/jcr:nodeTypes/mix:lifecycle/jcr:propertyDefinition1
-/jcr:system/jcr:nodeTypes/mix:lifecycle/jcr:propertyDefinition2
-/jcr:system/jcr:nodeTypes/mix:lockable
-/jcr:system/jcr:nodeTypes/mix:lockable/jcr:propertyDefinition1
-/jcr:system/jcr:nodeTypes/mix:lockable/jcr:propertyDefinition2
-/jcr:system/jcr:nodeTypes/mix:mimeType
-/jcr:system/jcr:nodeTypes/mix:mimeType/jcr:propertyDefinition1
-/jcr:system/jcr:nodeTypes/mix:mimeType/jcr:propertyDefinition2
-/jcr:system/jcr:nodeTypes/mix:referenceable
-/jcr:system/jcr:nodeTypes/mix:referenceable/jcr:propertyDefinition1
-/jcr:system/jcr:nodeTypes/mix:shareable
-/jcr:system/jcr:nodeTypes/mix:simpleVersionable
-/jcr:system/jcr:nodeTypes/mix:simpleVersionable/jcr:propertyDefinition1
-/jcr:system/jcr:nodeTypes/mix:title
-/jcr:system/jcr:nodeTypes/mix:title/jcr:propertyDefinition1
-/jcr:system/jcr:nodeTypes/mix:title/jcr:propertyDefinition2
-/jcr:system/jcr:nodeTypes/mix:versionable
-/jcr:system/jcr:nodeTypes/mix:versionable/jcr:propertyDefinition1
-/jcr:system/jcr:nodeTypes/mix:versionable/jcr:propertyDefinition2
-/jcr:system/jcr:nodeTypes/mix:versionable/jcr:propertyDefinition3
-/jcr:system/jcr:nodeTypes/mix:versionable/jcr:propertyDefinition4
-/jcr:system/jcr:nodeTypes/mix:versionable/jcr:propertyDefinition5
-/jcr:system/jcr:nodeTypes/mix:versionable/jcr:propertyDefinition6
-/jcr:system/jcr:nodeTypes/nt:activity
-/jcr:system/jcr:nodeTypes/nt:activity/jcr:propertyDefinition1
-/jcr:system/jcr:nodeTypes/nt:address
-/jcr:system/jcr:nodeTypes/nt:address/jcr:propertyDefinition1
-/jcr:system/jcr:nodeTypes/nt:address/jcr:propertyDefinition2
-/jcr:system/jcr:nodeTypes/nt:address/jcr:propertyDefinition3
-/jcr:system/jcr:nodeTypes/nt:address/jcr:propertyDefinition4
-/jcr:system/jcr:nodeTypes/nt:address/jcr:propertyDefinition5
-/jcr:system/jcr:nodeTypes/nt:address/jcr:propertyDefinition6
-/jcr:system/jcr:nodeTypes/nt:address/jcr:propertyDefinition7
-/jcr:system/jcr:nodeTypes/nt:base
-/jcr:system/jcr:nodeTypes/nt:base/jcr:propertyDefinition1
-/jcr:system/jcr:nodeTypes/nt:base/jcr:propertyDefinition2
-/jcr:system/jcr:nodeTypes/nt:childNodeDefinition
-/jcr:system/jcr:nodeTypes/nt:childNodeDefinition/jcr:propertyDefinition1
-/jcr:system/jcr:nodeTypes/nt:childNodeDefinition/jcr:propertyDefinition2
-/jcr:system/jcr:nodeTypes/nt:childNodeDefinition/jcr:propertyDefinition3
-/jcr:system/jcr:nodeTypes/nt:childNodeDefinition/jcr:propertyDefinition4
-/jcr:system/jcr:nodeTypes/nt:childNodeDefinition/jcr:propertyDefinition5
-/jcr:system/jcr:nodeTypes/nt:childNodeDefinition/jcr:propertyDefinition6
-/jcr:system/jcr:nodeTypes/nt:childNodeDefinition/jcr:propertyDefinition7
-/jcr:system/jcr:nodeTypes/nt:childNodeDefinition/jcr:propertyDefinition8
-/jcr:system/jcr:nodeTypes/nt:configuration
-/jcr:system/jcr:nodeTypes/nt:configuration/jcr:propertyDefinition1
-/jcr:system/jcr:nodeTypes/nt:file
-/jcr:system/jcr:nodeTypes/nt:file/jcr:childNodeDefinition1
-/jcr:system/jcr:nodeTypes/nt:folder
-/jcr:system/jcr:nodeTypes/nt:folder/jcr:childNodeDefinition1
-/jcr:system/jcr:nodeTypes/nt:frozenNode
-/jcr:system/jcr:nodeTypes/nt:frozenNode/jcr:childNodeDefinition1
-/jcr:system/jcr:nodeTypes/nt:frozenNode/jcr:propertyDefinition1
-/jcr:system/jcr:nodeTypes/nt:frozenNode/jcr:propertyDefinition2
-/jcr:system/jcr:nodeTypes/nt:frozenNode/jcr:propertyDefinition3
-/jcr:system/jcr:nodeTypes/nt:frozenNode/jcr:propertyDefinition4
-/jcr:system/jcr:nodeTypes/nt:frozenNode/jcr:propertyDefinition5
-/jcr:system/jcr:nodeTypes/nt:hierarchyNode
-/jcr:system/jcr:nodeTypes/nt:linkedFile
-/jcr:system/jcr:nodeTypes/nt:linkedFile/jcr:propertyDefinition1
-/jcr:system/jcr:nodeTypes/nt:nodeType
-/jcr:system/jcr:nodeTypes/nt:nodeType/jcr:childNodeDefinition1
-/jcr:system/jcr:nodeTypes/nt:nodeType/jcr:childNodeDefinition2
-/jcr:system/jcr:nodeTypes/nt:nodeType/jcr:propertyDefinition1
-/jcr:system/jcr:nodeTypes/nt:nodeType/jcr:propertyDefinition2
-/jcr:system/jcr:nodeTypes/nt:nodeType/jcr:propertyDefinition3
-/jcr:system/jcr:nodeTypes/nt:nodeType/jcr:propertyDefinition4
-/jcr:system/jcr:nodeTypes/nt:nodeType/jcr:propertyDefinition5
-/jcr:system/jcr:nodeTypes/nt:nodeType/jcr:propertyDefinition6
-/jcr:system/jcr:nodeTypes/nt:nodeType/jcr:propertyDefinition7
-/jcr:system/jcr:nodeTypes/nt:propertyDefinition
-/jcr:system/jcr:nodeTypes/nt:propertyDefinition/jcr:propertyDefinition1
-/jcr:system/jcr:nodeTypes/nt:propertyDefinition/jcr:propertyDefinition10
-/jcr:system/jcr:nodeTypes/nt:propertyDefinition/jcr:propertyDefinition11
-/jcr:system/jcr:nodeTypes/nt:propertyDefinition/jcr:propertyDefinition12
-/jcr:system/jcr:nodeTypes/nt:propertyDefinition/jcr:propertyDefinition2
-/jcr:system/jcr:nodeTypes/nt:propertyDefinition/jcr:propertyDefinition3
-/jcr:system/jcr:nodeTypes/nt:propertyDefinition/jcr:propertyDefinition4
-/jcr:system/jcr:nodeTypes/nt:propertyDefinition/jcr:propertyDefinition5
-/jcr:system/jcr:nodeTypes/nt:propertyDefinition/jcr:propertyDefinition6
-/jcr:system/jcr:nodeTypes/nt:propertyDefinition/jcr:propertyDefinition7
-/jcr:system/jcr:nodeTypes/nt:propertyDefinition/jcr:propertyDefinition8
-/jcr:system/jcr:nodeTypes/nt:propertyDefinition/jcr:propertyDefinition9
-/jcr:system/jcr:nodeTypes/nt:query
-/jcr:system/jcr:nodeTypes/nt:query/jcr:propertyDefinition1
-/jcr:system/jcr:nodeTypes/nt:query/jcr:propertyDefinition2
-/jcr:system/jcr:nodeTypes/nt:resource
-/jcr:system/jcr:nodeTypes/nt:resource/jcr:propertyDefinition1
-/jcr:system/jcr:nodeTypes/nt:unstructured
-/jcr:system/jcr:nodeTypes/nt:unstructured/jcr:childNodeDefinition1
-/jcr:system/jcr:nodeTypes/nt:unstructured/jcr:propertyDefinition1
-/jcr:system/jcr:nodeTypes/nt:unstructured/jcr:propertyDefinition2
-/jcr:system/jcr:nodeTypes/nt:version
-/jcr:system/jcr:nodeTypes/nt:version/jcr:childNodeDefinition1
-/jcr:system/jcr:nodeTypes/nt:version/jcr:propertyDefinition1
-/jcr:system/jcr:nodeTypes/nt:version/jcr:propertyDefinition2
-/jcr:system/jcr:nodeTypes/nt:version/jcr:propertyDefinition3
-/jcr:system/jcr:nodeTypes/nt:version/jcr:propertyDefinition4
-/jcr:system/jcr:nodeTypes/nt:versionHistory
-/jcr:system/jcr:nodeTypes/nt:versionHistory/jcr:childNodeDefinition1
-/jcr:system/jcr:nodeTypes/nt:versionHistory/jcr:childNodeDefinition2
-/jcr:system/jcr:nodeTypes/nt:versionHistory/jcr:childNodeDefinition3
-/jcr:system/jcr:nodeTypes/nt:versionHistory/jcr:propertyDefinition1
-/jcr:system/jcr:nodeTypes/nt:versionHistory/jcr:propertyDefinition2
-/jcr:system/jcr:nodeTypes/nt:versionLabels
-/jcr:system/jcr:nodeTypes/nt:versionLabels/jcr:propertyDefinition1
-/jcr:system/jcr:nodeTypes/nt:versionedChild
-/jcr:system/jcr:nodeTypes/nt:versionedChild/jcr:propertyDefinition1
-/jcr:system/jcr:nodeTypes/rep:ACE
-/jcr:system/jcr:nodeTypes/rep:ACE/jcr:propertyDefinition1
-/jcr:system/jcr:nodeTypes/rep:ACE/jcr:propertyDefinition2
-/jcr:system/jcr:nodeTypes/rep:ACE/jcr:propertyDefinition3
-/jcr:system/jcr:nodeTypes/rep:ACE/jcr:propertyDefinition4
-/jcr:system/jcr:nodeTypes/rep:ACE/jcr:propertyDefinition5
-/jcr:system/jcr:nodeTypes/rep:ACL
-/jcr:system/jcr:nodeTypes/rep:ACL/jcr:childNodeDefinition1
-/jcr:system/jcr:nodeTypes/rep:AccessControl
-/jcr:system/jcr:nodeTypes/rep:AccessControl/jcr:childNodeDefinition1
-/jcr:system/jcr:nodeTypes/rep:AccessControl/jcr:childNodeDefinition2
-/jcr:system/jcr:nodeTypes/rep:AccessControllable
-/jcr:system/jcr:nodeTypes/rep:AccessControllable/jcr:childNodeDefinition1
-/jcr:system/jcr:nodeTypes/rep:Activities
-/jcr:system/jcr:nodeTypes/rep:Activities/jcr:childNodeDefinition1
-/jcr:system/jcr:nodeTypes/rep:Activities/jcr:childNodeDefinition2
-/jcr:system/jcr:nodeTypes/rep:Authorizable
-/jcr:system/jcr:nodeTypes/rep:Authorizable/jcr:childNodeDefinition1
-/jcr:system/jcr:nodeTypes/rep:Authorizable/jcr:propertyDefinition1
-/jcr:system/jcr:nodeTypes/rep:Authorizable/jcr:propertyDefinition2
-/jcr:system/jcr:nodeTypes/rep:Authorizable/jcr:propertyDefinition3
-/jcr:system/jcr:nodeTypes/rep:Authorizable/jcr:propertyDefinition4
-/jcr:system/jcr:nodeTypes/rep:AuthorizableFolder
-/jcr:system/jcr:nodeTypes/rep:AuthorizableFolder/jcr:childNodeDefinition1
-/jcr:system/jcr:nodeTypes/rep:AuthorizableFolder/jcr:childNodeDefinition2
-/jcr:system/jcr:nodeTypes/rep:Configurations
-/jcr:system/jcr:nodeTypes/rep:Configurations/jcr:childNodeDefinition1
-/jcr:system/jcr:nodeTypes/rep:Configurations/jcr:childNodeDefinition2
-/jcr:system/jcr:nodeTypes/rep:DenyACE
-/jcr:system/jcr:nodeTypes/rep:GrantACE
-/jcr:system/jcr:nodeTypes/rep:Group
-/jcr:system/jcr:nodeTypes/rep:Group/jcr:childNodeDefinition1
-/jcr:system/jcr:nodeTypes/rep:Group/jcr:propertyDefinition1
-/jcr:system/jcr:nodeTypes/rep:Impersonatable
-/jcr:system/jcr:nodeTypes/rep:Impersonatable/jcr:propertyDefinition1
-/jcr:system/jcr:nodeTypes/rep:Members
-/jcr:system/jcr:nodeTypes/rep:Members/jcr:childNodeDefinition1
-/jcr:system/jcr:nodeTypes/rep:Members/jcr:propertyDefinition1
-/jcr:system/jcr:nodeTypes/rep:MergeConflict
-/jcr:system/jcr:nodeTypes/rep:MergeConflict/jcr:childNodeDefinition1
-/jcr:system/jcr:nodeTypes/rep:Policy
-/jcr:system/jcr:nodeTypes/rep:PrincipalAccessControl
-/jcr:system/jcr:nodeTypes/rep:PrincipalAccessControl/jcr:childNodeDefinition1
-/jcr:system/jcr:nodeTypes/rep:Privilege
-/jcr:system/jcr:nodeTypes/rep:Privilege/jcr:propertyDefinition1
-/jcr:system/jcr:nodeTypes/rep:Privilege/jcr:propertyDefinition2
-/jcr:system/jcr:nodeTypes/rep:Privileges
-/jcr:system/jcr:nodeTypes/rep:Privileges/jcr:childNodeDefinition1
-/jcr:system/jcr:nodeTypes/rep:RepoAccessControllable
-/jcr:system/jcr:nodeTypes/rep:RepoAccessControllable/jcr:childNodeDefinition1
-/jcr:system/jcr:nodeTypes/rep:RetentionManageable
-/jcr:system/jcr:nodeTypes/rep:RetentionManageable/jcr:propertyDefinition1
-/jcr:system/jcr:nodeTypes/rep:RetentionManageable/jcr:propertyDefinition2
-/jcr:system/jcr:nodeTypes/rep:User
-/jcr:system/jcr:nodeTypes/rep:User/jcr:propertyDefinition1
-/jcr:system/jcr:nodeTypes/rep:User/jcr:propertyDefinition2
-/jcr:system/jcr:nodeTypes/rep:VersionReference
-/jcr:system/jcr:nodeTypes/rep:VersionReference/jcr:propertyDefinition1
-/jcr:system/jcr:nodeTypes/rep:nodeTypes
-/jcr:system/jcr:nodeTypes/rep:nodeTypes/jcr:childNodeDefinition1
-/jcr:system/jcr:nodeTypes/rep:root
-/jcr:system/jcr:nodeTypes/rep:root/jcr:childNodeDefinition1
-/jcr:system/jcr:nodeTypes/rep:system
-/jcr:system/jcr:nodeTypes/rep:system/jcr:childNodeDefinition1
-/jcr:system/jcr:nodeTypes/rep:system/jcr:childNodeDefinition2
-/jcr:system/jcr:nodeTypes/rep:system/jcr:childNodeDefinition3
-/jcr:system/jcr:nodeTypes/rep:system/jcr:childNodeDefinition4
-/jcr:system/jcr:nodeTypes/rep:system/jcr:childNodeDefinition5
-/jcr:system/jcr:nodeTypes/rep:system/jcr:childNodeDefinition6
-/jcr:system/jcr:nodeTypes/rep:versionStorage
-/jcr:system/jcr:nodeTypes/rep:versionStorage/jcr:childNodeDefinition1
-/jcr:system/jcr:nodeTypes/rep:versionStorage/jcr:childNodeDefinition2
-/jcr:system/jcr:versionStorage
-/jcr:system/rep:privileges
 /oak-index
 /oak-index/indexes
 /test
@@ -1016,207 +263,7 @@ commit / + "test3": { "name": "Hallo" }
 commit / + "test4": { "name": "10%" }
 commit / + "test5": { "name": "10 percent" }
 
-select name from [nt:base] order by upper(name)
-null
-null
-null
-null
-null
-null
-null
-null
-null
-null
-null
-null
-null
-null
-null
-null
-null
-null
-null
-null
-null
-null
-null
-null
-null
-null
-null
-null
-null
-null
-null
-null
-null
-null
-null
-null
-null
-null
-null
-null
-null
-null
-null
-null
-null
-null
-null
-null
-null
-null
-null
-null
-null
-null
-null
-null
-null
-null
-null
-null
-null
-null
-null
-null
-null
-null
-null
-null
-null
-null
-null
-null
-null
-null
-null
-null
-null
-null
-null
-null
-null
-null
-null
-null
-null
-null
-null
-null
-null
-null
-null
-null
-null
-null
-null
-null
-null
-null
-null
-null
-null
-null
-null
-null
-null
-null
-null
-null
-null
-null
-null
-null
-null
-null
-null
-null
-null
-null
-null
-null
-null
-null
-null
-null
-null
-null
-null
-null
-null
-null
-null
-null
-null
-null
-null
-null
-null
-null
-null
-null
-null
-null
-null
-null
-null
-null
-null
-null
-null
-null
-null
-null
-null
-null
-null
-null
-null
-null
-null
-null
-null
-null
-null
-null
-null
-null
-null
-null
-null
-null
-null
-null
-null
-null
-null
-null
-null
-null
-null
-null
-null
-null
-null
-null
-null
-null
-null
-null
-null
-null
-null
-null
-null
-null
-null
-null
-null
-null
-null
-null
+select name from [nt:base] where name is not null order by upper(name)
 10 percent
 10%
 Hallo

Modified: jackrabbit/oak/trunk/oak-core/src/test/resources/org/apache/jackrabbit/oak/query/sql2_explain.txt
URL: http://svn.apache.org/viewvc/jackrabbit/oak/trunk/oak-core/src/test/resources/org/apache/jackrabbit/oak/query/sql2_explain.txt?rev=1382008&r1=1382007&r2=1382008&view=diff
==============================================================================
--- jackrabbit/oak/trunk/oak-core/src/test/resources/org/apache/jackrabbit/oak/query/sql2_explain.txt (original)
+++ jackrabbit/oak/trunk/oak-core/src/test/resources/org/apache/jackrabbit/oak/query/sql2_explain.txt Fri Sep  7 13:14:40 2012
@@ -28,10 +28,10 @@
 commit / + "test": { "a": { "id": "ref:123" }, "b": { "id" : "str:123" }}
 
 explain select * from [nt:base] where property([*], 'REFERENCE') = CAST('123' AS REFERENCE)
-nt:base as nt:base /* traverse "//*" */
+[nt:base] as nt:base /* traverse "//*" where property(nt:base.*, 'reference') = cast('123' as reference) */
 
 explain select * from [nt:base] where property(id, 'REFERENCE') = CAST('123' AS REFERENCE)
-nt:base as nt:base /* traverse "//*" */
+[nt:base] as nt:base /* traverse "//*" where property(nt:base.id, 'reference') = cast('123' as reference) */
 
 select * from [nt:base] where property([*], 'REFERENCE') = CAST('123' AS REFERENCE)
 /test/a
@@ -39,10 +39,10 @@ select * from [nt:base] where property([
 commit /oak-index/indexes + "prefix@ref:": {}
 
 explain select * from [nt:base] where property([*], 'REFERENCE') = CAST('123' AS REFERENCE)
-nt:base as nt:base /* prefixIndex "ref:123" */
+[nt:base] as nt:base /* prefixIndex "ref:123" where property(nt:base.*, 'reference') = cast('123' as reference) */
 
 explain select * from [nt:base] where property(id, 'REFERENCE') = CAST('123' AS REFERENCE)
-nt:base as nt:base /* prefixIndex "ref:123" */
+[nt:base] as nt:base /* prefixIndex "ref:123" where property(nt:base.id, 'reference') = cast('123' as reference) */
 
 select * from [nt:base] where property([*], 'REFERENCE') = CAST('123' AS REFERENCE)
 /test/a
@@ -68,7 +68,7 @@ select * from [nt:base] where id is not 
 /test/b
 
 explain select * from [nt:base] where id = '10'
-nt:base as nt:base /* propertyIndex "id [10..10]" */
+[nt:base] as nt:base /* propertyIndex "id [10..10]" where nt:base.id = cast('10' as string) */
 
 select * from [nt:base] where id = '10'
 /test/a
@@ -77,7 +77,7 @@ select [jcr:path], * from [nt:base] wher
 /test/a, null
 
 explain select * from [nt:base] where id > '10'
-nt:base as nt:base /* traverse "//*" */
+[nt:base] as nt:base /* traverse "//*" where nt:base.id > cast('10' as string) */
 
 commit / - "test"
 commit /oak-index/indexes - "property@id,unique"
@@ -87,10 +87,10 @@ commit /oak-index/indexes - "property@id
 commit / + "test": { "jcr:resource": {}, "resource": { "x" : {}}}
 
 explain select * from [nt:base] as b where ischildnode(b, '/test')
-nt:base as b /* traverse "/test/*" */
+[nt:base] as b /* traverse "/test/*" where ischildnode(b, [/test]) */
 
 explain select * from [nt:base] as b where isdescendantnode(b, '/test')
-nt:base as b /* traverse "/test//*" */
+[nt:base] as b /* traverse "/test//*" where isdescendantnode(b, [/test]) */
 
 commit / - "test"
 
@@ -98,7 +98,7 @@ commit / + "parents": { "p0": {"id": "0"
 commit / + "children": { "c1": {"p": "1"}, "c2": {"p": "1"}, "c3": {"p": "2"}, "c4": {"p": "3"}}
 
 explain select * from [nt:base] as p inner join [nt:base] as c on p.id = c.p
-nt:base as p /* traverse "//*" */ inner join nt:base as c /* traverse "//*" */ on p.id = c.p
+[nt:base] as p /* traverse "//*" where p.id is not null */ inner join [nt:base] as c /* traverse "//*" where c.p is not null */ on p.id = c.p
 
 commit / - "parents"
 commit / - "children"

Modified: jackrabbit/oak/trunk/oak-core/src/test/resources/org/apache/jackrabbit/oak/query/xpath.txt
URL: http://svn.apache.org/viewvc/jackrabbit/oak/trunk/oak-core/src/test/resources/org/apache/jackrabbit/oak/query/xpath.txt?rev=1382008&r1=1382007&r2=1382008&view=diff
==============================================================================
--- jackrabbit/oak/trunk/oak-core/src/test/resources/org/apache/jackrabbit/oak/query/xpath.txt (original)
+++ jackrabbit/oak/trunk/oak-core/src/test/resources/org/apache/jackrabbit/oak/query/xpath.txt Fri Sep  7 13:14:40 2012
@@ -25,20 +25,20 @@
 
 # jackrabbit test queries
 
-# xpath2sql //testRoot/*[@text = 'foo']
-# select b.[jcr:path], b.[jcr:score], b.* from [nt:base] as a inner join [nt:base] as b on ischildnode(b, a) where name(a) = 'testRoot' and b.[text] = 'foo'
+xpath2sql //testRoot/*[@text = 'foo']
+select b.[jcr:path], b.[jcr:score], b.* from [nt:base] as a inner join [nt:base] as b on ischildnode(b, a) where name(a) = 'testRoot' and b.[text] = 'foo'
 
 xpath2sql /testRoot/*[@jcr:primaryType='nt:unstructured' and fn:not(@mytext)]
-select [jcr:path], [jcr:score], * from [nt:base] as a where (([jcr:primaryType] = 'nt:unstructured') and ([mytext] is null)) and ischildnode(a, '/testRoot')
+select [jcr:path], [jcr:score], * from [nt:base] as a where [jcr:primaryType] = 'nt:unstructured' and [mytext] is null and ischildnode(a, '/testRoot')
 
 xpath2sql /jcr:root/testroot/*[jcr:contains(., '"quick brown" -cat')]
 select [jcr:path], [jcr:score], * from [nt:base] as a where contains(*, '"quick brown" -cat') and ischildnode(a, '/testroot')
 
 xpath2sql //element(*,rep:Authorizable)[(((jcr:contains(profile/givenName,'**') or jcr:contains(profile/familyName,'**')) or jcr:contains(profile/email,'**')) or (jcr:like(rep:principalName,'%%') or jcr:like(fn:name(.),'%%')))] order by rep:principalName ascending
-select [jcr:path], [jcr:score], * from [rep:Authorizable] as a where ((contains([profile/givenName/*], '**') or contains([profile/familyName/*], '**')) or contains([profile/email/*], '**')) or (([rep:principalName/*] like '%%') or (name(a) like '%%')) order by [rep:principalName/*]
+select [jcr:path], [jcr:score], * from [rep:Authorizable] as a where contains([profile/givenName/*], '**') or contains([profile/familyName/*], '**') or contains([profile/email/*], '**') or [rep:principalName/*] like '%%' or name(a) like '%%' order by [rep:principalName/*]
 
 xpath2sql //element(*,rep:Authorizable)[(((jcr:contains(profile/@givenName,'**') or jcr:contains(profile/@familyName,'**')) or jcr:contains(profile/@email,'**')) or (jcr:like(@rep:principalName,'%%') or jcr:like(fn:name(.),'%%')))] order by @rep:principalName ascending
-select [jcr:path], [jcr:score], * from [rep:Authorizable] as a where ((contains([profile/givenName], '**') or contains([profile/familyName], '**')) or contains([profile/email], '**')) or (([rep:principalName] like '%%') or (name(a) like '%%')) order by [rep:principalName]
+select [jcr:path], [jcr:score], * from [rep:Authorizable] as a where contains([profile/givenName], '**') or contains([profile/familyName], '**') or contains([profile/email], '**') or [rep:principalName] like '%%' or name(a) like '%%' order by [rep:principalName]
 
 xpath2sql /jcr:root/testroot//*[jcr:contains(@jcr:data, 'lazy')]
 select [jcr:path], [jcr:score], * from [nt:base] as a where contains([jcr:data], 'lazy') and isdescendantnode(a, '/testroot')
@@ -56,58 +56,58 @@ xpath2sql /jcr:root/testroot/*[jcr:conta
 select [jcr:path], [jcr:score], * from [nt:base] as a where contains([*/*], 'lazy') and ischildnode(a, '/testroot')
 
 xpath2sql /jcr:root/testroot/*[@prop1 = 1 and jcr:like(fn:name(), 'F%')]
-select [jcr:path], [jcr:score], * from [nt:base] as a where (([prop1] = 1) and (name(a) like 'F%')) and ischildnode(a, '/testroot')
+select [jcr:path], [jcr:score], * from [nt:base] as a where [prop1] = 1 and name(a) like 'F%' and ischildnode(a, '/testroot')
 
 # TODO support rep:excerpt() and rep:similar()? how?
 xpath2sql /jcr:root/testroot/*[jcr:contains(., 'jackrabbit')]/rep:excerpt(.)
 invalid: Query: /jcr:root/testroot/*[jcr:contains(., 'jackrabbit')]/rep:excerpt((*).); expected: <end>
 
 xpath2sql /jcr:root/testroot//child/..[@foo1]
-invalid: Query: /jcr:root/testroot//child/.(*).[@foo1]; expected: non-path condition
+invalid: Query: /jcr:root/testroot//child/.(*).[@foo1]; expected: identifier
 
 xpath2sql //testroot/*[@jcr:primaryType='nt:unstructured' and fn:not(@mytext)]
-invalid: Query: //testroot/*(*)[@jcr:primaryType='nt:unstructured' and fn:not(@mytext)]; expected: non-path condition
+select b.[jcr:path], b.[jcr:score], b.* from [nt:base] as a inner join [nt:base] as b on ischildnode(b, a) where name(a) = 'testroot' and b.[jcr:primaryType] = 'nt:unstructured' and b.[mytext] is null
 
 xpath2sql /jcr:root/testroot/people/jcr:deref(@worksfor, '*')
 invalid: Query: /jcr:root/testroot/people/jcr:deref((*)@worksfor, '*'); expected: <end>
 
 xpath2sql /jcr:root[@foo = 'does-not-exist']
-select [jcr:path], [jcr:score], * from [nt:base] as a where ([foo] = 'does-not-exist') and isdescendantnode(a, '/')
+select [jcr:path], [jcr:score], * from [nt:base] as a where [foo] = 'does-not-exist' and isdescendantnode(a, '/')
 
 xpath2sql //*[@jcr:primaryType='nt:unstructured' and jcr:like(@foo,"%ar'ba%")]
-select [jcr:path], [jcr:score], * from [nt:base] as a where ([jcr:primaryType] = 'nt:unstructured') and ([foo] like '%ar''ba%')
+select [jcr:path], [jcr:score], * from [nt:base] as a where [jcr:primaryType] = 'nt:unstructured' and [foo] like '%ar''ba%'
 
 xpath2sql /jcr:root/testroot/*[fn:lower-case(@prop1) = 'foo']
-select [jcr:path], [jcr:score], * from [nt:base] as a where (lower([prop1]) = 'foo') and ischildnode(a, '/testroot')
+select [jcr:path], [jcr:score], * from [nt:base] as a where lower([prop1]) = 'foo' and ischildnode(a, '/testroot')
 
 xpath2sql /jcr:root/testroot/*[fn:lower-case(@prop1) != 'foo']
-select [jcr:path], [jcr:score], * from [nt:base] as a where (lower([prop1]) <> 'foo') and ischildnode(a, '/testroot')
+select [jcr:path], [jcr:score], * from [nt:base] as a where lower([prop1]) <> 'foo' and ischildnode(a, '/testroot')
 
 xpath2sql /jcr:root/testroot/*[fn:lower-case(@prop1) <= 'foo']
-select [jcr:path], [jcr:score], * from [nt:base] as a where (lower([prop1]) <= 'foo') and ischildnode(a, '/testroot')
+select [jcr:path], [jcr:score], * from [nt:base] as a where lower([prop1]) <= 'foo' and ischildnode(a, '/testroot')
 
 xpath2sql /jcr:root/testroot/*[fn:lower-case(@prop1) >= 'foo']
-select [jcr:path], [jcr:score], * from [nt:base] as a where (lower([prop1]) >= 'foo') and ischildnode(a, '/testroot')
+select [jcr:path], [jcr:score], * from [nt:base] as a where lower([prop1]) >= 'foo' and ischildnode(a, '/testroot')
 
 xpath2sql /jcr:root/testroot/*[fn:lower-case(@prop1) < 'foo']
-select [jcr:path], [jcr:score], * from [nt:base] as a where (lower([prop1]) < 'foo') and ischildnode(a, '/testroot')
+select [jcr:path], [jcr:score], * from [nt:base] as a where lower([prop1]) < 'foo' and ischildnode(a, '/testroot')
 
 xpath2sql /jcr:root/testroot/*[fn:lower-case(@prop1) > 'foo']
-select [jcr:path], [jcr:score], * from [nt:base] as a where (lower([prop1]) > 'foo') and ischildnode(a, '/testroot')
+select [jcr:path], [jcr:score], * from [nt:base] as a where lower([prop1]) > 'foo' and ischildnode(a, '/testroot')
 
 xpath2sql /jcr:root/testroot/*[fn:lower-case(@prop1) <> 'foo']
-select [jcr:path], [jcr:score], * from [nt:base] as a where (lower([prop1]) <> 'foo') and ischildnode(a, '/testroot')
+select [jcr:path], [jcr:score], * from [nt:base] as a where lower([prop1]) <> 'foo' and ischildnode(a, '/testroot')
 
 xpath2sql /jcr:root/testroot/*[@prop1 = 1 and fn:name() = 'node1']
-select [jcr:path], [jcr:score], * from [nt:base] as a where (([prop1] = 1) and (name(a) = 'node1')) and ischildnode(a, '/testroot')
+select [jcr:path], [jcr:score], * from [nt:base] as a where [prop1] = 1 and name(a) = 'node1' and ischildnode(a, '/testroot')
 
 # sling queries
 
 xpath2sql //element(*,mix:language)[fn:lower-case(@jcr:language)='en']//element(*,sling:Message)[@sling:message]/(@sling:key|@sling:message)
-select [jcr:path], [jcr:score], [sling:key], [sling:message] from [sling:Message] as a where (lower([jcr:language]) = 'en') and ([sling:message] is not null)
+select b.[jcr:path], b.[jcr:score], b.[sling:key], b.[sling:message] from [mix:language] as a inner join [sling:Message] as b on isdescendantnode(b, a) where lower(a.[jcr:language]) = 'en' and b.[sling:message] is not null
 
 xpath2sql //element(*,mix:language)[fn:upper-case(@jcr:language)='en']//element(*,sling:Message)[@sling:message]/(@sling:key|@sling:message)
-select [jcr:path], [jcr:score], [sling:key], [sling:message] from [sling:Message] as a where (upper([jcr:language]) = 'en') and ([sling:message] is not null)
+select b.[jcr:path], b.[jcr:score], b.[sling:key], b.[sling:message] from [mix:language] as a inner join [sling:Message] as b on isdescendantnode(b, a) where upper(a.[jcr:language]) = 'en' and b.[sling:message] is not null
 
 # jboss example queries
 
@@ -126,16 +126,16 @@ select [jcr:path], [jcr:score], [my:titl
 # other queries
 
 xpath2sql /jcr:root/testdata/node[@jcr:primaryType]
-select [jcr:path], [jcr:score], * from [nt:base] as a where ([jcr:primaryType] is not null) and issamenode(a, '/testdata/node')
+select [jcr:path], [jcr:score], * from [nt:base] as a where [jcr:primaryType] is not null and issamenode(a, '/testdata/node')
 
 xpath2sql //testroot/*[@jcr:primaryType='nt:unstructured'] order by @prop2, @prop1
-invalid: Query: //testroot/*(*)[@jcr:primaryType='nt:unstructured'] order by @prop2, @prop1; expected: non-path condition
+select b.[jcr:path], b.[jcr:score], b.* from [nt:base] as a inner join [nt:base] as b on ischildnode(b, a) where name(a) = 'testroot' and b.[jcr:primaryType] = 'nt:unstructured' order by b.[prop2], b.[prop1]
 
 xpath2sql /jcr:root/test//jcr:xmltext
-select [jcr:path], [jcr:score], * from [nt:base] as a where isdescendantnode(a, '/test') and (name(a) = 'jcr:xmltext')
+select [jcr:path], [jcr:score], * from [nt:base] as a where name(a) = 'jcr:xmltext' and isdescendantnode(a, '/test')
 
 xpath2sql /jcr:root/test//text()
-select [jcr:path], [jcr:score], * from [nt:base] as a where isdescendantnode(a, '/test') and (name(a) = 'jcr:xmltext')
+select [jcr:path], [jcr:score], * from [nt:base] as a where name(a) = 'jcr:xmltext' and isdescendantnode(a, '/test')
 
 xpath2sql /jcr:root/test/jcr:xmltext
 select [jcr:path], [jcr:score], * from [nt:base] as a where issamenode(a, '/test/jcr:xmltext')
@@ -150,7 +150,7 @@ xpath2sql //*[@name='Hello']
 select [jcr:path], [jcr:score], * from [nt:base] as a where [name] = 'Hello'
 
 xpath2sql /jcr:root//*[@name='Hello']
-select [jcr:path], [jcr:score], * from [nt:base] as a where ([name] = 'Hello') and isdescendantnode(a, '/')
+select [jcr:path], [jcr:score], * from [nt:base] as a where [name] = 'Hello' and isdescendantnode(a, '/')
 
 xpath2sql content/*
 select [jcr:path], [jcr:score], * from [nt:base] as a where ischildnode(a, '/content')
@@ -159,10 +159,10 @@ xpath2sql content//*
 select [jcr:path], [jcr:score], * from [nt:base] as a where isdescendantnode(a, '/content')
 
 xpath2sql content//*[@name='Hello']
-select [jcr:path], [jcr:score], * from [nt:base] as a where ([name] = 'Hello') and isdescendantnode(a, '/content')
+select [jcr:path], [jcr:score], * from [nt:base] as a where [name] = 'Hello' and isdescendantnode(a, '/content')
 
 xpath2sql /jcr:root/content//*[@name='Hello']
-select [jcr:path], [jcr:score], * from [nt:base] as a where ([name] = 'Hello') and isdescendantnode(a, '/content')
+select [jcr:path], [jcr:score], * from [nt:base] as a where [name] = 'Hello' and isdescendantnode(a, '/content')
 
 xpath2sql //*[jcr:contains(., 'test')] order by @jcr:score
 select [jcr:path], [jcr:score], * from [nt:base] as a where contains(*, 'test') order by [jcr:score]
@@ -174,43 +174,43 @@ xpath2sql /jcr:root//element(*, test)
 select [jcr:path], [jcr:score], * from [test] as a where isdescendantnode(a, '/')
 
 xpath2sql /jcr:root//element(*, user)[test/@jcr:primaryType]
-select [jcr:path], [jcr:score], * from [user] as a where ([test/jcr:primaryType] is not null) and isdescendantnode(a, '/')
+select [jcr:path], [jcr:score], * from [user] as a where [test/jcr:primaryType] is not null and isdescendantnode(a, '/')
 
 xpath2sql /jcr:root/content//*[(@sling:resourceType = 'start')]
-select [jcr:path], [jcr:score], * from [nt:base] as a where ([sling:resourceType] = 'start') and isdescendantnode(a, '/content')
+select [jcr:path], [jcr:score], * from [nt:base] as a where [sling:resourceType] = 'start' and isdescendantnode(a, '/content')
 
 xpath2sql /jcr:root/content//*[(@sling:resourceType = 'page')]
-select [jcr:path], [jcr:score], * from [nt:base] as a where ([sling:resourceType] = 'page') and isdescendantnode(a, '/content')
+select [jcr:path], [jcr:score], * from [nt:base] as a where [sling:resourceType] = 'page' and isdescendantnode(a, '/content')
 
 xpath2sql /jcr:root/content//*[@offTime > xs:dateTime('2012-03-28T15:56:18.327+02:00') or @onTime > xs:dateTime('2012-03-28T15:56:18.327+02:00')]
-select [jcr:path], [jcr:score], * from [nt:base] as a where (([offTime] > cast('2012-03-28T15:56:18.327+02:00' as date)) or ([onTime] > cast('2012-03-28T15:56:18.327+02:00' as date))) and isdescendantnode(a, '/content')
+select [jcr:path], [jcr:score], * from [nt:base] as a where ([offTime] > cast('2012-03-28T15:56:18.327+02:00' as date) or [onTime] > cast('2012-03-28T15:56:18.327+02:00' as date)) and isdescendantnode(a, '/content')
 
 xpath2sql /jcr:root/content/campaigns//*[@jcr:primaryType='Page'] order by jcr:content/@lastModified descending
-select [jcr:path], [jcr:score], * from [nt:base] as a where ([jcr:primaryType] = 'Page') and isdescendantnode(a, '/content/campaigns') order by [jcr:content/lastModified] desc
+select [jcr:path], [jcr:score], * from [nt:base] as a where [jcr:primaryType] = 'Page' and isdescendantnode(a, '/content/campaigns') order by [jcr:content/lastModified] desc
 
 xpath2sql /jcr:root/content/campaigns//element(*, PageContent)[(@sling:resourceType = 'teaser' or @sling:resourceType = 'newsletter' or @teaserPageType = 'newsletter' or @teaserPageType = 'tweet') and ((@onTime < xs:dateTime('2012-04-01T00:00:00.000+02:00')) or not(@onTime)) and ((@offTime >= xs:dateTime('2012-02-26T00:00:00.000+01:00')) or not(@offTime))] order by @onTime
-select [jcr:path], [jcr:score], * from [PageContent] as a where (((((([sling:resourceType] = 'teaser') or ([sling:resourceType] = 'newsletter')) or ([teaserPageType] = 'newsletter')) or ([teaserPageType] = 'tweet')) and (([onTime] < cast('2012-04-01T00:00:00.000+02:00' as date)) or ([onTime] is null))) and (([offTime] >= cast('2012-02-26T00:00:00.000+01:00' as date)) or ([offTime] is null))) and isdescendantnode(a, '/content/campaigns') order by [onTime]
+select [jcr:path], [jcr:score], * from [PageContent] as a where ([sling:resourceType] = 'teaser' or [sling:resourceType] = 'newsletter' or [teaserPageType] = 'newsletter' or [teaserPageType] = 'tweet') and ([onTime] < cast('2012-04-01T00:00:00.000+02:00' as date) or [onTime] is null) and ([offTime] >= cast('2012-02-26T00:00:00.000+01:00' as date) or [offTime] is null) and isdescendantnode(a, '/content/campaigns') order by [onTime]
 
 xpath2sql /jcr:root/content/dam//element(*, asset)
 select [jcr:path], [jcr:score], * from [asset] as a where isdescendantnode(a, '/content/dam')
 
 xpath2sql /jcr:root/content/dam//element(*, asset)[jcr:content/metadata/@dam:scene]
-select [jcr:path], [jcr:score], * from [asset] as a where ([jcr:content/metadata/dam:scene] is not null) and isdescendantnode(a, '/content/dam')
+select [jcr:path], [jcr:score], * from [asset] as a where [jcr:content/metadata/dam:scene] is not null and isdescendantnode(a, '/content/dam')
 
 xpath2sql /jcr:root/etc/cloud//*[(@sling:resourceType = 'framework')]
-select [jcr:path], [jcr:score], * from [nt:base] as a where ([sling:resourceType] = 'framework') and isdescendantnode(a, '/etc/cloud')
+select [jcr:path], [jcr:score], * from [nt:base] as a where [sling:resourceType] = 'framework' and isdescendantnode(a, '/etc/cloud')
 
 xpath2sql /jcr:root/etc/cloud//*[(@sling:resourceType = 'analytics')]
-select [jcr:path], [jcr:score], * from [nt:base] as a where ([sling:resourceType] = 'analytics') and isdescendantnode(a, '/etc/cloud')
+select [jcr:path], [jcr:score], * from [nt:base] as a where [sling:resourceType] = 'analytics' and isdescendantnode(a, '/etc/cloud')
 
 xpath2sql /jcr:root/etc/reports//*[@jcr:primaryType='Page'] order by jcr:content/@lastModified descending
-select [jcr:path], [jcr:score], * from [nt:base] as a where ([jcr:primaryType] = 'Page') and isdescendantnode(a, '/etc/reports') order by [jcr:content/lastModified] desc
+select [jcr:path], [jcr:score], * from [nt:base] as a where [jcr:primaryType] = 'Page' and isdescendantnode(a, '/etc/reports') order by [jcr:content/lastModified] desc
 
 xpath2sql /jcr:root/etc/segment//*[@jcr:primaryType='Page'] order by jcr:content/@lastModified descending
-select [jcr:path], [jcr:score], * from [nt:base] as a where ([jcr:primaryType] = 'Page') and isdescendantnode(a, '/etc/segment') order by [jcr:content/lastModified] desc
+select [jcr:path], [jcr:score], * from [nt:base] as a where [jcr:primaryType] = 'Page' and isdescendantnode(a, '/etc/segment') order by [jcr:content/lastModified] desc
 
 xpath2sql /jcr:root/etc/workflow//element(*,Item)[not(meta/@archived) and not(meta/@archived = true)]
-select [jcr:path], [jcr:score], * from [Item] as a where (([meta/archived] is null) and not([meta/archived] = true)) and isdescendantnode(a, '/etc/workflow')
+select [jcr:path], [jcr:score], * from [Item] as a where [meta/archived] is null and not([meta/archived] = true) and isdescendantnode(a, '/etc/workflow')
 
 xpath2sql /jcr:root/home//element()
 select [jcr:path], [jcr:score], * from [nt:base] as a where isdescendantnode(a, '/home')
@@ -275,13 +275,13 @@ xpath2sql //element(*, my:type)[@my:valu
 select [jcr:path], [jcr:score], * from [my:type] as a where [my:value] <> 'Joe''s Caffee'
 
 xpath2sql //element(*, my:type)[(not(@my:title) and @my:subject)]
-select [jcr:path], [jcr:score], * from [my:type] as a where ([my:title] is null) and ([my:subject] is not null)
+select [jcr:path], [jcr:score], * from [my:type] as a where [my:title] is null and [my:subject] is not null
 
 xpath2sql //element(*, my:type)[not(@my:title) or @my:subject]
-select [jcr:path], [jcr:score], * from [my:type] as a where ([my:title] is null) or ([my:subject] is not null)
+select [jcr:path], [jcr:score], * from [my:type] as a where [my:title] is null or [my:subject] is not null
 
 xpath2sql //element(*, my:type)[not(@my:value > 0 and @my:value < 100)]
-select [jcr:path], [jcr:score], * from [my:type] as a where not(([my:value] > 0) and ([my:value] < 100))
+select [jcr:path], [jcr:score], * from [my:type] as a where not([my:value] > 0 and [my:value] < 100)
 
 xpath2sql //element(*, my:type) order by @jcr:lastModified
 select [jcr:path], [jcr:score], * from [my:type] as a order by [jcr:lastModified]



Mime
View raw message