Skip to content

Generate the base-value scalar accessors - #242

Merged
estebanzimanyi merged 1 commit into
MobilityDB:mainfrom
estebanzimanyi:feat/duck-baseval-scalar-accessors
Jul 31, 2026
Merged

Generate the base-value scalar accessors#242
estebanzimanyi merged 1 commit into
MobilityDB:mainfrom
estebanzimanyi:feat/duck-baseval-scalar-accessors

Conversation

@estebanzimanyi

Copy link
Copy Markdown
Member

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_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 the npoint/nsegment accessors depend on the npoint family registration.

Adds test/sql/parity/091_baseval_scalar_accessors.test.

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
estebanzimanyi force-pushed the feat/duck-baseval-scalar-accessors branch from 4462d7e to add289c Compare July 31, 2026 11:38
@estebanzimanyi
estebanzimanyi merged commit 08db565 into MobilityDB:main Jul 31, 2026
9 checks passed
@estebanzimanyi
estebanzimanyi deleted the feat/duck-baseval-scalar-accessors branch July 31, 2026 12:15
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