State the byte codec of each type beside its wire encodings - #148
Merged
estebanzimanyi merged 1 commit intoSep 28, 2026
Merged
Conversation
typeEncodings gives each type, under bytes, the reader and the writer of its WKB bytes: a reader T *f(const uint8_t *wkb, size_t size) and a writer uint8_t *f(const T *, uint8_t variant, size_t *size_out), recognised by shape, the generic <type>_from_wkb and <type>_as_wkb preferred as the wire codecs prefer theirs. The bytes are no wire string, so they add no entry to encodings, which keeps the string forms a network generator serves. A binding that holds values in process, as the JVM engines do, reads the codec there instead of naming it itself. Witness. test_byte_codec_beside_the_wire_encodings states the Temporal pair, leaves the encodings at mfjson and text, and states no codec for a type with a writer and no reader. Measured. Over the headers of MobilityDB 3f9ee86639, twelve types carry the entry: Temporal, Set, Span, SpanSet, STBox, TBox, Cbuffer, Npoint, Pose, PoseChain, Raquet and Raster. The catalog is otherwise identical to the one derived without the change. The suite runs its 37 test files, all passing. Why. The Spark generator names the WKB functions in a table of its own and the Flink generator finds only the hex codec here, so the two engines carry values in two forms; stated once in the catalog, both take the same codec from it.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
typeEncodings gives each type, under bytes, the reader and the writer of its WKB bytes: a
reader T *f(const uint8_t *wkb, size_t size) and a writer
uint8_t *f(const T *, uint8_t variant, size_t *size_out), recognised by shape, the generic
_from_wkb and _as_wkb preferred as the wire codecs prefer theirs. The bytes are
no wire string, so they add no entry to encodings, which keeps the string forms a network
generator serves. A binding that holds values in process, as the JVM engines do, reads the
codec there instead of naming it itself.
Witness. test_byte_codec_beside_the_wire_encodings states the Temporal pair, leaves the
encodings at mfjson and text, and states no codec for a type with a writer and no reader.
Measured. Over the headers of MobilityDB 3f9ee86639, twelve types carry the entry: Temporal,
Set, Span, SpanSet, STBox, TBox, Cbuffer, Npoint, Pose, PoseChain, Raquet and Raster. The
catalog is otherwise identical to the one derived without the change. The suite runs its 37
test files, all passing.
Why. The Spark generator names the WKB functions in a table of its own and the Flink
generator finds only the hex codec here, so the two engines carry values in two forms;
stated once in the catalog, both take the same codec from it.