Skip to content

feat(bindings): mobilityduck_version() / mobilityduck_full_version()#28

Merged
nhungoc1508 merged 1 commit into
mainfrom
feat/mobilityduck-version-functions
Apr 27, 2026
Merged

feat(bindings): mobilityduck_version() / mobilityduck_full_version()#28
nhungoc1508 merged 1 commit into
mainfrom
feat/mobilityduck-version-functions

Conversation

@estebanzimanyi

Copy link
Copy Markdown
Member

Summary

Adds two SQL scalar functions mirroring the shape of MobilityDB's mobilitydb_version() / mobilitydb_full_version(), but reporting MobilityDuck's own brand and its own dependency stack rather than MobilityDB's:

SELECT mobilityduck_version();
-- MobilityDuck <git-sha>

SELECT mobilityduck_full_version();
-- MobilityDuck <git-sha>, linked MEOS f11b7443e, DuckDB v1.4.4,
--   GEOS 3.13.1-CAPI-1.19.2, PROJ 9.1.1, OpenSSL 3.5.2 5 Aug 2025

This matches the precedent of the existing mobilityduck_openssl_version() SQL scalar (registered in LoadInternal) and the DUCKDB_EXTENSION_API mobilityduck_version() C-extern hook.

Why brand-divergent

MEOS does not expose a runtime version symbol, and mobilitydb_version() itself is a private MEOS internal symbol (declared in meos/include/temporal/temporal.h, not in the installed public headers). The right answer is a MobilityDuck-side equivalent that reports what's actually linked into THIS distribution.

The MEOS pin SHA is exposed via a MOBILITYDUCK_MEOS_PIN macro defaulting to the SHA in vcpkg_ports/meos/portfile.cmake's REF; a build-system follow-up could thread the actual REF through CMake so the two stay in sync automatically.

Parity-test consequence

The upstream MobilityDB regression query:

SELECT mobilitydb_version() LIKE 'MobilityDB%';

ports to MobilityDuck's brand as:

SELECT mobilityduck_version() LIKE 'MobilityDuck%';

A brand divergence, not a missing binding. PR #22's 022_temporal.test parity-port skip block can be re-pointed to the duck-branded form when this lands.

Test plan

  • make release then TZ=UTC ./build/release/test/unittest "<proj>/test/*" — full suite passes (747 assertions, 13 test cases).
  • Smoke: SELECT mobilityduck_full_version(); returns the formatted string above.

Adds two SQL scalar functions mirroring MobilityDB's
`mobilitydb_version()` / `mobilitydb_full_version()` shape, but
reporting MobilityDuck's own brand and its own dependency stack
rather than MobilityDB's:

  SELECT mobilityduck_version();
    -> MobilityDuck <git-sha>

  SELECT mobilityduck_full_version();
    -> MobilityDuck <git-sha>, linked MEOS <pin>, DuckDB v1.4.4,
       GEOS 3.13.1-CAPI-1.19.2, PROJ 9.1.1, OpenSSL 3.5.2 5 Aug 2025

The MEOS pin is exposed via a `MOBILITYDUCK_MEOS_PIN` macro
defaulting to the SHA in vcpkg_ports/meos/portfile.cmake's REF; a
build-system follow-up could thread the actual REF through CMake
so the two stay in sync automatically.

The corresponding query in the upstream MobilityDB regression file
022_temporal.test.sql:
  SELECT mobilitydb_version() LIKE 'MobilityDB%';
ports to MobilityDuck's brand as:
  SELECT mobilityduck_version() LIKE 'MobilityDuck%';
i.e. a brand divergence rather than a missing binding.

Full suite passes (747 assertions, 13 test cases).
@nhungoc1508 nhungoc1508 merged commit 540ed6c into main Apr 27, 2026
17 checks passed
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.

2 participants