From 526f05fca021415f7a610a74160731b4916e1104 Mon Sep 17 00:00:00 2001 From: Esteban Zimanyi Date: Sat, 24 Oct 2026 15:04:23 +0200 Subject: [PATCH] Name the MobilityDuck version functions in camelCase mobilityduckVersion, mobilityduckFullVersion and mobilityduckOpenSSLVersion are the SQL names of MobilityDuck's version functions, after MobilityDB's mobilitydbVersion and mobilitydbFullVersion; OpenSSL keeps its spelling, as the function's C executor MobilityduckOpenSSLVersionScalarFun spells it and as clusterDBSCAN and asMVTGeom keep their acronyms. The C entry point mobilityduck_version, which the DuckDB loader looks up by the extension's name, keeps its name. The parity documents name the new SQL names, and their table pairs them with MobilityDB's mobilitydbVersion and mobilitydbFullVersion. Witness: on main 3da720bdac the three are registered as mobilityduck_version, mobilityduck_full_version and mobilityduck_openssl_version, the only SQL names of the extension spelled with an underscore beside the camelCase surface MobilityDB declares. Measured: the native build of the branch runs the whole suite green, 4886 assertions in 121 test cases; 022_temporal reads mobilityduckVersion, mobilityduckFullVersion, which starts with it and names the linked MEOS, and mobilityduckOpenSSLVersion('x'). Why: a SQL name of the MobilityDB ecosystem is camelCase, with no underscore. --- CONTRIBUTING.md | 2 +- doc/PARITY-INVENTORY.md | 2 +- doc/PARITY.md | 6 +++--- src/mobilityduck_extension.cpp | 8 ++++---- test/sql/parity/022_temporal.test | 16 +++++++++++++--- 5 files changed, 22 insertions(+), 12 deletions(-) diff --git a/CONTRIBUTING.md b/CONTRIBUTING.md index c820b346..08994016 100644 --- a/CONTRIBUTING.md +++ b/CONTRIBUTING.md @@ -6,7 +6,7 @@ MobilityDuck is the DuckDB extension for MEOS-stored mobility data. Contribution Please open an issue at https://github.com/MobilityDB/MobilityDuck/issues with: -- The MobilityDuck / MEOS / DuckDB versions you are running. Run `SELECT mobilityduck_full_version();` from the DuckDB shell — it returns the extension version, the linked MEOS commit, the DuckDB version, and the full toolchain. +- The MobilityDuck / MEOS / DuckDB versions you are running. Run `SELECT mobilityduckFullVersion();` from the DuckDB shell — it returns the extension version, the linked MEOS commit, the DuckDB version, and the full toolchain. - The function signature or SQL query you tried. - The expected behaviour (typically what MobilityDB on PostgreSQL does for the same input — [`doc/PARITY.md`](doc/PARITY.md) is the reference for *"should work the same"*). - The actual behaviour, including any error messages. diff --git a/doc/PARITY-INVENTORY.md b/doc/PARITY-INVENTORY.md index b6496d27..7d4e10a2 100644 --- a/doc/PARITY-INVENTORY.md +++ b/doc/PARITY-INVENTORY.md @@ -145,7 +145,7 @@ shape MobilityDuck uses for `frechetDistancePath` / ## Reporting a gap -Run `mobilityduck_full_version()` from the SQL shell to get the +Run `mobilityduckFullVersion()` from the SQL shell to get the extension version, the linked MEOS commit, the DuckDB version, and the full toolchain. If you spot a missing function or unexpected behaviour, please open an issue with that version line and the diff --git a/doc/PARITY.md b/doc/PARITY.md index e7ef6e77..e8188456 100644 --- a/doc/PARITY.md +++ b/doc/PARITY.md @@ -191,8 +191,8 @@ same rows ordered by time. | MobilityDB | MobilityDuck | |---|---| -| `mobilitydb_version()` | `mobilityduck_version()` | -| `mobilitydb_full_version()` | `mobilityduck_full_version()` | +| `mobilitydbVersion()` | `mobilityduckVersion()` | +| `mobilitydbFullVersion()` | `mobilityduckFullVersion()` | The original `mobilitydb_*` names are also registered as aliases that return MobilityDuck's version stamp, so the same query text works on @@ -278,4 +278,4 @@ These MobilityDB type families aren't part of MobilityDuck today: *Spotted something that should work but doesn't? Please open an issue with the function signature you tried to call and the version -line from `mobilityduck_full_version()`.* +line from `mobilityduckFullVersion()`.* diff --git a/src/mobilityduck_extension.cpp b/src/mobilityduck_extension.cpp index c08639bd..5b03c0d1 100644 --- a/src/mobilityduck_extension.cpp +++ b/src/mobilityduck_extension.cpp @@ -334,10 +334,10 @@ static void LoadInternal(ExtensionLoader &loader) { } - // Register scalar function: mobilityduck_openssl_version + // Register scalar function: mobilityduckOpenSSLVersion auto mobilityduck_openssl_version_scalar_function = ScalarFunction( - "mobilityduck_openssl_version", + "mobilityduckOpenSSLVersion", {LogicalType::VARCHAR}, LogicalType::VARCHAR, MobilityduckOpenSSLVersionScalarFun @@ -345,10 +345,10 @@ static void LoadInternal(ExtensionLoader &loader) { duckdb::RegisterSerializedScalarFunction(loader, mobilityduck_openssl_version_scalar_function); duckdb::RegisterSerializedScalarFunction(loader, ScalarFunction( - "mobilityduck_version", {}, LogicalType::VARCHAR, + "mobilityduckVersion", {}, LogicalType::VARCHAR, MobilityduckVersionScalarFun)); duckdb::RegisterSerializedScalarFunction(loader, ScalarFunction( - "mobilityduck_full_version", {}, LogicalType::VARCHAR, + "mobilityduckFullVersion", {}, LogicalType::VARCHAR, MobilityduckFullVersionScalarFun)); // Portable-SQL aliases — MobilityDB publishes `mobilitydbVersion` and // `mobilitydbFullVersion`, so a query that probes for the engine version diff --git a/test/sql/parity/022_temporal.test b/test/sql/parity/022_temporal.test index feda9f6d..8b8da9bb 100644 --- a/test/sql/parity/022_temporal.test +++ b/test/sql/parity/022_temporal.test @@ -16,11 +16,21 @@ require mobilityduck # Utility functions # ============================================================================= -# MobilityDuck exposes `mobilityduck_version()` / -# `mobilityduck_full_version()` instead of the MobilityDB names — the +# MobilityDuck exposes `mobilityduckVersion()` / +# `mobilityduckFullVersion()` instead of the MobilityDB names — the # brand divergence is intentional. PR #28. query I -SELECT mobilityduck_version() LIKE 'MobilityDuck%'; +SELECT mobilityduckVersion() LIKE 'MobilityDuck%'; +---- +true + +query I +SELECT mobilityduckFullVersion() LIKE mobilityduckVersion() || ', linked MEOS %'; +---- +true + +query I +SELECT mobilityduckOpenSSLVersion('x') LIKE 'Mobilityduck x, my linked OpenSSL version is %'; ---- true