Add the tnpoint typed value accessors to the MEOS public API#1082
Open
estebanzimanyi wants to merge 2 commits into
Open
Add the tnpoint typed value accessors to the MEOS public API#1082estebanzimanyi wants to merge 2 commits into
estebanzimanyi wants to merge 2 commits into
Conversation
tcbuffer_start_value, tcbuffer_end_value, tcbuffer_value_n, tcbuffer_values and tcbuffer_value_at_timestamptz are implemented in meos/src/cbuffer/tcbuffer.c and return the typed Cbuffer value, but were not declared in meos/include/meos_cbuffer.h. They were therefore unreachable from the MEOS C API and from language bindings, which could only obtain the generic Datum-returning temporal_*_value accessors and cannot turn a Datum into a Cbuffer without internal Datum-hiding. Declare the five accessors in the temporal "Accessor functions" section of meos_cbuffer.h, mirroring the existing tpose_*/tgeo_* typed accessor surface. No implementation changes: the exported symbols are the existing definitions, now visible in nm -D libmeos.so.
The temporal network point type had no typed value accessors: callers could only reach the generic Datum-returning temporal_*_value functions and cannot turn a Datum into an Npoint without internal Datum-hiding, unlike tpose/tgeo which already expose tpose_*/tgeo_* typed accessors. Add tnpoint_start_value, tnpoint_end_value, tnpoint_value_n, tnpoint_values and tnpoint_value_at_timestamptz in meos/src/npoint/ tnpoint.c and declare them in meos_npoint.h, mirroring the existing tpose_* accessor surface and reusing the same generic temporal_* backing (per-element copies via npoint_make).
4a6e7d3 to
cf9ed91
Compare
This was referenced May 20, 2026
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.
Summary
The temporal network point type exposed no typed value accessors. Callers could only reach the generic
Datum-returningtemporal_*_valuefunctions and cannot turn aDatuminto anNpointwithout internal Datum-hiding — unliketpose/tgeo, which already exposetpose_*/tgeo_*typed accessors.Adds
tnpoint_start_value,tnpoint_end_value,tnpoint_value_n,tnpoint_values,tnpoint_value_at_timestamptzinmeos/src/npoint/tnpoint.cand declares them inmeos_npoint.h, mirroring the existingtpose_*accessor surface and reusing the same generictemporal_*backing (per-element copies vianpoint_make).Why
Required for 100% ecosystem API parity: every downstream binding needs the typed
tnpointvalue-accessor surface to makeTNpointconcrete, exactly astpose_*/tgeo_*already allow for the analogous types.Verification
-DMEOS=ondefault; NPOINT is on by default): green, no new warningsTinnm -D libmeos.so)01_hello_world,setspan_test,temporal_test,geo_test,npoint_test,cbuffer_test): 6/6 pass (no regression){NPoint(1,0.2)@…, NPoint(1,0.6)@…, NPoint(2,0.4)@…}: start=NPoint(1,0.2), end=NPoint(2,0.4), values count=3, value_n(2)=NPoint(1,0.6), value_at_timestamptz=NPoint(1,0.6) — all correct#if MEOS), thin wrappers over already-tested generic accessors; TSan-neutral by construction