Enum JavaRowFormat

  • All Implemented Interfaces:
    java.io.Serializable, java.lang.Comparable<JavaRowFormat>

    public enum JavaRowFormat
    extends java.lang.Enum<JavaRowFormat>
    How a row is represented as a Java value.
    • Enum Constant Detail

      • LIST

        public static final JavaRowFormat LIST
        A list that is comparable and immutable. Useful for records with 0 fields (empty list is a good singleton) but sometimes also for records with 2 or more fields that you need to be comparable, say as a key in a lookup.
    • Constructor Detail

      • JavaRowFormat

        private JavaRowFormat()
    • Method Detail

      • values

        public static JavaRowFormat[] values()
        Returns an array containing the constants of this enum type, in the order they are declared. This method may be used to iterate over the constants as follows:
        for (JavaRowFormat c : JavaRowFormat.values())
        an array containing the constants of this enum type, in the order they are declared
      • valueOf

        public static JavaRowFormat valueOf​(java.lang.String name)
        Returns the enum constant of this type with the specified name. The string must match exactly an identifier used to declare an enum constant in this type. (Extraneous whitespace characters are not permitted.)
        name - the name of the enum constant to be returned.
        the enum constant with the specified name
        java.lang.IllegalArgumentException - if this enum type has no constant with the specified name
        java.lang.NullPointerException - if the argument is null
      • javaFieldClass

        abstract java.lang.reflect.Type javaFieldClass​(JavaTypeFactory typeFactory,
                                                       RelDataType type,
                                                       int index)
        Returns the java class that is used to physically store the given field. For instance, a non-null int field can still be stored in a field of type Object.class in ARRAY case.
        typeFactory - type factory to resolve java types
        type - row type
        index - field index
        java type used to store the field
      • record

        public abstract Expression record​(java.lang.reflect.Type javaRowClass,
                                          java.util.List<Expression> expressions)
      • field

        public abstract Expression field​(Expression expression,
                                         int field,
                                         java.lang.reflect.Type fromType,
                                         java.lang.reflect.Type fieldType)
        Returns a reference to a particular field.

        fromType may be null; if null, uses the natural type of the field.