Enum Class LogicalTypeVersion

java.lang.Object
java.lang.Enum<LogicalTypeVersion>
io.confluent.kafka.schemaregistry.type.logical.common.LogicalTypeVersion
All Implemented Interfaces:
Serializable, Comparable<LogicalTypeVersion>, Constable

public enum LogicalTypeVersion extends Enum<LogicalTypeVersion>
Selects the wire-format edition emitted by the LogicalType-to-format converters.

V2 is the canonical Logical Types emission. V1 produces schemas wire-compatible with the Flink converters in cc-flink-schema-converters — a strict subset of LT capabilities.

V1 throws ValidationException for LT-only constructs that have no Flink equivalent (UNION, TIME/TIMESTAMP precision > 6 in Avro, ENUM in JSON). It auto-promotes anonymous proto ENUMs to named enums. VARIANT is emitted in both editions — Flink has a native VariantType. It silently skips LT-only metadata that Flink wouldn't carry.

The selected version is also recorded in the Schema Registry metadata under the confluent:edition key, so consumers can identify which edition produced a given schema.

  • Enum Constant Details

  • Method Details

    • values

      public static LogicalTypeVersion[] 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 LogicalTypeVersion 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