Description
Currently, no index is used for the join condition. For example, the query:
select * from [nodeTypeA] as a inner join [nodeTypeB] as b on isdescendantnode(b, a) where lower(a.x) = 'y' and b.[property] is not null
currently doesn't take into account that the path of the selector 'a' is known at the time selector 'b' is accessed (given that selector 'a' is executed first). So in this case, the query would use an index on the property b.[property], even if this index has a very bad selectivity (many nodes with this problem), or the query would use the node type index on [nodeTypeB], even if there are many nodes of this type.
Instead, most likely the query should do a traversal, using the isdescendantnode(b, a) join condition.