java.lang.Object
io.confluent.kafka.schemaregistry.type.logical.Schema.Field
Enclosing class:
Schema

public static class Schema.Field extends Object
  • Constructor Details

  • Method Details

    • getName

      public String getName()
    • getSchema

      public Schema getSchema()
    • getPosition

      public int getPosition()
    • getDefaultValue

      public Object getDefaultValue()
    • hasDefaultValue

      public boolean hasDefaultValue()
    • hasDerivedDefault

      public boolean hasDerivedDefault()
      See derivedDefault. Always false unless a converter set it.
    • getDoc

      public String getDoc()
    • getTags

      public List<String> getTags()
    • getParams

      public Map<String,Object> getParams()
    • getFieldNumber

      public Integer getFieldNumber()
      The field's explicit Protobuf field number, or null when it is not recorded. The Protobuf reader records Schema.PROTOBUF_FIELD_NUMBER all-or-nothing per message: it records every field's number when the message's numbering is non-trivial, and records none when the numbers are exactly the sequence the writer reproduces positionally. So null means "the message was trivially sequential", not "unknown": the number is this field's ordinal (starting at 1) in the writer's regulars-then-oneofs emission order, which the writer re-derives on its own. Do not reconstruct it from getPosition() — that is unreliable for a message containing a oneof (positions are duplicated/out of order), and oneof branches have no position at all. A stable, format-agnostic read point for the rename/identity signal; the value's origin is Protobuf-specific but any Field can be asked.
    • getAliases

      public List<String> getAliases()
      The field's Avro aliases (its previous names), or an empty list when Schema.AVRO_ALIASES is unset. Populated by the Avro reader, but also settable through a DDL WITH clause or Schema.setParams(java.util.Map<java.lang.String, java.lang.Object>), in which case the values are returned as written. Stored comma-delimited; see Schema.AVRO_ALIASES.
    • getRules

      public List<Rule> getRules()
      Validation rules attached to this field — CHECK constraints written at the column level. Each rule's expr (CEL) must evaluate to true for the field's value to be considered valid.
    • equals

      public boolean equals(Object o)
      Overrides:
      equals in class Object
    • hashCode

      public int hashCode()
      Overrides:
      hashCode in class Object
    • toString

      public String toString()
      Overrides:
      toString in class Object