Package com.mckoi.database
Class QueryPlan.CreateFunctionsNode
- java.lang.Object
-
- com.mckoi.database.QueryPlan.SingleQueryPlanNode
-
- com.mckoi.database.QueryPlan.CreateFunctionsNode
-
- All Implemented Interfaces:
QueryPlanNode,java.io.Serializable,java.lang.Cloneable
- Enclosing class:
- QueryPlan
public static class QueryPlan.CreateFunctionsNode extends QueryPlan.SingleQueryPlanNode
The node for merging the child node with a set of new function columns over the entire result. For example, we may want to add an expression 'a + 10' or 'coalesce(a, b, 1)'.- See Also:
- Serialized Form
-
-
Field Summary
-
Fields inherited from class com.mckoi.database.QueryPlan.SingleQueryPlanNode
child
-
-
Constructor Summary
Constructors Constructor Description CreateFunctionsNode(QueryPlanNode child, Expression[] function_list, java.lang.String[] name_list)Constructor.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description java.lang.Objectclone()Deep clone.java.util.ArrayListdiscoverCorrelatedVariables(int level, java.util.ArrayList list)Default implementation that discovers correlated variables for the given offset level.java.util.ArrayListdiscoverTableNames(java.util.ArrayList list)Default implementation delegates responsibility to child.Tableevaluate(QueryContext context)Evaluates the node and returns the result as a Table.java.lang.StringtitleString()-
Methods inherited from class com.mckoi.database.QueryPlan.SingleQueryPlanNode
child, debugString
-
-
-
-
Constructor Detail
-
CreateFunctionsNode
public CreateFunctionsNode(QueryPlanNode child, Expression[] function_list, java.lang.String[] name_list)
Constructor.
-
-
Method Detail
-
evaluate
public Table evaluate(QueryContext context)
Description copied from interface:QueryPlanNodeEvaluates the node and returns the result as a Table. The VariableResolver resolves any outer variables
-
discoverTableNames
public java.util.ArrayList discoverTableNames(java.util.ArrayList list)
Description copied from class:QueryPlan.SingleQueryPlanNodeDefault implementation delegates responsibility to child.- Specified by:
discoverTableNamesin interfaceQueryPlanNode- Overrides:
discoverTableNamesin classQueryPlan.SingleQueryPlanNode
-
discoverCorrelatedVariables
public java.util.ArrayList discoverCorrelatedVariables(int level, java.util.ArrayList list)Description copied from class:QueryPlan.SingleQueryPlanNodeDefault implementation that discovers correlated variables for the given offset level.- Specified by:
discoverCorrelatedVariablesin interfaceQueryPlanNode- Overrides:
discoverCorrelatedVariablesin classQueryPlan.SingleQueryPlanNode
-
clone
public java.lang.Object clone() throws java.lang.CloneNotSupportedExceptionDescription copied from class:QueryPlan.SingleQueryPlanNodeDeep clone.- Specified by:
clonein interfaceQueryPlanNode- Overrides:
clonein classQueryPlan.SingleQueryPlanNode- Throws:
java.lang.CloneNotSupportedException
-
titleString
public java.lang.String titleString()
- Overrides:
titleStringin classQueryPlan.SingleQueryPlanNode
-
-