Enum JavaRowFormat

java.lang.Object
java.lang.Enum<JavaRowFormat>
org.apache.calcite.adapter.enumerable.JavaRowFormat
All Implemented Interfaces:
Serializable, Comparable<JavaRowFormat>, Constable

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

    • CUSTOM

      public static final JavaRowFormat CUSTOM
    • SCALAR

      public static final JavaRowFormat SCALAR
    • 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.
    • ROW

      public static final JavaRowFormat ROW
      See Row.
    • ARRAY

      public static final JavaRowFormat ARRAY
  • Method Details

    • values

      public static JavaRowFormat[] values()
      Returns an array containing the constants of this enum type, in the order they are declared.
      Returns:
      an array containing the constants of this enum type, in the order they are declared
    • valueOf

      public static JavaRowFormat valueOf(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.)
      Parameters:
      name - the name of the enum constant to be returned.
      Returns:
      the enum constant with the specified name
      Throws:
      IllegalArgumentException - if this enum type has no constant with the specified name
      NullPointerException - if the argument is null
    • optimize

      public JavaRowFormat optimize(RelDataType rowType)
    • record

      public abstract Expression record(Type javaRowClass, List<Expression> expressions)
    • comparer

      public @Nullable Expression comparer()
    • field

      public abstract Expression field(Expression expression, int field, @Nullable Type fromType, Type fieldType)
      Returns a reference to a particular field.

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