Class Values

    • Field Detail

      • IS_EMPTY_J

        public static final java.util.function.Predicate<? super Values> IS_EMPTY_J
      • IS_EMPTY

        @Deprecated
        public static final com.google.common.base.Predicate<? super Values> IS_EMPTY
        Deprecated.
      • IS_NOT_EMPTY

        @Deprecated
        public static final com.google.common.base.Predicate<? super Values> IS_NOT_EMPTY
        Deprecated.
      • tuples

        public final com.google.common.collect.ImmutableList<com.google.common.collect.ImmutableList<RexLiteral>> tuples
    • Constructor Detail

      • Values

        protected Values​(RelOptCluster cluster,
                         RelDataType rowType,
                         com.google.common.collect.ImmutableList<com.google.common.collect.ImmutableList<RexLiteral>> tuples,
                         RelTraitSet traits)
        Creates a new Values.

        Note that tuples passed in become owned by this rel (without a deep copy), so caller must not modify them after this call, otherwise bad things will happen.

        Parameters:
        cluster - Cluster that this relational expression belongs to
        rowType - Row type for tuples produced by this rel
        tuples - 2-dimensional array of tuple values to be produced; outer list contains tuples; each inner list is one tuple; all tuples must be of same length, conforming to rowType
      • Values

        public Values​(RelInput input)
        Creates a Values by parsing serialized output.
    • Method Detail

      • apply

        private static java.lang.Object apply​(com.google.common.collect.ImmutableList<RexLiteral> tuple)
        Helps render tuples as strings.
      • isEmpty

        public static boolean isEmpty​(Values values)
        Predicate, to be used when defining an operand of a RelOptRule, that returns true if a Values contains zero tuples.

        This is the conventional way to represent an empty relational expression. There are several rules that recognize empty relational expressions and prune away that section of the tree.

      • isNotEmpty

        public static boolean isNotEmpty​(Values values)
        Predicate, to be used when defining an operand of a RelOptRule, that returns true if a Values contains one or more tuples.

        This is the conventional way to represent an empty relational expression. There are several rules that recognize empty relational expressions and prune away that section of the tree.

      • getTuples

        public com.google.common.collect.ImmutableList<com.google.common.collect.ImmutableList<RexLiteral>> getTuples​(RelInput input)
      • getTuples

        public com.google.common.collect.ImmutableList<com.google.common.collect.ImmutableList<RexLiteral>> getTuples()
        Returns the rows of literals represented by this Values relational expression.
      • assertRowType

        private boolean assertRowType()
        Returns true if all tuples match rowType; otherwise, assert on mismatch.