Package com.mckoi.database.interpret
Class Planner.PlanTableSource
- java.lang.Object
-
- com.mckoi.database.interpret.Planner.PlanTableSource
-
- Enclosing class:
- Planner
private static class Planner.PlanTableSource extends java.lang.ObjectRepresents a single table source being planned.
-
-
Field Summary
Fields Modifier and Type Field Description private booleanis_updatedSet to true when this source has been updated from when it was constructed or copied.(package private) intleft_join_type(package private) Expressionleft_on_expr(package private) Planner.PlanTableSourceleft_planHow this plan is naturally joined to other plans in the source.private QueryPlanNodeplanThe Plan for this table source.(package private) intright_join_type(package private) Expressionright_on_expr(package private) Planner.PlanTableSourceright_planHow this plan is naturally joined to other plans in the source.private java.lang.String[]unique_namesThe list of unique key names of the tables in this plan.private Variable[]var_listThe list of fully qualified Variable objects that are accessable within this plan.
-
Constructor Summary
Constructors Constructor Description PlanTableSource(QueryPlanNode plan, Variable[] var_list, java.lang.String[] table_unique_names)Constructor.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description booleancontainsUniqueKey(java.lang.String name)Returns true if this table source contains the unique table name reference.booleancontainsVariable(Variable v)Returns true if this table source contains the variable reference.Planner.PlanTableSourcecopy()Makes a copy of this table source.QueryPlanNodegetPlan()Returns the plan for this table source.booleanisUpdated()Returns true if the planner was updated.(package private) voidsetJoinInfoMergedBetween(Planner.PlanTableSource left, Planner.PlanTableSource right)This is called when two plans are merged together to set up the left and right join information for the new plan.(package private) voidsetLeftJoinInfo(Planner.PlanTableSource left_plan, int join_type, Expression on_expr)Sets the left join information for this plan.(package private) voidsetRightJoinInfo(Planner.PlanTableSource right_plan, int join_type, Expression on_expr)Sets the right join information for this plan.voidsetUpdated()Sets the updated flag.voidupdatePlan(QueryPlanNode node)Updates the plan.
-
-
-
Field Detail
-
plan
private QueryPlanNode plan
The Plan for this table source.
-
var_list
private final Variable[] var_list
The list of fully qualified Variable objects that are accessable within this plan.
-
unique_names
private final java.lang.String[] unique_names
The list of unique key names of the tables in this plan.
-
is_updated
private boolean is_updated
Set to true when this source has been updated from when it was constructed or copied.
-
left_plan
Planner.PlanTableSource left_plan
How this plan is naturally joined to other plans in the source. A plan either has no dependance, a left or a right dependance, or a left and right dependance.
-
right_plan
Planner.PlanTableSource right_plan
How this plan is naturally joined to other plans in the source. A plan either has no dependance, a left or a right dependance, or a left and right dependance.
-
left_join_type
int left_join_type
-
right_join_type
int right_join_type
-
left_on_expr
Expression left_on_expr
-
right_on_expr
Expression right_on_expr
-
-
Constructor Detail
-
PlanTableSource
public PlanTableSource(QueryPlanNode plan, Variable[] var_list, java.lang.String[] table_unique_names)
Constructor.
-
-
Method Detail
-
setLeftJoinInfo
void setLeftJoinInfo(Planner.PlanTableSource left_plan, int join_type, Expression on_expr)
Sets the left join information for this plan.
-
setRightJoinInfo
void setRightJoinInfo(Planner.PlanTableSource right_plan, int join_type, Expression on_expr)
Sets the right join information for this plan.
-
setJoinInfoMergedBetween
void setJoinInfoMergedBetween(Planner.PlanTableSource left, Planner.PlanTableSource right)
This is called when two plans are merged together to set up the left and right join information for the new plan. This sets the left join info from the left plan and the right join info from the right plan.
-
containsVariable
public boolean containsVariable(Variable v)
Returns true if this table source contains the variable reference.
-
containsUniqueKey
public boolean containsUniqueKey(java.lang.String name)
Returns true if this table source contains the unique table name reference.
-
setUpdated
public void setUpdated()
Sets the updated flag.
-
updatePlan
public void updatePlan(QueryPlanNode node)
Updates the plan.
-
getPlan
public QueryPlanNode getPlan()
Returns the plan for this table source.
-
isUpdated
public boolean isUpdated()
Returns true if the planner was updated.
-
copy
public Planner.PlanTableSource copy()
Makes a copy of this table source.
-
-