java.lang.Object
io.confluent.kafka.schemaregistry.rules.cel.builtin.CelTypeLabels

public final class CelTypeLabels extends Object
Canonical CEL type-name labels for the extended types (Decimal, Timestamp, Variant) plus their Java cel-java type decls. The labels are the cross-language spec — every client must use the same strings; the backing Java class is an implementation detail of this client. Timestamp uses CEL's built-in SimpleType.TIMESTAMP so there is no type declaration for it.
  • Field Details

    • DECIMAL_NAME

      public static final String DECIMAL_NAME
      CEL type label for confluent.type.Decimal.
      See Also:
    • TIMESTAMP_NAME

      public static final String TIMESTAMP_NAME
      CEL type label for google.protobuf.Timestamp (= CEL built-in timestamp).
      See Also:
    • VARIANT_NAME

      public static final String VARIANT_NAME
      CEL type label for confluent.type.Variant.
      See Also:
    • DECIMAL

      public static final dev.cel.common.types.StructTypeReference DECIMAL
      Java cel-java type declaration for DECIMAL_NAME.

      A StructTypeReference, not an OpaqueType, and deliberately so. A protobuf confluent.type.Decimal field is typed by cel-java as a struct reference under exactly this name, and CelType.isAssignableFrom is plain equality — so an opaque type of the same name would be a second, permanently incompatible identity for the same logical type. Every mixed pair (this.amount == decimal("0"), decimals.add(this.a, this.b)) would fail to type-check, and no set of extra overloads closes that off completely. Making the two identities one instead means a decimal-typed proto field is accepted by every decimals.* declaration as-is, with no wrapper call.

      The name needs no descriptor registration to be usable: the checker resolves struct references lazily, so Avro and JSON rules — which register no protobuf descriptors at all — type-check against it just as well. Runtime values under this type are CelDecimal (from an Avro boundary conversion, the decimal() constructor, or any decimals.* result) or a proto Decimal message (from protobuf field selection); DecimalUtils.toBigDecimal accepts either.

    • VARIANT

      public static final dev.cel.common.types.OpaqueType VARIANT
      Java cel-java type declaration for VARIANT_NAME.