Class FilterJoinRule

    • Field Detail

      • TRUE_PREDICATE

        public static final FilterJoinRule.Predicate TRUE_PREDICATE
        Predicate that always returns true. With this predicate, every filter will be pushed into the ON clause.
      • FILTER_ON_JOIN

        public static final FilterJoinRule FILTER_ON_JOIN
        Rule that pushes predicates from a Filter into the Join below them.
      • DUMB_FILTER_ON_JOIN

        public static final FilterJoinRule DUMB_FILTER_ON_JOIN
        Dumber version of FILTER_ON_JOIN. Not intended for production use, but keeps some tests working for which FILTER_ON_JOIN is too smart.
      • JOIN

        public static final FilterJoinRule JOIN
        Rule that pushes predicates in a Join into the inputs to the join.
      • smart

        private final boolean smart
        Whether to try to strengthen join-type.
      • predicate

        private final FilterJoinRule.Predicate predicate
        Predicate that returns whether a filter is valid in the ON clause of a join for this particular kind of join. If not, Calcite will push it back to above the join.
    • Method Detail

      • validateJoinFilters

        protected void validateJoinFilters​(java.util.List<RexNode> aboveFilters,
                                           java.util.List<RexNode> joinFilters,
                                           Join join,
                                           JoinRelType joinType)
        Validates that target execution framework can satisfy join filters.

        If the join filter cannot be satisfied (for example, if it is l.c1 > r.c2 and the join only supports equi-join), removes the filter from joinFilters and adds it to aboveFilters.

        The default implementation does nothing; i.e. the join can handle all conditions.

        Parameters:
        aboveFilters - Filter above Join
        joinFilters - Filters in join condition
        join - Join
        joinType - JoinRelType could be different from type in Join due to outer join simplification.