Add the core trgeo type port#152
Closed
estebanzimanyi wants to merge 2 commits into
Closed
Conversation
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.
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. |
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.
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.