Class RelCollationImpl

    • Field Detail

      • EMPTY

        @Deprecated
        public static final RelCollation EMPTY
        Deprecated.
      • PRESERVE

        @Deprecated
        public static final RelCollation PRESERVE
        Deprecated.
      • fieldCollations

        private final com.google.common.collect.ImmutableList<RelFieldCollation> fieldCollations
    • Constructor Detail

      • RelCollationImpl

        protected RelCollationImpl​(com.google.common.collect.ImmutableList<RelFieldCollation> fieldCollations)
    • Method Detail

      • getTraitDef

        public RelTraitDef getTraitDef()
        Description copied from interface: RelTrait
        Returns the RelTraitDef that defines this RelTrait.
        Specified by:
        getTraitDef in interface RelTrait
        Returns:
        the RelTraitDef that defines this RelTrait
      • isTop

        public boolean isTop()
        Description copied from interface: RelMultipleTrait
        Returns whether this trait is satisfied by every instance of the trait (including itself).
        Specified by:
        isTop in interface RelMultipleTrait
      • register

        public void register​(RelOptPlanner planner)
        Description copied from interface: RelTrait
        Registers a trait instance with the planner.

        This is an opportunity to add rules that relate to that trait. However, typical implementations will do nothing.

        Specified by:
        register in interface RelTrait
        Parameters:
        planner - Planner
      • satisfies

        public boolean satisfies​(RelTrait trait)
        Description copied from interface: RelTrait
        Returns whether this trait satisfies a given trait.

        A trait satisfies another if it is the same or stricter. For example, ORDER BY x, y satisfies ORDER BY x.

        A trait's satisfies relation must be a partial order (reflexive, anti-symmetric, transitive). Many traits cannot be "loosened"; their satisfies is an equivalence relation, where only X satisfies X.

        If a trait has multiple values (see RelCompositeTrait) a collection (T0, T1, ...) satisfies T if any Ti satisfies T.

        Specified by:
        satisfies in interface RelTrait
        Parameters:
        trait - Given trait
        Returns:
        Whether this trait subsumes a given trait
      • toString

        public java.lang.String toString()
        Returns a string representation of this collation, suitably terse given that it will appear in plan traces. Examples: "[]", "[2]", "[0 DESC, 1]", "[0 DESC, 1 ASC NULLS LAST]".
        Specified by:
        toString in interface RelTrait
        Overrides:
        toString in class java.lang.Object
      • createSingleton

        @Deprecated
        public static java.util.List<RelCollation> createSingleton​(int fieldIndex)
        Deprecated.
      • isValid

        @Deprecated
        public static boolean isValid​(RelDataType rowType,
                                      java.util.List<RelCollation> collationList,
                                      boolean fail)
        Deprecated.
      • equal

        @Deprecated
        public static boolean equal​(java.util.List<RelCollation> collationList1,
                                    java.util.List<RelCollation> collationList2)
        Deprecated.
      • ordinals

        @Deprecated
        public static java.util.List<java.lang.Integer> ordinals​(RelCollation collation)
        Deprecated.