Skip to content

Restate each function's wire from the codecs its classes state - #161

Merged
estebanzimanyi merged 1 commit into
MobilityDB:masterfrom
estebanzimanyi:catalog/wire-follows-codecs
Oct 1, 2026
Merged

estebanzimanyi merged 1 commit into
MobilityDB:masterfrom
estebanzimanyi:catalog/wire-follows-codecs

Conversation

@estebanzimanyi

@estebanzimanyi estebanzimanyi commented Oct 1, 2026 •

Copy link
Copy Markdown
Member

Each function's network and wire are stated again once the codec pass
settles every class (parser/enrich.py restate_wire, run right after
state_type_encodings), through the same assess that first states them,
and the exposable count with them. A serialized value reads and writes
through its class's in and out: a Temporal parameter reads through
temporal_from_hexwkb, whose WKB carries the subtype, and a Temporal
result writes through temporal_as_mfjson with its trailing inputs.

Why. The wire was stated before the codec pass and kept the per-class
pick that pass replaces: every Temporal parameter read through
tbigint_in, every Set through bigintset_in. A tfloat read so fails:
tbigint_in('[1.5@2026-01-01 00:00:00+00, 2.5@2026-01-02 00:00:00+00]')
raises 'invalid input syntax for type bigint: "1.5"'.

Measured. Over MobilityDB 72abdf86c2, 4194 wire values named a codec
their class does not state and none does now: 1821 Temporal parameters
from tbigint_in and 689 results from temporal_out, 461 Set, 435 Span and
296 SpanSet parameters from the bigint readers and 492 of their results
from *_out; each parameter now reads through its class's hex-WKB reader,
each Temporal result writes through temporal_as_mfjson and each Set,
Span and SpanSet result through its hex-WKB writer. The six
Raster functions writing a raster become exposable through
raster_as_hexwkb, 3228 to 3234, and none stops being exposable. The same
tfloat, written as hex WKB, reads through temporal_from_hexwkb and writes
back through temporal_as_mfjson as
{"type":"MovingFloat","values":[1.5,2.5],...}.

Witness. tests/test_enrich.py restates a parameter and a result through
a settled codec and the exposable count with them, and over the catalog
finds every wire value naming its class's codec; both fail on the code
without this change. The suite floor goes from 395 to 398.

Each function's network and wire are stated again once the codec pass
settles every class (parser/enrich.py restate_wire, run right after
state_type_encodings), through the same assess that first states them,
and the exposable count with them. A serialized value reads and writes
through its class's in and out: a Temporal parameter reads through
temporal_from_hexwkb, whose WKB carries the subtype, and a Temporal
result writes through temporal_as_mfjson with its trailing inputs.

Why. The wire was stated before the codec pass and kept the per-class
pick that pass replaces: every Temporal parameter read through
tbigint_in, every Set through bigintset_in. A tfloat read so fails:
tbigint_in('[1.5@2026-01-01 00:00:00+00, 2.5@2026-01-02 00:00:00+00]')
raises 'invalid input syntax for type bigint: "1.5"'.

Measured. Over MobilityDB 72abdf86c2, 4194 wire values named a codec
their class does not state and none does now: 1821 Temporal parameters
from tbigint_in and 689 results from temporal_out, 461 Set, 435 Span and
296 SpanSet parameters from the bigint readers and 492 of their results
from *_out; each parameter now reads through its class's hex-WKB reader,
each Temporal result writes through temporal_as_mfjson and each Set,
Span and SpanSet result through its hex-WKB writer. The six
Raster functions writing a raster become exposable through
raster_as_hexwkb, 3228 to 3234, and none stops being exposable. The same
tfloat, written as hex WKB, reads through temporal_from_hexwkb and writes
back through temporal_as_mfjson as
{"type":"MovingFloat","values":[1.5,2.5],...}.

Witness. tests/test_enrich.py restates a parameter and a result through
a settled codec and the exposable count with them, and over the catalog
finds every wire value naming its class's codec; both fail on the code
without this change. The suite floor goes from 395 to 398.
@estebanzimanyi
estebanzimanyi force-pushed the catalog/wire-follows-codecs branch from 99aec8b to 3b3f11f Compare October 1, 2026 12:53
@estebanzimanyi
estebanzimanyi merged commit 0a54dfe into MobilityDB:master Oct 1, 2026
3 checks passed
@estebanzimanyi
estebanzimanyi deleted the catalog/wire-follows-codecs branch October 1, 2026 12:57
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant