Module schema

Module schema 

Source
Expand description

Avro schema parsing and representation

Provides types for parsing and representing Avro schema definitions. Avro Schema representations for Arrow.

StructsΒ§

Array πŸ”’
An array
Attributes πŸ”’
Additional attributes within a Schema
AvroSchema
A wrapper for an Avro schema in its JSON string representation.
AvroSchemaOptions πŸ”’
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.
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 πŸ”’
deserialize_default πŸ”’
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 πŸ”’
min_fixed_bytes_for_precision πŸ”’
one_entry πŸ”’
Build one entry of the polynomial‑division table.
process_datatype πŸ”’
quote πŸ”’
sanitise_avro_name πŸ”’
union_branch_signature πŸ”’
wrap_nullable πŸ”’
write_prefix πŸ”’