Class Filter

    • Field Detail

      • condition

        protected final RexNode condition
    • Constructor Detail

      • Filter

        protected Filter​(RelOptCluster cluster,
                         RelTraitSet traits,
                         RelNode child,
                         RexNode condition)
        Creates a filter.
        Parameters:
        cluster - Cluster that this relational expression belongs to
        traits - the traits of this rel
        child - input relational expression
        condition - boolean expression which determines whether a row is allowed to pass
      • Filter

        protected Filter​(RelInput input)
        Creates a Filter by parsing serialized output.
    • Method Detail

      • copy

        public final RelNode copy​(RelTraitSet traitSet,
                                  java.util.List<RelNode> inputs)
        Description copied from interface: RelNode
        Creates a copy of this relational expression, perhaps changing traits and inputs.

        Sub-classes with other important attributes are encouraged to create variants of this method with more parameters.

        Specified by:
        copy in interface RelNode
        Overrides:
        copy in class AbstractRelNode
        Parameters:
        traitSet - Trait set
        inputs - Inputs
        Returns:
        Copy of this relational expression, substituting traits and inputs
      • getChildExps

        public java.util.List<RexNode> getChildExps()
        Description copied from interface: RelNode
        Returns a list of this relational expression's child expressions. (These are scalar expressions, and so do not include the relational inputs that are returned by RelNode.getInputs().

        The caller should treat the list as unmodifiable; typical implementations will return an immutable list. If there are no child expressions, returns an empty list, not null.

        Specified by:
        getChildExps in interface RelNode
        Overrides:
        getChildExps in class AbstractRelNode
        Returns:
        List of this relational expression's child expressions
        See Also:
        RelNode.accept(org.apache.calcite.rex.RexShuttle)
      • accept

        public RelNode accept​(RexShuttle shuttle)
        Description copied from interface: RelNode
        Accepts a visit from a shuttle. If the shuttle updates expression, then a copy of the relation should be created.
        Specified by:
        accept in interface RelNode
        Overrides:
        accept in class AbstractRelNode
        Parameters:
        shuttle - Shuttle
        Returns:
        A copy of this node incorporating changes made by the shuttle to this node's children
      • getCondition

        public RexNode getCondition()
      • isValid

        public boolean isValid​(Litmus litmus,
                               RelNode.Context context)
        Description copied from interface: RelNode
        Returns whether this relational expression is valid.

        If assertions are enabled, this method is typically called with litmus = THROW, as follows:

        assert rel.isValid(Litmus.THROW)

        This signals that the method can throw an AssertionError if it is not valid.

        Specified by:
        isValid in interface RelNode
        Overrides:
        isValid in class AbstractRelNode
        Parameters:
        litmus - What to do if invalid
        context - Context for validity checking
        Returns:
        Whether relational expression is valid
      • estimateFilteredRows

        @Deprecated
        public static double estimateFilteredRows​(RelNode child,
                                                  RexProgram program)
        Deprecated.
      • estimateFilteredRows

        @Deprecated
        public static double estimateFilteredRows​(RelNode child,
                                                  RexNode condition)
        Deprecated.