Module schema

Module schema 

Source
Expand description

Avro schema parsing and representation

Provides types for parsing and representing Avro schema definitions.

Structs§

Array
An array
Attributes
Additional attributes within a Schema
AvroSchema
A wrapper for an Avro schema in its JSON string representation.
Enum
An enumeration
Field
A field within a Record
Fixed
A fixed length binary array
Map
A map
NameGenerator 🔒
Prefix
A stack-allocated, fixed-size buffer for the prefix.
Record
A record
SchemaStore
An in-memory cache of Avro schemas, indexed by their fingerprint.
Type
A type definition that is not a variant of ComplexType

Enums§

ComplexType
A complex type
Fingerprint
A schema fingerprint in one of the supported formats.
FingerprintAlgorithm
Supported fingerprint algorithms for Avro schema identification. For use with Confluent Schema Registry IDs, set to None.
FingerprintStrategy
Defines the strategy for generating the per-record prefix for an Avro binary stream.
Nullability
Avro types are not nullable, with nullability instead encoded as a union where one of the variants is the null type.
PrimitiveType
A primitive type
Schema
An Avro schema
TypeName
Either a PrimitiveType or a reference to a previously defined named type

Constants§

AVRO_DOC_METADATA_KEY
Metadata key used to store the documentation for a type in an Avro schema.
AVRO_ENUM_SYMBOLS_METADATA_KEY
Metadata key used to represent Avro enum symbols in an Arrow schema.
AVRO_FIELD_DEFAULT_METADATA_KEY
Metadata key used to store the default value of a field in an Avro schema.
AVRO_NAMESPACE_METADATA_KEY
Metadata key used to store the name of a type in an Avro schema.
AVRO_NAME_METADATA_KEY
Metadata key used to store the name of a type in an Avro schema.
AVRO_ROOT_RECORD_DEFAULT_NAME
Default name for the root record in an Avro schema.
CONFLUENT_MAGIC
The Confluent “magic” byte (0x00)
EMPTY 🔒
64‑bit Rabin fingerprint as described in the Avro spec.
MAX_PREFIX_LEN
The maximum possible length of a prefix. SHA256 (32) + single-object magic (2)
SCHEMA_METADATA_KEY
The metadata key used for storing the JSON encoded Schema
SINGLE_OBJECT_MAGIC
The Avro single‑object encoding “magic” bytes (0xC3 0x01)

Statics§

FINGERPRINT_TABLE 🔒
The pre‑computed table.

Functions§

arrow_field_to_avro 🔒
build_canonical 🔒
build_table 🔒
Build the full 256‑entry table at compile time.
compare_schemas
Compare two Avro schemas for equality (identical schemas). Returns true if the schemas have the same parsing canonical form (i.e., logically identical).
compute_fingerprint_md5 🔒
Compute the 128‑bit MD5 fingerprint of the canonical form.
compute_fingerprint_rabin 🔒
Computes the 64-bit Rabin fingerprint for a given canonical schema string. This implementation is based on the Avro specification for schema fingerprinting.
compute_fingerprint_sha256 🔒
Compute the 256‑bit SHA‑256 fingerprint of the canonical form.
datatype_to_avro 🔒
extend_with_passthrough_metadata 🔒
Copies Arrow schema metadata entries to the provided JSON map, skipping keys that are Avro-reserved, internal Arrow keys, or nested under the avro.schema. namespace. Values that parse as JSON are inserted as JSON; otherwise the raw string is preserved.
is_avro_json_null 🔒
is_internal_arrow_key 🔒
make_full_name 🔒
merge_extras 🔒
one_entry 🔒
Build one entry of the polynomial‑division table.
process_datatype 🔒
quote 🔒
sanitise_avro_name 🔒
union_branch_signature 🔒
wrap_nullable 🔒
write_prefix 🔒