Package edu.caltech.nanodb.plannodes
Class TableFunctionScanNode
- java.lang.Object
-
- edu.caltech.nanodb.plannodes.PlanNode
-
- edu.caltech.nanodb.plannodes.TableFunctionScanNode
-
- All Implemented Interfaces:
java.lang.Cloneable
public class TableFunctionScanNode extends PlanNode
A select plan-node that produces the output of a specific table-returning function, checking the optional predicate against each tuple. Note that the planner is at the mercy of whatever statistics and other relevant information are reported by the table-returning function.
-
-
Field Summary
Fields Modifier and Type Field Description private TableFunction
tableFunc
The table-returning function whose tuples will be output by this plan-node.-
Fields inherited from class edu.caltech.nanodb.plannodes.PlanNode
cost, environment, leftChild, rightChild, schema, stats
-
-
Constructor Summary
Constructors Constructor Description TableFunctionScanNode(TableFunction tableFunc)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description void
cleanUp()
Perform any necessary clean up tasks.boolean
equals(java.lang.Object obj)
Checks if the argument is a plan node tree with the same structure, but not necesarily the same references.Tuple
getNextTuple()
Gets the next tuple that fulfills the conditions for this plan node.int
hashCode()
Computes the hash-code of a plan-node, including any sub-plans of this plan.void
prepare()
This method is responsible for computing critical details about the plan node, such as the schema of the results that are produced, the estimated cost of evaluating the plan node (and its children), and statistics describing the results produced by the plan node.java.util.List<OrderByExpression>
resultsOrderedBy()
If the results are ordered in some way, this method returns a collection of expressions specifying what columns or expressions the results are ordered by.java.lang.String
toString()
Reports this node and its vital parameters as a string.-
Methods inherited from class edu.caltech.nanodb.plannodes.PlanNode
addParentEnvironmentToPlanTree, clone, duplicate, getCost, getEnvironment, getSchema, getStats, initialize, markCurrentPosition, printNodeTree, printNodeTree, printNodeTree, printNodeTreeToString, printNodeTreeToString, requiresLeftMarking, requiresRightMarking, resetToLastMark, setEnvironment, supportsMarking
-
-
-
-
Field Detail
-
tableFunc
private TableFunction tableFunc
The table-returning function whose tuples will be output by this plan-node.
-
-
Constructor Detail
-
TableFunctionScanNode
public TableFunctionScanNode(TableFunction tableFunc)
-
-
Method Detail
-
getNextTuple
public Tuple getNextTuple()
Description copied from class:PlanNode
Gets the next tuple that fulfills the conditions for this plan node. If the node has a child, it should call getNextTuple() on the child. If the node is a leaf, the tuple comes from some external source such as a table file, the network, etc.- Specified by:
getNextTuple
in classPlanNode
- Returns:
- the next tuple to be generated by this plan, or null if the plan has finished generating plan nodes.
-
resultsOrderedBy
public java.util.List<OrderByExpression> resultsOrderedBy()
Description copied from class:PlanNode
If the results are ordered in some way, this method returns a collection of expressions specifying what columns or expressions the results are ordered by. If the results are not ordered then this method may return either an empty list or a null value.When this method returns a list of ordering expressions, the order of the expressions themselves also matters. The entire set of results will be ordered by the first expression; rows with the same value for the first expression will be ordered by the second expression; etc.
- Specified by:
resultsOrderedBy
in classPlanNode
- Returns:
- If the plan node produces ordered results, this will be a list of objects specifying the ordering. If the node doesn't produce ordered results then the return-value will either be an empty list or it will be null.
-
prepare
public void prepare()
Description copied from class:PlanNode
This method is responsible for computing critical details about the plan node, such as the schema of the results that are produced, the estimated cost of evaluating the plan node (and its children), and statistics describing the results produced by the plan node.
-
cleanUp
public void cleanUp()
Description copied from class:PlanNode
Perform any necessary clean up tasks. This should probably be called when we are done with this plan node.
-
toString
public java.lang.String toString()
Description copied from class:PlanNode
Reports this node and its vital parameters as a string.
-
equals
public boolean equals(java.lang.Object obj)
Description copied from class:PlanNode
Checks if the argument is a plan node tree with the same structure, but not necesarily the same references.
-
hashCode
public int hashCode()
Description copied from class:PlanNode
Computes the hash-code of a plan-node, including any sub-plans of this plan. This method is used to see if two plan nodes (or subtrees) might be equal.
-
-