Skip to content

feat(meos): add the set-set spatial-join helper to the shared facade (stacks on #24)#25

Closed
estebanzimanyi wants to merge 10 commits into
MobilityDB:mainfrom
estebanzimanyi:feat/jmeos-setset-join
Closed

feat(meos): add the set-set spatial-join helper to the shared facade (stacks on #24)#25
estebanzimanyi wants to merge 10 commits into
MobilityDB:mainfrom
estebanzimanyi:feat/jmeos-setset-join

Conversation

@estebanzimanyi

Copy link
Copy Markdown
Member

MeosSetSetJoin exposes the MEOS *_tgeoarr_tgeoarr family as eDwithinPairs / tDwithinPairs / aDisjointPairs over two arrays of temporal-geometry handles: it marshals the native pointer arrays the kernel prunes in C, keeps them reachable across the call with reachabilityFence, and reads back the flattened 0-based index pairs (and, for tDwithin, the per-pair tstzspanset of in-range times). Both JVM engines call it from the shared org.mobilitydb.meos layer so the NxN spatial-join surface derives once; verified against the pinned libmeos.

… surface

Bump codegen/input/meos-idl.json to the MEOS-API IDL and regenerate
functions.GeneratedFunctions over the full consolidated superset: mul_* (incl.
tbigint); minDistance; the circular-buffer and network-point MF-JSON readers; the
ever- and always-covers families (ecovers_*/acovers_*); trgeo_*; the H3 /
th3index family (ever_eq_h3indexset_th3index, h3index_in/out, H3Index lowered to
long); PostgreSQL type I/O; tgeogpoint_great_circle_distance;
meos_initialize_noexit_error_handler. 2916 functions.
Add the codegen exec step to jmeos-core so functions/GeneratedFunctions.java is
produced from codegen/input/meos-idl.json during the build, and drop the
committed copy.
Run meos_initialize() from the binding's load path so the allocator and
collation are installed before any call. MEOS splits startup into granular
steps; without the collation step, text comparisons route into varstr_cmp with
an uninitialized collation and crash.
Call the generated functions class from TText and TextSet instead of the
hand-maintained facade, so the text conversions use the canonical master names
(cstring_to_text, text_to_cstring).
…ld flags

The functions.GeneratedFunctions facade is generated at build time from the MEOS
IDL with the optional type families selected by the same flag names and ON|OFF
(also 1|0) values as the MobilityDB/MEOS build: -DCBUFFER, -DNPOINT, -DPOSE,
-DRGEO, -DH3. Every family is included by default; passing -DCBUFFER=OFF (or =0)
drops that family's functions from the generated binding so a subset jar ships
without it (RGEO needs POSE). FunctionsGenerator maps each function's source
header to its family and omits excluded families; jmeos-core runs the generator
at generate-sources (so the flag flows through mvn) and compiles the generated
functions.GeneratedFunctions.
Hoists the tier-aware MeosOps* facade (62 classes) into JMEOS so every
JVM binding inherits the one canonical Java idiom from the shared jar
instead of duplicating it per engine. The facade forwards to
functions.GeneratedFunctions under a package-private MeosOpsRuntime probe
gated by the canonical -Dmeos.enabled property; javadoc is engine-neutral.
Relocates the maintained generator (regen_facade_from_jar + the gap / sql /
tbigint / h3 emitters + parity_audit + meos-ref) under jmeos-core/tools so
the facade stays regenerated, not hand-edited; regeneration is idempotent
against the pin jar.
…surface

Apply the 77-symbol drift from pin 588768d7ab to master: 20 trgeo→trgeometry
renames (A); 12 pg_*/cstring2text/text2cstring/pose_normalise/temporal_instants_p/
temporal_hausdorff_distance renames (B); 21 removed scalar helpers dropped with
no callers (C: add_date_int, add_interval_interval, add_timestamptz_interval,
date_to_timestamp, date_to_timestamptz, float_exp, float_ln, float_log10,
float_round, int32_cmp, int64_cmp, interval_make, mul_interval_double,
timestamp_to_date, timestamptz_shift, timestamptz_to_date, minus_date_date,
minus_date_int, minus_timestamptz_interval, minus_timestamptz_timestamptz,
meos_initialize_pointcloud); 23 signature updates (D): value_at_timestamptz
gains a result out-param and returns bool; value_split/value_time_split/
temporal_time_split gain bins/count out-params; set_spans/spanset_spans/
spanset_spanarr drop the count out-param; super_union_span_span drops the
boolean merge flag; text_cmp gains a collation pointer; gbox_make gains hasm
and geodetic booleans and min/max range pairs; geom_min_bounding_radius gains
a radius out-param; pose_make_2d/3d gain a geodetic boolean; trgeoinst_make is
renamed trgeometryinst_make. All xxx_hash_extended functions change their seed
and return type from long to int (bigint_to_span/spanset likewise). 1735 tests
pass, BUILD SUCCESS.
MeosSetSetJoin exposes the MEOS *_tgeoarr_tgeoarr family as eDwithinPairs /
tDwithinPairs / aDisjointPairs over two arrays of temporal-geometry handles:
it marshals the native pointer arrays the kernel prunes in C, keeps them
reachable across the call with reachabilityFence, and reads back the
flattened 0-based index pairs (and, for tDwithin, the per-pair tstzspanset of
in-range times). Both JVM engines call it from the shared org.mobilitydb.meos
layer, so the NxN spatial-join surface derives once. Verified against
libmeos.
The IDL and bundled libmeos carry the 54a9d4bc54 public surface: the per-thread
PROJ context, the box3d_in/gbox_in parsers, and tpose_to_tpoint. The parity-gap
forwarders bind the value-at-timestamptz wrappers through their result-returning
form and drop the pointcloud initializer absent from the surface.
@estebanzimanyi

Copy link
Copy Markdown
Member Author

The set-set spatial-join functions are on the master surface in #30; the facade helper is a consumer projection, not part of the JMEOS raw-FFI surface. Closing.

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