Package edu.caltech.nanodb.plannodes
Class SimpleFilterNode
java.lang.Object
edu.caltech.nanodb.plannodes.PlanNode
edu.caltech.nanodb.plannodes.SelectNode
edu.caltech.nanodb.plannodes.SimpleFilterNode
- All Implemented Interfaces:
Cloneable
This select plan node implements a simple filter of a subplan based on a
predicate.
-
Field Summary
Fields inherited from class edu.caltech.nanodb.plannodes.SelectNode
currentTuple, predicateFields inherited from class edu.caltech.nanodb.plannodes.PlanNode
cost, environment, leftChild, rightChild, schema, stats -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionprotected voidHelper function that advances the current tuple reference in the node.voidcleanUp()Perform any necessary clean up tasks.protected PlanNodeclone()Creates a copy of this simple filter node node and its subtree.booleanReturns true if the passed-in object is a SimpleFilterNode with the same predicate and child sub-expression.inthashCode()Computes the hashcode of a PlanNode.voidDo initialization for the select operation.voidThe simple filter node relies on marking/reset support in its subplan.voidprepare()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.booleanThe simple filter node doesn't require any marking from either child.booleanThe simple filter node doesn't require any marking from either child.voidThe simple filter node relies on marking/reset support in its subplan.This node's results are sorted if its subplan produces sorted results.booleanThis node supports marking if its subplan supports marking.toString()Reports this node and its vital parameters as a string.Methods inherited from class edu.caltech.nanodb.plannodes.SelectNode
getNextTuple, isTupleSelectedMethods inherited from class edu.caltech.nanodb.plannodes.PlanNode
addParentEnvironmentToPlanTree, duplicate, getCost, getEnvironment, getSchema, getStats, printNodeTree, printNodeTree, printNodeTree, printNodeTreeToString, printNodeTreeToString, setEnvironment
-
Constructor Details
-
SimpleFilterNode
-
-
Method Details
-
equals
Returns true if the passed-in object is a SimpleFilterNode with the same predicate and child sub-expression. -
hashCode
public int hashCode()Computes the hashcode of a PlanNode. This method is used to see if two plan nodes CAN be equal. -
clone
Creates a copy of this simple filter node node and its subtree. This method is used byPlanNode.duplicate()to copy a plan tree.- Overrides:
clonein classSelectNode- Throws:
CloneNotSupportedException
-
toString
Description copied from class:PlanNodeReports this node and its vital parameters as a string. -
resultsOrderedBy
This node's results are sorted if its subplan produces sorted results.- Specified by:
resultsOrderedByin 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.
-
supportsMarking
public boolean supportsMarking()This node supports marking if its subplan supports marking.- Overrides:
supportsMarkingin classPlanNode- Returns:
- true if the node supports position marking, false otherwise.
-
requiresLeftMarking
public boolean requiresLeftMarking()The simple filter node doesn't require any marking from either child.- Overrides:
requiresLeftMarkingin classPlanNode- Returns:
- true if the node requires that its left child supports marking, false otherwise.
-
requiresRightMarking
public boolean requiresRightMarking()The simple filter node doesn't require any marking from either child.- Overrides:
requiresRightMarkingin classPlanNode- Returns:
- true if the node requires that its right child supports marking, false otherwise.
-
prepare
public void prepare()Description copied from class:PlanNodeThis 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. -
initialize
public void initialize()Description copied from class:SelectNodeDo initialization for the select operation. Resets state variables.- Overrides:
initializein classSelectNode
-
cleanUp
public void cleanUp()Description copied from class:PlanNodePerform any necessary clean up tasks. This should probably be called when we are done with this plan node. -
advanceCurrentTuple
protected void advanceCurrentTuple()Description copied from class:SelectNodeHelper function that advances the current tuple reference in the node.- Specified by:
advanceCurrentTuplein classSelectNode
-
markCurrentPosition
public void markCurrentPosition()The simple filter node relies on marking/reset support in its subplan.- Overrides:
markCurrentPositionin classPlanNode
-
resetToLastMark
public void resetToLastMark()The simple filter node relies on marking/reset support in its subplan.- Overrides:
resetToLastMarkin classPlanNode
-