diff --git a/flink-processor/docs/parity-status.md b/flink-processor/docs/parity-status.md index bcfe7f4..dd519ee 100644 --- a/flink-processor/docs/parity-status.md +++ b/flink-processor/docs/parity-status.md @@ -4,7 +4,7 @@ Generated 2026-05-29 by `tools/parity/parity_audit.py`. The MobilityFlink MEOS facade (`org.mobilitydb.flink.meos.MeosOps*`) exposes MEOS C functions to Flink through JMEOS. This audit measures, per type family, the share of the **MEOS public C API** that the facade exposes and that JMEOS binds. -**Headline.** The facade exposes **2158 of 2158 public MEOS functions (100.0%)**. The MEOS public surface (`meos/include/meos*.h`, excluding internal headers) is 2158 functions; JMEOS binds 2158 of them. 0 bindable functions are not exposed (listed in §3). +**Headline.** The facade exposes **2296 of 2296 public MEOS functions (100.0%)**. The MEOS public surface (`meos/include/meos*.h`, excluding internal headers) is 2297 functions; JMEOS binds 2296 of them. 0 bindable functions are not exposed (listed in §3). Coverage is **static**: a function counts as covered when the facade declares a method of the same name and arity that delegates to a JMEOS export. @@ -16,19 +16,20 @@ Per-family runtime behaviour is asserted by `src/test/java/org/mobilitydb/flink/ - **Numerator**: `public static` methods on the generated `MeosOps*` facade whose name is also a `functions.GeneratedFunctions` export in the bundled JMEOS jar. -- **JMEOS jar**: jar/JMEOS.jar exports 2743 static methods. +- **JMEOS jar**: jar/JMEOS.jar exports 2916 static methods. ## 2. Per-family coverage of the public MEOS surface | Family (header) | Public ∩ JMEOS | Exposed | Missing | Coverage | |---|---:|---:|---:|---:| -| core temporal / set / span / spanset / tbox (`meos.h`) | 1279 | 1279 | 0 | 100.0% | -| geo (tgeo / tpoint / stbox) (`meos_geo.h`) | 419 | 419 | 0 | 100.0% | -| cbuffer (`meos_cbuffer.h`) | 173 | 173 | 0 | 100.0% | -| npoint (`meos_npoint.h`) | 118 | 118 | 0 | 100.0% | +| core temporal / set / span / spanset / tbox (`meos.h`) | 1343 | 1343 | 0 | 100.0% | +| geo (tgeo / tpoint / stbox) (`meos_geo.h`) | 421 | 421 | 0 | 100.0% | +| cbuffer (`meos_cbuffer.h`) | 175 | 175 | 0 | 100.0% | +| npoint (`meos_npoint.h`) | 119 | 119 | 0 | 100.0% | | pose (`meos_pose.h`) | 101 | 101 | 0 | 100.0% | | rgeo (`meos_rgeo.h`) | 68 | 68 | 0 | 100.0% | -| **total** | **2158** | **2158** | **0** | **100.0%** | +| h3 / th3index (`meos_h3.h`) | 69 | 69 | 0 | 100.0% | +| **total** | **2296** | **2296** | **0** | **100.0%** | ## 3. Bindable MEOS functions not exposed by the facade @@ -39,7 +40,7 @@ Per-family runtime behaviour is asserted by `src/test/java/org/mobilitydb/flink/ The facade is also matched against the underlying MEOS C symbol of each addressable `CREATE FUNCTION` in `mobilitydb/sql/**/*.in.sql` (PG-only sections and helper symbols bucketed out; 876 out-of-scope, 113 SQL/plpgsql-composed functions with no single C symbol). Functions the SQL layer implements through the internal MEOS headers (`meos_internal*.h`) are exposed via `MeosOpsSqlSurface`. -- Addressable distinct C symbols: **1336**; bound by JMEOS: **1066**; exposed by the facade: **1066** (100.0% of the JMEOS-bindable SQL surface). +- Addressable distinct C symbols: **1336**; bound by JMEOS: **1068**; exposed by the facade: **1068** (100.0% of the JMEOS-bindable SQL surface). -- The remaining **270** addressable C symbols are not exported by JMEOS under the name the SQL layer's extension wrapper uses; the wrapper names differ from the MEOS function names they call. +- The remaining **268** addressable C symbols are not exported by JMEOS under the name the SQL layer's extension wrapper uses; the wrapper names differ from the MEOS function names they call. diff --git a/flink-processor/src/main/java/org/mobilitydb/flink/meos/MeosOpsParityGaps.java b/flink-processor/src/main/java/org/mobilitydb/flink/meos/MeosOpsParityGaps.java index 6cdaa9b..4874336 100644 --- a/flink-processor/src/main/java/org/mobilitydb/flink/meos/MeosOpsParityGaps.java +++ b/flink-processor/src/main/java/org/mobilitydb/flink/meos/MeosOpsParityGaps.java @@ -10,6 +10,27 @@ public final class MeosOpsParityGaps { private MeosOpsParityGaps() { /* utility */ } + /** MEOS {@code acovers_geo_tgeo} — meos_geo.h · scalar / stateless. */ + public static int acovers_geo_tgeo(jnr.ffi.Pointer arg0, jnr.ffi.Pointer arg1) { + if (!MeosOpsRuntime.MEOS_AVAILABLE) + throw new UnsupportedOperationException("acovers_geo_tgeo requires libmeos — set -Dmobilityflink.meos.enabled=true"); + return functions.GeneratedFunctions.acovers_geo_tgeo(arg0, arg1); + } + + /** MEOS {@code acovers_tcbuffer_tcbuffer} — meos_cbuffer.h · scalar / stateless. */ + public static int acovers_tcbuffer_tcbuffer(jnr.ffi.Pointer arg0, jnr.ffi.Pointer arg1) { + if (!MeosOpsRuntime.MEOS_AVAILABLE) + throw new UnsupportedOperationException("acovers_tcbuffer_tcbuffer requires libmeos — set -Dmobilityflink.meos.enabled=true"); + return functions.GeneratedFunctions.acovers_tcbuffer_tcbuffer(arg0, arg1); + } + + /** MEOS {@code acovers_tgeo_geo} — meos_geo.h · scalar / stateless. */ + public static int acovers_tgeo_geo(jnr.ffi.Pointer arg0, jnr.ffi.Pointer arg1) { + if (!MeosOpsRuntime.MEOS_AVAILABLE) + throw new UnsupportedOperationException("acovers_tgeo_geo requires libmeos — set -Dmobilityflink.meos.enabled=true"); + return functions.GeneratedFunctions.acovers_tgeo_geo(arg0, arg1); + } + /** MEOS {@code bearing_tpoint_point} — meos_geo.h · scalar / stateless. */ public static jnr.ffi.Pointer bearing_tpoint_point(jnr.ffi.Pointer arg0, jnr.ffi.Pointer arg1, boolean arg2) { if (!MeosOpsRuntime.MEOS_AVAILABLE) @@ -24,6 +45,27 @@ public static jnr.ffi.Pointer bearing_tpoint_tpoint(jnr.ffi.Pointer arg0, jnr.ff return functions.GeneratedFunctions.bearing_tpoint_tpoint(arg0, arg1); } + /** MEOS {@code bigintspan_to_floatspan} — meos.h · scalar / stateless. */ + public static jnr.ffi.Pointer bigintspan_to_floatspan(jnr.ffi.Pointer arg0) { + if (!MeosOpsRuntime.MEOS_AVAILABLE) + throw new UnsupportedOperationException("bigintspan_to_floatspan requires libmeos — set -Dmobilityflink.meos.enabled=true"); + return functions.GeneratedFunctions.bigintspan_to_floatspan(arg0); + } + + /** MEOS {@code bigintspan_to_intspan} — meos.h · scalar / stateless. */ + public static jnr.ffi.Pointer bigintspan_to_intspan(jnr.ffi.Pointer arg0) { + if (!MeosOpsRuntime.MEOS_AVAILABLE) + throw new UnsupportedOperationException("bigintspan_to_intspan requires libmeos — set -Dmobilityflink.meos.enabled=true"); + return functions.GeneratedFunctions.bigintspan_to_intspan(arg0); + } + + /** MEOS {@code floatspan_to_bigintspan} — meos.h · scalar / stateless. */ + public static jnr.ffi.Pointer floatspan_to_bigintspan(jnr.ffi.Pointer arg0) { + if (!MeosOpsRuntime.MEOS_AVAILABLE) + throw new UnsupportedOperationException("floatspan_to_bigintspan requires libmeos — set -Dmobilityflink.meos.enabled=true"); + return functions.GeneratedFunctions.floatspan_to_bigintspan(arg0); + } + /** MEOS {@code geogpoint_make2d} — meos_geo.h · scalar / stateless. */ public static jnr.ffi.Pointer geogpoint_make2d(int arg0, double arg1, double arg2) { if (!MeosOpsRuntime.MEOS_AVAILABLE) @@ -87,6 +129,13 @@ public static jnr.ffi.Pointer intersection_pose_set(jnr.ffi.Pointer arg0, jnr.ff return functions.GeneratedFunctions.intersection_pose_set(arg0, arg1); } + /** MEOS {@code intspan_to_bigintspan} — meos.h · scalar / stateless. */ + public static jnr.ffi.Pointer intspan_to_bigintspan(jnr.ffi.Pointer arg0) { + if (!MeosOpsRuntime.MEOS_AVAILABLE) + throw new UnsupportedOperationException("intspan_to_bigintspan requires libmeos — set -Dmobilityflink.meos.enabled=true"); + return functions.GeneratedFunctions.intspan_to_bigintspan(arg0); + } + /** MEOS {@code line_interpolate_point} — meos_geo.h · scalar / stateless. */ public static jnr.ffi.Pointer line_interpolate_point(jnr.ffi.Pointer arg0, double arg1, boolean arg2) { if (!MeosOpsRuntime.MEOS_AVAILABLE) @@ -115,6 +164,13 @@ public static jnr.ffi.Pointer line_substring(jnr.ffi.Pointer arg0, double arg1, return functions.GeneratedFunctions.line_substring(arg0, arg1, arg2); } + /** MEOS {@code meos_initialize_noexit_error_handler} — meos.h · scalar / stateless. */ + public static void meos_initialize_noexit_error_handler() { + if (!MeosOpsRuntime.MEOS_AVAILABLE) + throw new UnsupportedOperationException("meos_initialize_noexit_error_handler requires libmeos — set -Dmobilityflink.meos.enabled=true"); + functions.GeneratedFunctions.meos_initialize_noexit_error_handler(); + } + /** MEOS {@code mindistance_tgeo_tgeo} — meos_geo.h · scalar / stateless. */ public static double mindistance_tgeo_tgeo(jnr.ffi.Pointer arg0, jnr.ffi.Pointer arg1, double arg2) { if (!MeosOpsRuntime.MEOS_AVAILABLE) @@ -241,6 +297,13 @@ public static jnr.ffi.Pointer tboolseqset_from_base_tstzspanset(boolean arg0, jn return functions.GeneratedFunctions.tboolseqset_from_base_tstzspanset(arg0, arg1); } + /** MEOS {@code tbox_to_bigintspan} — meos.h · scalar / stateless. */ + public static jnr.ffi.Pointer tbox_to_bigintspan(jnr.ffi.Pointer arg0) { + if (!MeosOpsRuntime.MEOS_AVAILABLE) + throw new UnsupportedOperationException("tbox_to_bigintspan requires libmeos — set -Dmobilityflink.meos.enabled=true"); + return functions.GeneratedFunctions.tbox_to_bigintspan(arg0); + } + /** MEOS {@code tfloatbox_time_tiles} — meos.h · multidimensional tiling (windowed). */ public static jnr.ffi.Pointer tfloatbox_time_tiles(jnr.ffi.Pointer arg0, jnr.ffi.Pointer arg1, java.time.OffsetDateTime arg2, jnr.ffi.Pointer arg3) { if (!MeosOpsRuntime.MEOS_AVAILABLE) diff --git a/flink-processor/src/main/java/org/mobilitydb/flink/meos/MeosOpsTBigint.java b/flink-processor/src/main/java/org/mobilitydb/flink/meos/MeosOpsTBigint.java new file mode 100644 index 0000000..6576530 --- /dev/null +++ b/flink-processor/src/main/java/org/mobilitydb/flink/meos/MeosOpsTBigint.java @@ -0,0 +1,537 @@ +package org.mobilitydb.flink.meos; + +/* AUTO-GENERATED by tools/codegen/emit_tbigint_facade.py — do not edit by hand. + * tbigint temporal-type family facade over functions.GeneratedFunctions. + */ + +import functions.GeneratedFunctions; +import jnr.ffi.Pointer; + +public final class MeosOpsTBigint { + + public static final boolean MEOS_AVAILABLE = MeosOpsRuntime.MEOS_AVAILABLE; + + private MeosOpsTBigint() { /* utility */ } + + /** MEOS {@code add_bigint_tbigint} — tbigint temporal family. */ + public static jnr.ffi.Pointer add_bigint_tbigint(long arg0, jnr.ffi.Pointer arg1) { + if (!MEOS_AVAILABLE) { + throw new UnsupportedOperationException( + "add_bigint_tbigint requires libmeos — set -Dmobilityflink.meos.enabled=true"); + } + return GeneratedFunctions.add_bigint_tbigint(arg0, arg1); + } + + /** MEOS {@code add_tbigint_bigint} — tbigint temporal family. */ + public static jnr.ffi.Pointer add_tbigint_bigint(jnr.ffi.Pointer arg0, long arg1) { + if (!MEOS_AVAILABLE) { + throw new UnsupportedOperationException( + "add_tbigint_bigint requires libmeos — set -Dmobilityflink.meos.enabled=true"); + } + return GeneratedFunctions.add_tbigint_bigint(arg0, arg1); + } + + /** MEOS {@code always_eq_bigint_tbigint} — tbigint temporal family. */ + public static int always_eq_bigint_tbigint(long arg0, jnr.ffi.Pointer arg1) { + if (!MEOS_AVAILABLE) { + throw new UnsupportedOperationException( + "always_eq_bigint_tbigint requires libmeos — set -Dmobilityflink.meos.enabled=true"); + } + return GeneratedFunctions.always_eq_bigint_tbigint(arg0, arg1); + } + + /** MEOS {@code always_eq_tbigint_bigint} — tbigint temporal family. */ + public static int always_eq_tbigint_bigint(jnr.ffi.Pointer arg0, long arg1) { + if (!MEOS_AVAILABLE) { + throw new UnsupportedOperationException( + "always_eq_tbigint_bigint requires libmeos — set -Dmobilityflink.meos.enabled=true"); + } + return GeneratedFunctions.always_eq_tbigint_bigint(arg0, arg1); + } + + /** MEOS {@code always_ge_bigint_tbigint} — tbigint temporal family. */ + public static int always_ge_bigint_tbigint(long arg0, jnr.ffi.Pointer arg1) { + if (!MEOS_AVAILABLE) { + throw new UnsupportedOperationException( + "always_ge_bigint_tbigint requires libmeos — set -Dmobilityflink.meos.enabled=true"); + } + return GeneratedFunctions.always_ge_bigint_tbigint(arg0, arg1); + } + + /** MEOS {@code always_ge_tbigint_bigint} — tbigint temporal family. */ + public static int always_ge_tbigint_bigint(jnr.ffi.Pointer arg0, long arg1) { + if (!MEOS_AVAILABLE) { + throw new UnsupportedOperationException( + "always_ge_tbigint_bigint requires libmeos — set -Dmobilityflink.meos.enabled=true"); + } + return GeneratedFunctions.always_ge_tbigint_bigint(arg0, arg1); + } + + /** MEOS {@code always_gt_bigint_tbigint} — tbigint temporal family. */ + public static int always_gt_bigint_tbigint(long arg0, jnr.ffi.Pointer arg1) { + if (!MEOS_AVAILABLE) { + throw new UnsupportedOperationException( + "always_gt_bigint_tbigint requires libmeos — set -Dmobilityflink.meos.enabled=true"); + } + return GeneratedFunctions.always_gt_bigint_tbigint(arg0, arg1); + } + + /** MEOS {@code always_gt_tbigint_bigint} — tbigint temporal family. */ + public static int always_gt_tbigint_bigint(jnr.ffi.Pointer arg0, long arg1) { + if (!MEOS_AVAILABLE) { + throw new UnsupportedOperationException( + "always_gt_tbigint_bigint requires libmeos — set -Dmobilityflink.meos.enabled=true"); + } + return GeneratedFunctions.always_gt_tbigint_bigint(arg0, arg1); + } + + /** MEOS {@code always_le_bigint_tbigint} — tbigint temporal family. */ + public static int always_le_bigint_tbigint(long arg0, jnr.ffi.Pointer arg1) { + if (!MEOS_AVAILABLE) { + throw new UnsupportedOperationException( + "always_le_bigint_tbigint requires libmeos — set -Dmobilityflink.meos.enabled=true"); + } + return GeneratedFunctions.always_le_bigint_tbigint(arg0, arg1); + } + + /** MEOS {@code always_le_tbigint_bigint} — tbigint temporal family. */ + public static int always_le_tbigint_bigint(jnr.ffi.Pointer arg0, long arg1) { + if (!MEOS_AVAILABLE) { + throw new UnsupportedOperationException( + "always_le_tbigint_bigint requires libmeos — set -Dmobilityflink.meos.enabled=true"); + } + return GeneratedFunctions.always_le_tbigint_bigint(arg0, arg1); + } + + /** MEOS {@code always_lt_bigint_tbigint} — tbigint temporal family. */ + public static int always_lt_bigint_tbigint(long arg0, jnr.ffi.Pointer arg1) { + if (!MEOS_AVAILABLE) { + throw new UnsupportedOperationException( + "always_lt_bigint_tbigint requires libmeos — set -Dmobilityflink.meos.enabled=true"); + } + return GeneratedFunctions.always_lt_bigint_tbigint(arg0, arg1); + } + + /** MEOS {@code always_lt_tbigint_bigint} — tbigint temporal family. */ + public static int always_lt_tbigint_bigint(jnr.ffi.Pointer arg0, long arg1) { + if (!MEOS_AVAILABLE) { + throw new UnsupportedOperationException( + "always_lt_tbigint_bigint requires libmeos — set -Dmobilityflink.meos.enabled=true"); + } + return GeneratedFunctions.always_lt_tbigint_bigint(arg0, arg1); + } + + /** MEOS {@code always_ne_bigint_tbigint} — tbigint temporal family. */ + public static int always_ne_bigint_tbigint(long arg0, jnr.ffi.Pointer arg1) { + if (!MEOS_AVAILABLE) { + throw new UnsupportedOperationException( + "always_ne_bigint_tbigint requires libmeos — set -Dmobilityflink.meos.enabled=true"); + } + return GeneratedFunctions.always_ne_bigint_tbigint(arg0, arg1); + } + + /** MEOS {@code always_ne_tbigint_bigint} — tbigint temporal family. */ + public static int always_ne_tbigint_bigint(jnr.ffi.Pointer arg0, long arg1) { + if (!MEOS_AVAILABLE) { + throw new UnsupportedOperationException( + "always_ne_tbigint_bigint requires libmeos — set -Dmobilityflink.meos.enabled=true"); + } + return GeneratedFunctions.always_ne_tbigint_bigint(arg0, arg1); + } + + /** MEOS {@code div_bigint_tbigint} — tbigint temporal family. */ + public static jnr.ffi.Pointer div_bigint_tbigint(long arg0, jnr.ffi.Pointer arg1) { + if (!MEOS_AVAILABLE) { + throw new UnsupportedOperationException( + "div_bigint_tbigint requires libmeos — set -Dmobilityflink.meos.enabled=true"); + } + return GeneratedFunctions.div_bigint_tbigint(arg0, arg1); + } + + /** MEOS {@code div_tbigint_bigint} — tbigint temporal family. */ + public static jnr.ffi.Pointer div_tbigint_bigint(jnr.ffi.Pointer arg0, long arg1) { + if (!MEOS_AVAILABLE) { + throw new UnsupportedOperationException( + "div_tbigint_bigint requires libmeos — set -Dmobilityflink.meos.enabled=true"); + } + return GeneratedFunctions.div_tbigint_bigint(arg0, arg1); + } + + /** MEOS {@code ever_eq_bigint_tbigint} — tbigint temporal family. */ + public static int ever_eq_bigint_tbigint(long arg0, jnr.ffi.Pointer arg1) { + if (!MEOS_AVAILABLE) { + throw new UnsupportedOperationException( + "ever_eq_bigint_tbigint requires libmeos — set -Dmobilityflink.meos.enabled=true"); + } + return GeneratedFunctions.ever_eq_bigint_tbigint(arg0, arg1); + } + + /** MEOS {@code ever_eq_tbigint_bigint} — tbigint temporal family. */ + public static int ever_eq_tbigint_bigint(jnr.ffi.Pointer arg0, long arg1) { + if (!MEOS_AVAILABLE) { + throw new UnsupportedOperationException( + "ever_eq_tbigint_bigint requires libmeos — set -Dmobilityflink.meos.enabled=true"); + } + return GeneratedFunctions.ever_eq_tbigint_bigint(arg0, arg1); + } + + /** MEOS {@code ever_ge_bigint_tbigint} — tbigint temporal family. */ + public static int ever_ge_bigint_tbigint(long arg0, jnr.ffi.Pointer arg1) { + if (!MEOS_AVAILABLE) { + throw new UnsupportedOperationException( + "ever_ge_bigint_tbigint requires libmeos — set -Dmobilityflink.meos.enabled=true"); + } + return GeneratedFunctions.ever_ge_bigint_tbigint(arg0, arg1); + } + + /** MEOS {@code ever_ge_tbigint_bigint} — tbigint temporal family. */ + public static int ever_ge_tbigint_bigint(jnr.ffi.Pointer arg0, long arg1) { + if (!MEOS_AVAILABLE) { + throw new UnsupportedOperationException( + "ever_ge_tbigint_bigint requires libmeos — set -Dmobilityflink.meos.enabled=true"); + } + return GeneratedFunctions.ever_ge_tbigint_bigint(arg0, arg1); + } + + /** MEOS {@code ever_gt_bigint_tbigint} — tbigint temporal family. */ + public static int ever_gt_bigint_tbigint(long arg0, jnr.ffi.Pointer arg1) { + if (!MEOS_AVAILABLE) { + throw new UnsupportedOperationException( + "ever_gt_bigint_tbigint requires libmeos — set -Dmobilityflink.meos.enabled=true"); + } + return GeneratedFunctions.ever_gt_bigint_tbigint(arg0, arg1); + } + + /** MEOS {@code ever_gt_tbigint_bigint} — tbigint temporal family. */ + public static int ever_gt_tbigint_bigint(jnr.ffi.Pointer arg0, long arg1) { + if (!MEOS_AVAILABLE) { + throw new UnsupportedOperationException( + "ever_gt_tbigint_bigint requires libmeos — set -Dmobilityflink.meos.enabled=true"); + } + return GeneratedFunctions.ever_gt_tbigint_bigint(arg0, arg1); + } + + /** MEOS {@code ever_le_bigint_tbigint} — tbigint temporal family. */ + public static int ever_le_bigint_tbigint(long arg0, jnr.ffi.Pointer arg1) { + if (!MEOS_AVAILABLE) { + throw new UnsupportedOperationException( + "ever_le_bigint_tbigint requires libmeos — set -Dmobilityflink.meos.enabled=true"); + } + return GeneratedFunctions.ever_le_bigint_tbigint(arg0, arg1); + } + + /** MEOS {@code ever_le_tbigint_bigint} — tbigint temporal family. */ + public static int ever_le_tbigint_bigint(jnr.ffi.Pointer arg0, long arg1) { + if (!MEOS_AVAILABLE) { + throw new UnsupportedOperationException( + "ever_le_tbigint_bigint requires libmeos — set -Dmobilityflink.meos.enabled=true"); + } + return GeneratedFunctions.ever_le_tbigint_bigint(arg0, arg1); + } + + /** MEOS {@code ever_lt_bigint_tbigint} — tbigint temporal family. */ + public static int ever_lt_bigint_tbigint(long arg0, jnr.ffi.Pointer arg1) { + if (!MEOS_AVAILABLE) { + throw new UnsupportedOperationException( + "ever_lt_bigint_tbigint requires libmeos — set -Dmobilityflink.meos.enabled=true"); + } + return GeneratedFunctions.ever_lt_bigint_tbigint(arg0, arg1); + } + + /** MEOS {@code ever_lt_tbigint_bigint} — tbigint temporal family. */ + public static int ever_lt_tbigint_bigint(jnr.ffi.Pointer arg0, long arg1) { + if (!MEOS_AVAILABLE) { + throw new UnsupportedOperationException( + "ever_lt_tbigint_bigint requires libmeos — set -Dmobilityflink.meos.enabled=true"); + } + return GeneratedFunctions.ever_lt_tbigint_bigint(arg0, arg1); + } + + /** MEOS {@code ever_ne_bigint_tbigint} — tbigint temporal family. */ + public static int ever_ne_bigint_tbigint(long arg0, jnr.ffi.Pointer arg1) { + if (!MEOS_AVAILABLE) { + throw new UnsupportedOperationException( + "ever_ne_bigint_tbigint requires libmeos — set -Dmobilityflink.meos.enabled=true"); + } + return GeneratedFunctions.ever_ne_bigint_tbigint(arg0, arg1); + } + + /** MEOS {@code ever_ne_tbigint_bigint} — tbigint temporal family. */ + public static int ever_ne_tbigint_bigint(jnr.ffi.Pointer arg0, long arg1) { + if (!MEOS_AVAILABLE) { + throw new UnsupportedOperationException( + "ever_ne_tbigint_bigint requires libmeos — set -Dmobilityflink.meos.enabled=true"); + } + return GeneratedFunctions.ever_ne_tbigint_bigint(arg0, arg1); + } + + /** MEOS {@code mul_bigint_tbigint} — tbigint temporal family. */ + public static jnr.ffi.Pointer mul_bigint_tbigint(long arg0, jnr.ffi.Pointer arg1) { + if (!MEOS_AVAILABLE) { + throw new UnsupportedOperationException( + "mul_bigint_tbigint requires libmeos — set -Dmobilityflink.meos.enabled=true"); + } + return GeneratedFunctions.mul_bigint_tbigint(arg0, arg1); + } + + /** MEOS {@code mul_tbigint_bigint} — tbigint temporal family. */ + public static jnr.ffi.Pointer mul_tbigint_bigint(jnr.ffi.Pointer arg0, long arg1) { + if (!MEOS_AVAILABLE) { + throw new UnsupportedOperationException( + "mul_tbigint_bigint requires libmeos — set -Dmobilityflink.meos.enabled=true"); + } + return GeneratedFunctions.mul_tbigint_bigint(arg0, arg1); + } + + /** MEOS {@code sub_bigint_tbigint} — tbigint temporal family. */ + public static jnr.ffi.Pointer sub_bigint_tbigint(long arg0, jnr.ffi.Pointer arg1) { + if (!MEOS_AVAILABLE) { + throw new UnsupportedOperationException( + "sub_bigint_tbigint requires libmeos — set -Dmobilityflink.meos.enabled=true"); + } + return GeneratedFunctions.sub_bigint_tbigint(arg0, arg1); + } + + /** MEOS {@code sub_tbigint_bigint} — tbigint temporal family. */ + public static jnr.ffi.Pointer sub_tbigint_bigint(jnr.ffi.Pointer arg0, long arg1) { + if (!MEOS_AVAILABLE) { + throw new UnsupportedOperationException( + "sub_tbigint_bigint requires libmeos — set -Dmobilityflink.meos.enabled=true"); + } + return GeneratedFunctions.sub_tbigint_bigint(arg0, arg1); + } + + /** MEOS {@code tbigint_at_value} — tbigint temporal family. */ + public static jnr.ffi.Pointer tbigint_at_value(jnr.ffi.Pointer arg0, long arg1) { + if (!MEOS_AVAILABLE) { + throw new UnsupportedOperationException( + "tbigint_at_value requires libmeos — set -Dmobilityflink.meos.enabled=true"); + } + return GeneratedFunctions.tbigint_at_value(arg0, arg1); + } + + /** MEOS {@code tbigint_end_value} — tbigint temporal family. */ + public static long tbigint_end_value(jnr.ffi.Pointer arg0) { + if (!MEOS_AVAILABLE) { + throw new UnsupportedOperationException( + "tbigint_end_value requires libmeos — set -Dmobilityflink.meos.enabled=true"); + } + return GeneratedFunctions.tbigint_end_value(arg0); + } + + /** MEOS {@code tbigint_from_base_temp} — tbigint temporal family. */ + public static jnr.ffi.Pointer tbigint_from_base_temp(long arg0, jnr.ffi.Pointer arg1) { + if (!MEOS_AVAILABLE) { + throw new UnsupportedOperationException( + "tbigint_from_base_temp requires libmeos — set -Dmobilityflink.meos.enabled=true"); + } + return GeneratedFunctions.tbigint_from_base_temp(arg0, arg1); + } + + /** MEOS {@code tbigint_from_mfjson} — tbigint temporal family. */ + public static jnr.ffi.Pointer tbigint_from_mfjson(java.lang.String arg0) { + if (!MEOS_AVAILABLE) { + throw new UnsupportedOperationException( + "tbigint_from_mfjson requires libmeos — set -Dmobilityflink.meos.enabled=true"); + } + return GeneratedFunctions.tbigint_from_mfjson(arg0); + } + + /** MEOS {@code tbigint_in} — tbigint temporal family. */ + public static jnr.ffi.Pointer tbigint_in(java.lang.String arg0) { + if (!MEOS_AVAILABLE) { + throw new UnsupportedOperationException( + "tbigint_in requires libmeos — set -Dmobilityflink.meos.enabled=true"); + } + return GeneratedFunctions.tbigint_in(arg0); + } + + /** MEOS {@code tbigint_max_value} — tbigint temporal family. */ + public static long tbigint_max_value(jnr.ffi.Pointer arg0) { + if (!MEOS_AVAILABLE) { + throw new UnsupportedOperationException( + "tbigint_max_value requires libmeos — set -Dmobilityflink.meos.enabled=true"); + } + return GeneratedFunctions.tbigint_max_value(arg0); + } + + /** MEOS {@code tbigint_min_value} — tbigint temporal family. */ + public static long tbigint_min_value(jnr.ffi.Pointer arg0) { + if (!MEOS_AVAILABLE) { + throw new UnsupportedOperationException( + "tbigint_min_value requires libmeos — set -Dmobilityflink.meos.enabled=true"); + } + return GeneratedFunctions.tbigint_min_value(arg0); + } + + /** MEOS {@code tbigint_minus_value} — tbigint temporal family. */ + public static jnr.ffi.Pointer tbigint_minus_value(jnr.ffi.Pointer arg0, long arg1) { + if (!MEOS_AVAILABLE) { + throw new UnsupportedOperationException( + "tbigint_minus_value requires libmeos — set -Dmobilityflink.meos.enabled=true"); + } + return GeneratedFunctions.tbigint_minus_value(arg0, arg1); + } + + /** MEOS {@code tbigint_out} — tbigint temporal family. */ + public static java.lang.String tbigint_out(jnr.ffi.Pointer arg0) { + if (!MEOS_AVAILABLE) { + throw new UnsupportedOperationException( + "tbigint_out requires libmeos — set -Dmobilityflink.meos.enabled=true"); + } + return GeneratedFunctions.tbigint_out(arg0); + } + + /** MEOS {@code tbigint_scale_value} — tbigint temporal family. */ + public static jnr.ffi.Pointer tbigint_scale_value(jnr.ffi.Pointer arg0, long arg1) { + if (!MEOS_AVAILABLE) { + throw new UnsupportedOperationException( + "tbigint_scale_value requires libmeos — set -Dmobilityflink.meos.enabled=true"); + } + return GeneratedFunctions.tbigint_scale_value(arg0, arg1); + } + + /** MEOS {@code tbigint_shift_scale_value} — tbigint temporal family. */ + public static jnr.ffi.Pointer tbigint_shift_scale_value(jnr.ffi.Pointer arg0, long arg1, long arg2) { + if (!MEOS_AVAILABLE) { + throw new UnsupportedOperationException( + "tbigint_shift_scale_value requires libmeos — set -Dmobilityflink.meos.enabled=true"); + } + return GeneratedFunctions.tbigint_shift_scale_value(arg0, arg1, arg2); + } + + /** MEOS {@code tbigint_shift_value} — tbigint temporal family. */ + public static jnr.ffi.Pointer tbigint_shift_value(jnr.ffi.Pointer arg0, long arg1) { + if (!MEOS_AVAILABLE) { + throw new UnsupportedOperationException( + "tbigint_shift_value requires libmeos — set -Dmobilityflink.meos.enabled=true"); + } + return GeneratedFunctions.tbigint_shift_value(arg0, arg1); + } + + /** MEOS {@code tbigint_start_value} — tbigint temporal family. */ + public static long tbigint_start_value(jnr.ffi.Pointer arg0) { + if (!MEOS_AVAILABLE) { + throw new UnsupportedOperationException( + "tbigint_start_value requires libmeos — set -Dmobilityflink.meos.enabled=true"); + } + return GeneratedFunctions.tbigint_start_value(arg0); + } + + /** MEOS {@code tbigint_to_tfloat} — tbigint temporal family. */ + public static jnr.ffi.Pointer tbigint_to_tfloat(jnr.ffi.Pointer arg0) { + if (!MEOS_AVAILABLE) { + throw new UnsupportedOperationException( + "tbigint_to_tfloat requires libmeos — set -Dmobilityflink.meos.enabled=true"); + } + return GeneratedFunctions.tbigint_to_tfloat(arg0); + } + + /** MEOS {@code tbigint_to_tint} — tbigint temporal family. */ + public static jnr.ffi.Pointer tbigint_to_tint(jnr.ffi.Pointer arg0) { + if (!MEOS_AVAILABLE) { + throw new UnsupportedOperationException( + "tbigint_to_tint requires libmeos — set -Dmobilityflink.meos.enabled=true"); + } + return GeneratedFunctions.tbigint_to_tint(arg0); + } + + /** MEOS {@code tbigint_value_at_timestamptz} — tbigint temporal family. */ + public static boolean tbigint_value_at_timestamptz(jnr.ffi.Pointer arg0, java.time.OffsetDateTime arg1, boolean arg2, jnr.ffi.Pointer arg3) { + if (!MEOS_AVAILABLE) { + throw new UnsupportedOperationException( + "tbigint_value_at_timestamptz requires libmeos — set -Dmobilityflink.meos.enabled=true"); + } + return GeneratedFunctions.tbigint_value_at_timestamptz(arg0, arg1, arg2, arg3); + } + + /** MEOS {@code tbigint_value_n} — tbigint temporal family. */ + public static jnr.ffi.Pointer tbigint_value_n(jnr.ffi.Pointer arg0, long arg1) { + if (!MEOS_AVAILABLE) { + throw new UnsupportedOperationException( + "tbigint_value_n requires libmeos — set -Dmobilityflink.meos.enabled=true"); + } + return GeneratedFunctions.tbigint_value_n(arg0, arg1); + } + + /** MEOS {@code tbigint_values} — tbigint temporal family. */ + public static jnr.ffi.Pointer tbigint_values(jnr.ffi.Pointer arg0, jnr.ffi.Pointer arg1) { + if (!MEOS_AVAILABLE) { + throw new UnsupportedOperationException( + "tbigint_values requires libmeos — set -Dmobilityflink.meos.enabled=true"); + } + return GeneratedFunctions.tbigint_values(arg0, arg1); + } + + /** MEOS {@code tbigintbox_expand} — tbigint temporal family. */ + public static jnr.ffi.Pointer tbigintbox_expand(jnr.ffi.Pointer arg0, long arg1) { + if (!MEOS_AVAILABLE) { + throw new UnsupportedOperationException( + "tbigintbox_expand requires libmeos — set -Dmobilityflink.meos.enabled=true"); + } + return GeneratedFunctions.tbigintbox_expand(arg0, arg1); + } + + /** MEOS {@code tbigintbox_shift_scale} — tbigint temporal family. */ + public static jnr.ffi.Pointer tbigintbox_shift_scale(jnr.ffi.Pointer arg0, long arg1, long arg2, boolean arg3, boolean arg4) { + if (!MEOS_AVAILABLE) { + throw new UnsupportedOperationException( + "tbigintbox_shift_scale requires libmeos — set -Dmobilityflink.meos.enabled=true"); + } + return GeneratedFunctions.tbigintbox_shift_scale(arg0, arg1, arg2, arg3, arg4); + } + + /** MEOS {@code tbigintinst_make} — tbigint temporal family. */ + public static jnr.ffi.Pointer tbigintinst_make(long arg0, java.time.OffsetDateTime arg1) { + if (!MEOS_AVAILABLE) { + throw new UnsupportedOperationException( + "tbigintinst_make requires libmeos — set -Dmobilityflink.meos.enabled=true"); + } + return GeneratedFunctions.tbigintinst_make(arg0, arg1); + } + + /** MEOS {@code tbigintseq_from_base_tstzset} — tbigint temporal family. */ + public static jnr.ffi.Pointer tbigintseq_from_base_tstzset(long arg0, jnr.ffi.Pointer arg1) { + if (!MEOS_AVAILABLE) { + throw new UnsupportedOperationException( + "tbigintseq_from_base_tstzset requires libmeos — set -Dmobilityflink.meos.enabled=true"); + } + return GeneratedFunctions.tbigintseq_from_base_tstzset(arg0, arg1); + } + + /** MEOS {@code tbigintseq_from_base_tstzspan} — tbigint temporal family. */ + public static jnr.ffi.Pointer tbigintseq_from_base_tstzspan(long arg0, jnr.ffi.Pointer arg1) { + if (!MEOS_AVAILABLE) { + throw new UnsupportedOperationException( + "tbigintseq_from_base_tstzspan requires libmeos — set -Dmobilityflink.meos.enabled=true"); + } + return GeneratedFunctions.tbigintseq_from_base_tstzspan(arg0, arg1); + } + + /** MEOS {@code tbigintseqset_from_base_tstzspanset} — tbigint temporal family. */ + public static jnr.ffi.Pointer tbigintseqset_from_base_tstzspanset(long arg0, jnr.ffi.Pointer arg1) { + if (!MEOS_AVAILABLE) { + throw new UnsupportedOperationException( + "tbigintseqset_from_base_tstzspanset requires libmeos — set -Dmobilityflink.meos.enabled=true"); + } + return GeneratedFunctions.tbigintseqset_from_base_tstzspanset(arg0, arg1); + } + + /** MEOS {@code tfloat_to_tbigint} — tbigint temporal family. */ + public static jnr.ffi.Pointer tfloat_to_tbigint(jnr.ffi.Pointer arg0) { + if (!MEOS_AVAILABLE) { + throw new UnsupportedOperationException( + "tfloat_to_tbigint requires libmeos — set -Dmobilityflink.meos.enabled=true"); + } + return GeneratedFunctions.tfloat_to_tbigint(arg0); + } + + /** MEOS {@code tint_to_tbigint} — tbigint temporal family. */ + public static jnr.ffi.Pointer tint_to_tbigint(jnr.ffi.Pointer arg0) { + if (!MEOS_AVAILABLE) { + throw new UnsupportedOperationException( + "tint_to_tbigint requires libmeos — set -Dmobilityflink.meos.enabled=true"); + } + return GeneratedFunctions.tint_to_tbigint(arg0); + } +} diff --git a/flink-processor/tools/codegen/emit_tbigint_facade.py b/flink-processor/tools/codegen/emit_tbigint_facade.py new file mode 100644 index 0000000..87e5cfc --- /dev/null +++ b/flink-processor/tools/codegen/emit_tbigint_facade.py @@ -0,0 +1,69 @@ +#!/usr/bin/env python3 +"""Emit the tbigint temporal-type family facade (MeosOpsTBigint). + +The consolidated functions.GeneratedFunctions jar carries the tbigint temporal +type (MobilityDB #1044). The static bigint set/span types already have facade +classes (MeosOpsBigintSet/Span/SpanSet); this emits the temporal type's surface +— the numerator is the public meos.h externs whose name contains 'tbigint' +intersected with the jar (Datum-bearing dispatchers are excluded, not being +extern-declared in the public header). Mirrors the per-family facade classes +(MeosOpsTInt/TFloat/…) and the th3index family-port. + +Run from flink-processor/: + MEOS_INCLUDE= python3 tools/codegen/emit_tbigint_facade.py jar/JMEOS.jar +""" +import re, os, sys, subprocess + +HERE = os.path.dirname(os.path.dirname(os.path.dirname(os.path.abspath(__file__)))) +FACADE = os.path.join(HERE, "src/main/java/org/mobilitydb/flink/meos") +INC = os.environ.get("MEOS_INCLUDE", "/home/esteban/src/MobilityDB/meos/include") +_SIG = re.compile(r'public static (\S+) ([a-z_][A-Za-z0-9_]*)\(([^)]*)\)') +_DECL = re.compile(r'^\s*extern\s+.+?\b([a-z][A-Za-z0-9_]*)\s*\(', re.M) + + +def jar_sigs(jar): + out = subprocess.run(["javap", "-classpath", jar, "-p", "functions.GeneratedFunctions"], + capture_output=True, text=True).stdout + sigs = {} + for line in out.splitlines(): + m = _SIG.search(line) + if m: + sigs[m.group(2)] = (m.group(1), + [a.strip() for a in m.group(3).strip().split(",")] if m.group(3).strip() else []) + return sigs + + +def main(): + jar = sys.argv[1] if len(sys.argv) > 1 else os.path.join(HERE, "jar/JMEOS.jar") + sigs = jar_sigs(jar) + public = set(_DECL.findall(open(os.path.join(INC, "meos.h")).read())) + names = sorted(n for n in public if "tbigint" in n and n in sigs) + body = "" + for name in names: + ret, types = sigs[name] + decl = ", ".join(f"{t} arg{i}" for i, t in enumerate(types)) + call = ", ".join(f"arg{i}" for i in range(len(types))) + retkw = "" if ret == "void" else "return " + body += (f"\n /** MEOS {{@code {name}}} — tbigint temporal family. */\n" + f" public static {ret} {name}({decl}) {{\n" + f" if (!MEOS_AVAILABLE) {{\n" + f" throw new UnsupportedOperationException(\n" + f' "{name} requires libmeos — set -Dmobilityflink.meos.enabled=true");\n' + f" }}\n" + f" {retkw}GeneratedFunctions.{name}({call});\n" + f" }}\n") + txt = ("package org.mobilitydb.flink.meos;\n\n" + "/* AUTO-GENERATED by tools/codegen/emit_tbigint_facade.py — do not edit by hand.\n" + " * tbigint temporal-type family facade over functions.GeneratedFunctions.\n */\n\n" + "import functions.GeneratedFunctions;\n" + "import jnr.ffi.Pointer;\n\n" + "public final class MeosOpsTBigint {\n\n" + " public static final boolean MEOS_AVAILABLE = MeosOpsRuntime.MEOS_AVAILABLE;\n\n" + " private MeosOpsTBigint() { /* utility */ }\n" + f"{body}}}\n") + open(os.path.join(FACADE, "MeosOpsTBigint.java"), "w").write(txt) + print(f"MeosOpsTBigint: {len(names)} methods") + + +if __name__ == "__main__": + main() diff --git a/flink-processor/tools/parity/emit_gap_methods.py b/flink-processor/tools/parity/emit_gap_methods.py index 7d86776..a229cbd 100644 --- a/flink-processor/tools/parity/emit_gap_methods.py +++ b/flink-processor/tools/parity/emit_gap_methods.py @@ -16,7 +16,7 @@ HERE = os.path.dirname(os.path.dirname(os.path.dirname(os.path.abspath(__file__)))) INC = os.environ.get("MEOS_INCLUDE", "/home/esteban/src/MobilityDB/meos/include") -PUBLIC_HEADERS = ["meos.h", "meos_geo.h", "meos_cbuffer.h", "meos_npoint.h", "meos_pose.h", "meos_rgeo.h"] +PUBLIC_HEADERS = ["meos.h", "meos_geo.h", "meos_cbuffer.h", "meos_npoint.h", "meos_pose.h", "meos_rgeo.h", "meos_h3.h"] FACADE = os.path.join(HERE, "src/main/java/org/mobilitydb/flink/meos") OUT = os.path.join(FACADE, "MeosOpsParityGaps.java") # Forwarder facades are themselves derived; the "already covered" baseline is the diff --git a/flink-processor/tools/parity/parity_audit.py b/flink-processor/tools/parity/parity_audit.py index 263d507..e5e2005 100644 --- a/flink-processor/tools/parity/parity_audit.py +++ b/flink-processor/tools/parity/parity_audit.py @@ -28,11 +28,13 @@ from datetime import date PUBLIC_HEADERS = ["meos.h", "meos_geo.h", "meos_cbuffer.h", - "meos_npoint.h", "meos_pose.h", "meos_rgeo.h"] + "meos_npoint.h", "meos_pose.h", "meos_rgeo.h", +"meos_h3.h"] FAMILY = {"meos.h": "core temporal / set / span / spanset / tbox", "meos_geo.h": "geo (tgeo / tpoint / stbox)", "meos_cbuffer.h": "cbuffer", "meos_npoint.h": "npoint", - "meos_pose.h": "pose", "meos_rgeo.h": "rgeo"} + "meos_pose.h": "pose", "meos_rgeo.h": "rgeo", + "meos_h3.h": "h3 / th3index"} _DECL = re.compile(r'^\s*extern\s+.+?\b([a-z][A-Za-z0-9_]*)\s*\(', re.M) _PUBSTATIC = re.compile(r'public static [A-Za-z0-9_.<>\[\]]+ ([a-z0-9_]+)\(')