Expand description
Field-signature helpers for schema minimization (and isomorphism).
Ported from ~/dev/omnist/omnist/ops/signature.py.
local_signature is the target-blind structural key used as the
initial partition for minimize’s partition refinement: a key
including ref target names would be too strong a starting point –
records that turn out to be equivalent because their ref targets are
themselves equivalent-but-differently-named would never even land in
the same starting block. It captures a field’s label, cardinality, and
scalar-or-ref shape, but excludes ref target names (those are compared
by evolving block id during minimize’s refinement instead).
Enums§
- Shape
Key - A field’s target-blind shape:
Scalar(kind, nullable),Ref(the target record’s name is deliberately excluded – see the module doc comment), orAny.
Functions§
- local_
signature - Target-blind structural key for a record: fields sorted by label, each
keyed by
(label, min, max, shape).
Type Aliases§
- Field
Key - One field’s signature entry:
(label, min, max, shape). - Local
Signature - A record’s target-blind structural key: every field’s
FieldKey, sorted by label.