Previously, subqueries would just extend the existing scope. That's not
the expected Cypher behaviour though - the expectation is that only
imported columns (the WITH inside the CALL) get pulled in. In
addition, the subquery in the CALL { .. } can be the union of queries
that import different subsets of variables from the outer scope!
All this requires a change to the internal Query.SubQuery IR and its
semantics as well as tracking scope much more carefully in the presence
of subqueries (eg. to remove variables from scope).
Previously, subqueries would just extend the existing scope. That's not the expected Cypher behaviour though - the expectation is that only imported columns (the
WITH
inside theCALL
) get pulled in. In addition, the subquery in theCALL { .. }
can be the union of queries that import different subsets of variables from the outer scope!All this requires a change to the internal
Query.SubQuery
IR and its semantics as well as tracking scope much more carefully in the presence of subqueries (eg. to remove variables from scope).