- Added an AST optimizer level unit test for lifting out a subquery
involving LIMIT and ORDER BY. All the cases which are also handled
by ASTSparql11SubqueryOptimizer have unit tests now.
- Modified logic to replace the JoinGroupNode when lifting out a
sub-select rather than leaving the INCLUDE embedded in the existing
JoinGroupNode. The named subquery name is now something simpler than
a UUID as well (which makes it predicatable for the unit tests).
- Change to lift out subqueries involving aggregates.
- Change to lift out SubqueryRoot if the runOnce query hint is
- Change to lift out subqueries where none of the projected variables
are incoming bound with unit test.
Note: ASK (aka EXISTS/NOT-EXISTS) subqueries are currently NOT lifted.
I need to look into this case further. An ASK subquery currently only
projects the anonymous variable which gets bound depending on whether
or not the ASK subquery has a solution. I need to look at what should
be projected into an ASK subquery and make sure that we are doing that
right and then look at what would be involved in lifting an ASK
- Moved some of the logic for the identification of join variables into
the StaticAnalysis class. We need to develop this logic further and
write unit tests for it as well. The code needs to decide the join
variables based on the position in which the subquery will actually be
run. For the moment it should assume that INCLUDEs run first in a
join group while non-lifted sub-selects run after the required
statement patterns. However, it does not do that and we will have to
modify this again as part of the RTO integration.
- Added convenience method to conditionally create and return the
NamedSubqueriesNode and cleaned up code which was doing this in a
variety of different places.
Committed revision r5323.