Enum Class CelExecutor.UnsignedFieldType

java.lang.Object
java.lang.Enum<CelExecutor.UnsignedFieldType>
io.confluent.kafka.schemaregistry.rules.cel.CelExecutor.UnsignedFieldType
All Implemented Interfaces:
Serializable, Comparable<CelExecutor.UnsignedFieldType>, Constable
Enclosing class:
CelExecutor

public static enum CelExecutor.UnsignedFieldType extends Enum<CelExecutor.UnsignedFieldType>
How a protobuf unsigned integer field is presented to CEL by CelFieldExecutor, selected by CelExecutor.CEL_UNSIGNED_FIELD_TYPE.
  • INT — the field binds as a signed CEL int carrying the Long or Integer protobuf reflection hands back. A rule written with a plain integer literal (value == 25) compiles and one written against the field's declared type (value == 25u) does not, and a value above Long.MAX_VALUE compares as negative. This is what domain rules shipped with, so it stays the default.
  • UINT — the field binds as a CEL uint carrying an UnsignedLong. That is what protobuf's own type says, what the Go and Python clients and protovalidate-java do, and what CelValidator does unconditionally for inline validation rules. Unsigned literals work and large values compare correctly; equality and arithmetic against a plain integer literal stop type-checking, because CEL declares no mixed uint/int overloads for them. Ordering keeps working either way, through heterogeneous numeric comparisons.
  • Enum Constant Details

  • Field Details

    • DEFAULT

      public static final CelExecutor.UnsignedFieldType DEFAULT
      The mode when none is declared. Unsigned fields stay signed, as they always have.
  • Method Details

    • values

      public static CelExecutor.UnsignedFieldType[] 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 CelExecutor.UnsignedFieldType 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
    • fromString

      public static CelExecutor.UnsignedFieldType fromString(String s)