Generate the base-value scalar accessors - #242
Merged
estebanzimanyi merged 1 commit intoJul 31, 2026
Merged
Conversation
Generates the scalar accessors on the base value types cbuffer/npoint/nsegment (a pure add, no hand registrations to retire), mirroring the Temporal<T> accessor generation: SRID (cbuffer/npoint/nsegment -> INTEGER), radius (cbuffer -> DOUBLE), hash (cbuffer -> UINTEGER), route (npoint/nsegment -> BIGINT), position (npoint -> DOUBLE), startPosition/endPosition (nsegment -> DOUBLE). A new shape_baseval_scalar detects a (base-value pointer) -> by-value scalar signature and emits a body that marshals the argument via the PTR_IN Blob-> <Base> helper, calls the MEOS accessor, and frees the value. Registration goes through the shared main-loop path over the family's registered base DuckDB type, so npoint/nsegment accessors require the npoint family registration. Adds test/sql/parity/091_baseval_scalar_accessors.test.
estebanzimanyi
force-pushed
the
feat/duck-baseval-scalar-accessors
branch
from
July 31, 2026 11:38
4462d7e to
add289c
Compare
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.
Generates the scalar accessors on the base value types cbuffer/npoint/nsegment (a pure add, no hand registrations):
SRID(cbuffer/npoint/nsegment → INTEGER),radius(cbuffer → DOUBLE),hash(cbuffer → UINTEGER),route(npoint/nsegment → BIGINT),position(npoint → DOUBLE),startPosition/endPosition(nsegment → DOUBLE).A new
shape_baseval_scalardetects a (base-value pointer) → by-value scalar signature and emits a body that marshals the argument via thePTR_INBlob→<Base>helper, calls the MEOS accessor, and frees the value. Registration goes through the shared main-loop path over the family's registered base DuckDB type, so the npoint/nsegment accessors depend on the npoint family registration.Adds
test/sql/parity/091_baseval_scalar_accessors.test.