Package com.mckoi.database
Class QueryPlan.GroupNode
java.lang.Object
com.mckoi.database.QueryPlan.SingleQueryPlanNode
com.mckoi.database.QueryPlan.GroupNode
- All Implemented Interfaces:
QueryPlanNode
,Serializable
,Cloneable
- Enclosing class:
- QueryPlan
The node for performing a grouping operation on the columns of the child
node. As well as grouping, any aggregate functions must also be defined
with this plan.
NOTE: The whole child is a group if columns is null.
- See Also:
-
Field Summary
Fields inherited from class com.mckoi.database.QueryPlan.SingleQueryPlanNode
child
-
Constructor Summary
ConstructorsConstructorDescriptionGroupNode
(QueryPlanNode child, Variable[] columns, Variable group_max_column, Expression[] function_list, String[] name_list) Groups over the given columns from the child.GroupNode
(QueryPlanNode child, Variable group_max_column, Expression[] function_list, String[] name_list) Groups over the entire child (always ends in 1 result in set). -
Method Summary
Modifier and TypeMethodDescriptionclone()
Deep clone.discoverCorrelatedVariables
(int level, ArrayList list) Default implementation that discovers correlated variables for the given offset level.discoverTableNames
(ArrayList list) Default implementation delegates responsibility to child.evaluate
(QueryContext context) Evaluates the node and returns the result as a Table.Methods inherited from class com.mckoi.database.QueryPlan.SingleQueryPlanNode
child, debugString
-
Constructor Details
-
GroupNode
public GroupNode(QueryPlanNode child, Variable[] columns, Variable group_max_column, Expression[] function_list, String[] name_list) Groups over the given columns from the child. -
GroupNode
public GroupNode(QueryPlanNode child, Variable group_max_column, Expression[] function_list, String[] name_list) Groups over the entire child (always ends in 1 result in set).
-
-
Method Details
-
evaluate
Description copied from interface:QueryPlanNode
Evaluates the node and returns the result as a Table. The VariableResolver resolves any outer variables -
discoverTableNames
Description copied from class:QueryPlan.SingleQueryPlanNode
Default implementation delegates responsibility to child.- Specified by:
discoverTableNames
in interfaceQueryPlanNode
- Overrides:
discoverTableNames
in classQueryPlan.SingleQueryPlanNode
-
clone
Description copied from class:QueryPlan.SingleQueryPlanNode
Deep clone.- Specified by:
clone
in interfaceQueryPlanNode
- Overrides:
clone
in classQueryPlan.SingleQueryPlanNode
- Throws:
CloneNotSupportedException
-
titleString
- Overrides:
titleString
in classQueryPlan.SingleQueryPlanNode
-