Class Types.StructType.Field

java.lang.Object
org.apache.gravitino.rel.types.Types.StructType.Field
Enclosing class:
Types.StructType

public static class Types.StructType.Field extends Object
A field of a struct type.
  • Method Details

    • notNullField

      public static Types.StructType.Field notNullField(String name, Type type)
      Parameters:
      name - The name of the field.
      type - The type of the field.
      Returns:
      A NOT NULL Types.StructType.Field with the given name, type and empty comment.
    • notNullField

      public static Types.StructType.Field notNullField(String name, Type type, String comment)
      Parameters:
      name - The name of the field.
      type - The type of the field.
      comment - The comment of the field.
      Returns:
      A NOT NULL Types.StructType.Field with the given name, type and comment.
    • nullableField

      public static Types.StructType.Field nullableField(String name, Type type)
      Parameters:
      name - The name of the field.
      type - The type of the field.
      Returns:
      A nullable Types.StructType.Field with the given name, type and empty comment.
    • nullableField

      public static Types.StructType.Field nullableField(String name, Type type, String comment)
      Parameters:
      name - The name of the field.
      type - The type of the field.
      comment - The comment of the field.
      Returns:
      A nullable Types.StructType.Field with the given name, type and comment.
    • of

      public static Types.StructType.Field of(String name, Type type, boolean nullable, String comment)
      Parameters:
      name - The name of the field.
      type - The type of the field.
      nullable - Whether the field is nullable.
      comment - The comment of the field.
      Returns:
      A nullable Types.StructType.Field with the given name, type and comment.
    • name

      public String name()
      Returns:
      The name of the field.
    • type

      public Type type()
      Returns:
      The type of the field.
    • nullable

      public boolean nullable()
      Returns:
      Whether the field is nullable.
    • comment

      public String comment()
      Returns:
      The comment of the field. May be null if not set.
    • equals

      public boolean equals(Object o)
      Overrides:
      equals in class Object
    • hashCode

      public int hashCode()
      Overrides:
      hashCode in class Object
    • simpleString

      public String simpleString()
      Returns:
      The simple string representation of the field.