Class Schema.Field
java.lang.Object
io.confluent.kafka.schemaregistry.type.logical.Schema.Field
- Enclosing class:
- Schema
-
Constructor Summary
ConstructorsConstructorDescriptionField(String name, Schema schema, int position, Object defaultValue, boolean hasDefault, boolean derivedDefault, String doc, List<String> tags, Map<String, Object> params, List<Rule> rules) Field(String name, Schema schema, int position, Object defaultValue, boolean hasDefault, String doc, List<String> tags, Map<String, Object> params) Field(String name, Schema schema, int position, Object defaultValue, boolean hasDefault, String doc, List<String> tags, Map<String, Object> params, List<Rule> rules) -
Method Summary
Modifier and TypeMethodDescriptionbooleanThe field's Avro aliases (its previous names), or an empty list whenSchema.AVRO_ALIASESis unset.getDoc()The field's explicit Protobuf field number, ornullwhen it is not recorded.getName()intgetRules()Validation rules attached to this field — CHECK constraints written at the column level.getTags()booleanbooleanSeederivedDefault.inthashCode()toString()
-
Constructor Details
-
Field
-
Field
-
Field
-
Field
-
-
Method Details
-
getName
-
getSchema
-
getPosition
public int getPosition() -
getDefaultValue
-
hasDefaultValue
public boolean hasDefaultValue() -
hasDerivedDefault
public boolean hasDerivedDefault()SeederivedDefault. Alwaysfalseunless a converter set it. -
getDoc
-
getTags
-
getParams
-
getFieldNumber
The field's explicit Protobuf field number, ornullwhen it is not recorded. The Protobuf reader recordsSchema.PROTOBUF_FIELD_NUMBERall-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. Sonullmeans "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 fromgetPosition()— that is unreliable for a message containing aoneof(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 anyFieldcan be asked. -
getAliases
The field's Avro aliases (its previous names), or an empty list whenSchema.AVRO_ALIASESis unset. Populated by the Avro reader, but also settable through a DDLWITHclause orSchema.setParams(java.util.Map<java.lang.String, java.lang.Object>), in which case the values are returned as written. Stored comma-delimited; seeSchema.AVRO_ALIASES. -
getRules
Validation rules attached to this field — CHECK constraints written at the column level. Each rule'sexpr(CEL) must evaluate to true for the field's value to be considered valid. -
equals
-
hashCode
public int hashCode() -
toString
-