Enum Class UnsignedOptions.Behavior

java.lang.Object
java.lang.Enum<UnsignedOptions.Behavior>
org.apache.beam.sdk.extensions.sbe.UnsignedOptions.Behavior
All Implemented Interfaces:
Serializable, Comparable<UnsignedOptions.Behavior>, Constable
Enclosing class:
UnsignedOptions

public static enum UnsignedOptions.Behavior extends Enum<UnsignedOptions.Behavior>
Defines the exact behavior for unsigned types.
  • Enum Constant Details

    • SAME_BIT_SIGNED

      public static final UnsignedOptions.Behavior SAME_BIT_SIGNED
      Uses the signed primitive with the same bit count.

      If this option is chosen, unsigned types may appear to have negative values when printing or doing math.

      This option is compatible with all types.

    • HIGHER_BIT_SIGNED

      public static final UnsignedOptions.Behavior HIGHER_BIT_SIGNED
      Uses the signed primitive with the next higher bit count.

      If this option is chosen, then all unsigned fields will consume twice as much of the available memory and networking bandwidth.

      This option is incompatible with unsigned 64-bit types. Another option must be chosen for that use case. If provided for 64-bit, then an exception will be thrown.

    • CONVERT_TO_STRING

      public static final UnsignedOptions.Behavior CONVERT_TO_STRING
      Converts the unsigned value to a string representation.

      This will be represented by a Schema.FieldType.STRING in the schema.

      This option is compatible with all types.

    • CONVERT_TO_BIG_DECIMAL

      public static final UnsignedOptions.Behavior CONVERT_TO_BIG_DECIMAL
      Converts the unsigned value to a BigDecimal value.

      This will be represented by a Schema.FieldType.DECIMAL in the schema.

      this option is compatible with all types.

  • Method Details

    • values

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

      public static UnsignedOptions.Behavior valueOf(String name)
      Returns the enum constant of this class with the specified name. The string must match exactly an identifier used to declare an enum constant in this class. (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 class has no constant with the specified name
      NullPointerException - if the argument is null