Class LogicalTypeToDdlConverter
java.lang.Object
io.confluent.kafka.schemaregistry.type.logical.LogicalTypeToDdlConverter
Emits a
LogicalType as DDL text — the inverse of
LogicalTypesSchemaVisitor. Output is canonical (one statement per
line; struct bodies multi-line when more than two fields). Round-trips
through the visitor produce an equivalent LogicalType.
Lossy points (intentional, matching visitor capability):
- External references have no syntactic marker — they're inferred on
read-back from usage.
USING TYPEstatements survive (carrying the wire-format URI binding) but bare externals (no URI) are implicit, identified by appearing in a type position without a matching localSTRUCT/ENUM. - Path-keyed
defaultValuesaren't re-emitted; field-level defaults survive viaSchema.Field.getDefaultValue(). - The single-root sugar is detected and the trailing root-registration
TYPEstatement is elided when it would be redundant. The multi-root UNION sugar is detected similarly.
-
Method Summary
-
Method Details
-
toDdl
-