- All Implemented Interfaces:
- QueryPlanner
@Singleton
public class AvoidJoinAboveUnionPlanner
extends Object
implements QueryPlanner
When an UNION appears as a child of an inner join, looks for other siblings that could be "pushed under the union".
Criteria for selecting siblings: must be leaf and must naturally join (i.e. share a variable) with the union.
Example:
JOIN
T1(x,y)
UNION(x,z)
T2(x,z)
T3(x,z)
T4(w)
becomes
JOIN
UNION(x,z)
JOIN
T2(x,z)
T1(x,y)
JOIN
T3(x,z)
T1(x,y)
T4(w)
TODO: shall we consider also the joining condition for pushing more siblings?