From e64edcf4fd5a3d02d4a472611d2689e1084bab9e Mon Sep 17 00:00:00 2001 From: Esteban Zimanyi Date: Mon, 14 Sep 2026 00:44:24 +0200 Subject: [PATCH] Spell out the operation of the quantified comparison bare names MobilityDB declares the functions behind the ever, always and temporal comparison operators with their operation spelled out: eEqual, eNotEqual, eLessThan, eLessEqual, eGreaterThan and eGreaterEqual, and the same behind a for always and t for the temporal comparison (MobilityDB#2710), since eLt is the built-in elt of Apache Spark and Apache Flink, which read a function name whatever its case. The three comparison families of meta/portable-aliases.json carry these 18 names for the same 18 operators, so the catalog's byOperator and byBareName, and every binding generated from them, name the functions as MobilityDB declares them. The tests read the new names, and the catalog example of docs/portable-aliases.md reads the values the catalog holds: tEqual for #=, the sorted bare names from aEqual to tNotEqual, and 41 aliases. Measured over MobilityDB master 129433dbfd with the catalog derived from the repository root: 41 portable aliases, with ?= mapping to eEqual, %>= to aGreaterEqual and #<> to tNotEqual; test_portable.py and test_portable_parity.py read 16 of 16, the live parity gate included. With the same catalog the full suite reads 6 failed, 321 passed and 24 skipped on this branch and on master alike: the six, the coverage gate, the family classification and four struct layouts, read a built libmeos, which the tests workflow builds before it derives the catalog. --- docs/portable-aliases.md | 8 ++++---- meta/portable-aliases.json | 36 +++++++++++++++++------------------ tests/test_portable.py | 4 ++-- tests/test_portable_parity.py | 2 +- 4 files changed, 25 insertions(+), 25 deletions(-) diff --git a/docs/portable-aliases.md b/docs/portable-aliases.md index b34381f..227096c 100644 --- a/docs/portable-aliases.md +++ b/docs/portable-aliases.md @@ -36,10 +36,10 @@ lookups for codegen: ```json "portableAliases": { - "byOperator": { "&&": "overlaps", "#=": "teq", "~=": "same", ... }, - "byBareName": { "overlaps": "&&", "teq": "#=", "same": "~=", ... }, - "bareNames": ["above", "adjacent", ..., "tdistance", "tge", "tne"], - "count": 29, "provenance": {...}, "scope": {...}, "notes": [...] + "byOperator": { "&&": "overlaps", "#=": "tEqual", "~=": "same", ... }, + "byBareName": { "overlaps": "&&", "tEqual": "#=", "same": "~=", ... }, + "bareNames": ["aEqual", "aGreaterEqual", ..., "tLessEqual", "tLessThan", "tNotEqual"], + "count": 41, "provenance": {...}, "scope": {...}, "notes": [...] } ``` diff --git a/meta/portable-aliases.json b/meta/portable-aliases.json index 0512c36..c4f6293 100644 --- a/meta/portable-aliases.json +++ b/meta/portable-aliases.json @@ -98,28 +98,28 @@ } ], "temporalComparison": [ - { "operator": "#=", "bareName": "tEq" }, - { "operator": "#<>", "bareName": "tNe" }, - { "operator": "#<", "bareName": "tLt" }, - { "operator": "#<=", "bareName": "tLe" }, - { "operator": "#>", "bareName": "tGt" }, - { "operator": "#>=", "bareName": "tGe" } + { "operator": "#=", "bareName": "tEqual" }, + { "operator": "#<>", "bareName": "tNotEqual" }, + { "operator": "#<", "bareName": "tLessThan" }, + { "operator": "#<=", "bareName": "tLessEqual" }, + { "operator": "#>", "bareName": "tGreaterThan" }, + { "operator": "#>=", "bareName": "tGreaterEqual" } ], "everComparison": [ - { "operator": "?=", "bareName": "eEq" }, - { "operator": "?<>", "bareName": "eNe" }, - { "operator": "?<", "bareName": "eLt" }, - { "operator": "?<=", "bareName": "eLe" }, - { "operator": "?>", "bareName": "eGt" }, - { "operator": "?>=", "bareName": "eGe" } + { "operator": "?=", "bareName": "eEqual" }, + { "operator": "?<>", "bareName": "eNotEqual" }, + { "operator": "?<", "bareName": "eLessThan" }, + { "operator": "?<=", "bareName": "eLessEqual" }, + { "operator": "?>", "bareName": "eGreaterThan" }, + { "operator": "?>=", "bareName": "eGreaterEqual" } ], "alwaysComparison": [ - { "operator": "%=", "bareName": "aEq" }, - { "operator": "%<>", "bareName": "aNe" }, - { "operator": "%<", "bareName": "aLt" }, - { "operator": "%<=", "bareName": "aLe" }, - { "operator": "%>", "bareName": "aGt" }, - { "operator": "%>=", "bareName": "aGe" } + { "operator": "%=", "bareName": "aEqual" }, + { "operator": "%<>", "bareName": "aNotEqual" }, + { "operator": "%<", "bareName": "aLessThan" }, + { "operator": "%<=", "bareName": "aLessEqual" }, + { "operator": "%>", "bareName": "aGreaterThan" }, + { "operator": "%>=", "bareName": "aGreaterEqual" } ], "distance": [ { diff --git a/tests/test_portable.py b/tests/test_portable.py index 860346c..c7e74ab 100644 --- a/tests/test_portable.py +++ b/tests/test_portable.py @@ -40,8 +40,8 @@ def test_known_mappings_verbatim(self): for op, bn in [("&&", "overlaps"), ("@>", "contains"), ("-|-", "adjacent"), ("<<#", "before"), ("#&>", "overafter"), ("|&>", "overabove"), - ("/&>", "overback"), ("#=", "tEq"), ("#<>", "tNe"), - ("?=", "eEq"), ("%=", "aEq"), + ("/&>", "overback"), ("#=", "tEqual"), + ("#<>", "tNotEqual"), ("?=", "eEqual"), ("%=", "aEqual"), ("|=|", "nearestApproachDistance"), ("~=", "same")]: self.assertEqual(flat[op], bn) self.assertEqual(sum(_EXPECTED_FAMILY_SIZES.values()), 41) diff --git a/tests/test_portable_parity.py b/tests/test_portable_parity.py index eef548f..e4ea7e3 100644 --- a/tests/test_portable_parity.py +++ b/tests/test_portable_parity.py @@ -47,7 +47,7 @@ def test_backed_vs_needs_explicit(self): self.assertEqual(nad["via"], "explicit") self.assertNotIn("nearestApproachDistance", r["unbacked"]) self.assertEqual(r["byBareName"]["overlaps"]["family"], "topology") - self.assertEqual(r["byBareName"]["tEq"]["operator"], "#=") + self.assertEqual(r["byBareName"]["tEqual"]["operator"], "#=") def test_every_bare_name_classified(self): r = build_parity(_catalog([])) # nothing backs anything