Class VariableBytes

java.lang.Object
org.apache.beam.sdk.schemas.logicaltypes.PassThroughLogicalType<byte[]>
org.apache.beam.sdk.schemas.logicaltypes.VariableBytes
All Implemented Interfaces:
Serializable, Schema.LogicalType<byte[],byte[]>

public class VariableBytes extends PassThroughLogicalType<byte[]>
A LogicalType representing a variable-length byte array with specified maximum length.
See Also:
  • Field Details

    • IDENTIFIER

      public static final String IDENTIFIER
  • Method Details

    • of

      public static VariableBytes of(@Nullable String name, int maxByteArrayLength)
      Return an instance of VariableBytes with specified max byte array length.

      The name, if set, refers to the TYPE name in the underlying database, for example, VARBINARY and LONGVARBINARY.

    • of

      public static VariableBytes of(int maxByteArrayLength)
      Return an instance of VariableBytes with specified max byte array length.
    • getMaxLength

      public int getMaxLength()
    • getName

      public @Nullable String getName()
    • toInputType

      public byte[] toInputType(byte[] base)
      Description copied from interface: Schema.LogicalType
      Convert the Java type used by the base Schema.FieldType to the input type.
      Specified by:
      toInputType in interface Schema.LogicalType<byte[],byte[]>
      Overrides:
      toInputType in class PassThroughLogicalType<byte[]>
    • toString

      public String toString()
      Overrides:
      toString in class Object