Skip to content

Add the core trgeo type port#152

Closed
estebanzimanyi wants to merge 2 commits into
feat/tpose-port-corefrom
feat/trgeo-port-core
Closed

Add the core trgeo type port#152
estebanzimanyi wants to merge 2 commits into
feat/tpose-port-corefrom
feat/trgeo-port-core

Conversation

@estebanzimanyi
Copy link
Copy Markdown
Member

Port the temporal rigid geometry type into MobilityDuck by cloning the core tpose port and substituting trgeo. The trgeometry value is a moving rigid geometry: a reference geometry rotated and translated over time by an embedded temporal pose. MEOS exposes no linkable trgeo_in or trgeo_from_mfjson symbol (both are inline #if MEOS wrappers absent from the installed meos_rgeo.h), so text and EWKT input route through the subtype-agnostic tspatial_parse with T_TRGEOMETRY (the exact path trgeo_in itself delegates to and the canonical MobilityDB SQL binds trgeometryFromText and trgeometry_in to), MF-JSON input routes through the generic temporal_from_mfjson with T_TRGEOMETRY, and the value is serialized back with the type-specific trgeo_out. The geom accessor surfaces the reference geometry via trgeo_geom and startValue and endValue surface the rigid-geometry snapshot via trgeo_start_value and trgeo_end_value. The cloned instant-array helper is suffixed temparr_extract_rg to avoid an ODR clash with the tpose, tnpoint and tcbuffer siblings in the same extension library. Generic subtype-agnostic accessors, time-domain restrictions, modifiers and comparison reuse the shared temporal handlers. Core scope only, no operators layer, mirroring the tcbuffer, tnpoint and tpose core ports. The trgeo MF-JSON and SQL surface is already on MobilityDB master so no MEOS prerequisite or pin change is needed; the provisional MEOS pin is inherited unchanged from the parent. Stacks on the core tpose type port #151 and targets its branch as base.

Port the temporal rigid geometry type into MobilityDuck by cloning the
tpose core port and substituting trgeo. The trgeometry value is a moving
rigid geometry: a reference geometry rotated and translated over time by
an embedded temporal pose. MEOS exposes no linkable trgeo_in or
trgeo_from_mfjson symbol (both are inline #if MEOS wrappers absent from
the installed meos_rgeo.h), so text and EWKT input route through the
subtype-agnostic tspatial_parse with T_TRGEOMETRY (the exact path
trgeo_in itself delegates to and the canonical MobilityDB SQL binds
trgeometryFromText and trgeometry_in to), MF-JSON input routes through
the generic temporal_from_mfjson with T_TRGEOMETRY, and the value is
serialized back with the type-specific trgeo_out. The geom accessor
surfaces the reference geometry via trgeo_geom and startValue and
endValue surface the rigid-geometry snapshot via trgeo_start_value and
trgeo_end_value. The cloned instant-array helper is suffixed
temparr_extract_rg to avoid an ODR clash with the tpose, tnpoint and
tcbuffer siblings in the same extension library. Generic subtype-
agnostic accessors, time-domain restrictions, modifiers and comparison
reuse the shared temporal handlers. Core scope only, no operators layer,
mirroring the tcbuffer, tnpoint and tpose core ports. The trgeo MF-JSON
and SQL surface is already on MobilityDB master so no MEOS prerequisite
or pin change is needed; the provisional MEOS pin is inherited unchanged
from the parent. Stacks on the core tpose type port (#151).
meos_rgeo.h is the only extended-type module header that declares an
Interval-typed prototype (trgeo_append_tinstant). Including it brings
the MEOS typedef struct Interval into the same namespace scope as
duckdb::Interval (from tydef.hpp), so the unqualified Interval
reference becomes ambiguous and the arm64 build of trgeo.cpp failed at
the Build extension step. The pose, npoint and cbuffer module headers
have no Interval-typed signature, which is why the sibling ports
compile. This port only needs trgeo_out, trgeo_geom, trgeo_start_value
and trgeo_end_value, so declare them locally as extern prototypes (the
same approach already used for tspatial_parse) and stop including
meos_rgeo.h. GSERIALIZED and MeosType remain reachable through
meos_geo.h and meos_internal.h.
@estebanzimanyi
Copy link
Copy Markdown
Member Author

Closing as superseded. This port was built before the decision to make the MEOS naming uniformization the foundation: it sits on the pre-rename trgeo_/rgeo names and works around the missing exported trgeometry_in via the EWKT path. That gap is being fixed properly upstream (MobilityDB #1066 exports trgeometry_in/_out/from_mfjson; further incremental external-C-API uniformization to follow), and the extended-type port rollout is intentionally paused until the uniform trgeometry* surface lands so the port can be a clean clone rather than a workaround on soon-renamed symbols. It will be redone cleanly on the uniform names; nothing here is lost.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant