Class SimpleFilterNode

  • All Implemented Interfaces:
    java.lang.Cloneable

    public class SimpleFilterNode
    extends SelectNode
    This select plan node implements a simple filter of a subplan based on a predicate.
    • Constructor Detail

    • Method Detail

      • equals

        public boolean equals​(java.lang.Object obj)
        Returns true if the passed-in object is a SimpleFilterNode with the same predicate and child sub-expression.
        Specified by:
        equals in class PlanNode
        Parameters:
        obj - the object to check for equality
        Returns:
        true if the passed-in object is equal to this object; false otherwise
      • hashCode

        public int hashCode()
        Computes the hashcode of a PlanNode. This method is used to see if two plan nodes CAN be equal.
        Specified by:
        hashCode in class PlanNode
        Returns:
        the hash code for the plan node and any subnodes it may contain.
      • clone

        protected PlanNode clone()
                          throws java.lang.CloneNotSupportedException
        Creates a copy of this simple filter node node and its subtree. This method is used by PlanNode.duplicate() to copy a plan tree.
        Overrides:
        clone in class SelectNode
        Throws:
        java.lang.CloneNotSupportedException
      • toString

        public java.lang.String toString()
        Description copied from class: PlanNode
        Reports this node and its vital parameters as a string.
        Specified by:
        toString in class PlanNode
        Returns:
        the node in string format.
      • resultsOrderedBy

        public java.util.List<OrderByExpression> resultsOrderedBy()
        This node's results are sorted if its subplan produces sorted results.
        Specified by:
        resultsOrderedBy in class PlanNode
        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:
        supportsMarking in class PlanNode
        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:
        requiresLeftMarking in class PlanNode
        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:
        requiresRightMarking in class PlanNode
        Returns:
        true if the node requires that its right child supports marking, false otherwise.
      • 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.
        Specified by:
        prepare in class PlanNode
      • initialize

        public void initialize()
        Description copied from class: SelectNode
        Do initialization for the select operation. Resets state variables.
        Overrides:
        initialize in class SelectNode
      • 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.
        Specified by:
        cleanUp in class PlanNode
      • advanceCurrentTuple

        protected void advanceCurrentTuple()
        Description copied from class: SelectNode
        Helper function that advances the current tuple reference in the node.
        Specified by:
        advanceCurrentTuple in class SelectNode
      • markCurrentPosition

        public void markCurrentPosition()
        The simple filter node relies on marking/reset support in its subplan.
        Overrides:
        markCurrentPosition in class PlanNode
      • resetToLastMark

        public void resetToLastMark()
        The simple filter node relies on marking/reset support in its subplan.
        Overrides:
        resetToLastMark in class PlanNode