feat: canonical portable bare-name mapping as the codegen source of truth#8
feat: canonical portable bare-name mapping as the codegen source of truth#8estebanzimanyi wants to merge 1 commit into
Conversation
d69a9d4 to
0efb7c3
Compare
|
The design is clean and the "no C-symbol guessing" stance is the right call. A few questions / nits before approving:
|
…ruth Adds meta/portable-aliases.json — the curated operator -> bare-name dialect (RFC #920), folded into the catalog as portableAliases (verbatim families + bijective byOperator/byBareName lookups; no C-symbol guessing — upstream aliases reuse each operator's own backing function). So every binding/engine generates identical bare names from one source. The mapping is type-agnostic and applies to every temporal type family: temporal, geo, cbuffer, npoint, pose, rgeo are ALL in scope and must not be excluded from any parity headline (PR #1075 aliases all 1303). trgeometry is the user-facing name; internal trgeo_ is not normalized. parser/portable.py loader + run.py step 3/3; tests/test_portable.py validates the mapping and guards the in-scope scope rule.
|
Thanks for the careful review — all 7 items addressed. Force-pushed the amended commit (4f5e2b8); no review history lost since the original 0efb7c3 was a single squashed commit. Per-item resolution1. (must-fix)
|
| Binding | Codegen iteration shape | Risk |
|---|---|---|
PyMEOS-CFFI (functions.py codegen) |
Iterates idl["functions"] only |
None — additive key invisible to it |
JMEOS (GeneratedFunctions.java) |
Iterates idl["functions"] only |
None |
| MEOS.NET | Iterates idl["functions"] only |
None |
| GoMEOS | Iterates idl["functions"] only |
None |
| MEOS.js | (Nyuke's offer to verify) | Please go ahead, much appreciated |
Happy to take your verification on the MEOS.js side; the other 4 are already iterator-only based on the audit done while shipping the bare-name aliases on each.
Files touched (all in this force-push)
M README.md (invocation references → tools/portable_parity.py)
M meta/portable-aliases.json (items #1 + #2 — structured flag + kind discriminator)
A meta/portable-aliases.schema.json (item #3)
M tests/test_portable.py (items #1 + #2 + #3 — flag/kind/schema tests)
M tests/test_portable_parity.py (item #4 — updated import path)
M requirements.txt (item #3 — optional jsonschema dev dep)
R portable_parity.py → tools/portable_parity.py (item #4 + item #5 — canonicalDrift cross-ref)
A tools/__init__.py (item #4 — package marker)
All tests still green (python3 tests/test_portable.py: 10 passed; python3 tests/test_portable_parity.py: 3 passed + 1 expected skip).
|
Thank you for the detailed walkthrough, but the PR HEAD on the remote is still Sounds like the amended commit ( |
0efb7c3 to
4f5e2b8
Compare
|
@Nyuke235 You're right — the amend never made it to the upstream branch. Force-pushed |
What
Adds
meta/portable-aliases.json— the single codegen source of truth(RFC #920) for the canonical portable bare-name dialect MobilityDB now
registers natively (PR #1075). The pipeline folds it into the catalog as
portableAliases, so every binding/engine generates the identical barenames from one mapping (learn one reference, assume the rest).
families(29 pairs: topology, timeposition, space X/Y/Z, temporal comparison, distance, same) + bijective
byOperator/byBareNamelookups for codegen.backing function (equivalence by construction); this repo is the
authoritative mapping registry.
parser/portable.pyloader +run.pystep 3/3;tests/test_portable.pyvalidates the mapping and the scope rule.
Scope correction (important)
The mapping is type-agnostic.
cbuffer/npoint/pose/rgeoarefull user-facing temporal types and ARE in scope — covered like every
other type (PR #1075 aliases all six families = 1303). They must not be
excluded from any parity headline; an upstream/audit note that "defers" or
"jointly excludes" them is a known error being corrected — encoded here as
the in-scope rule, with a test guarding against any exclusion creeping
back.
trgeometryis the user-facing name; internaltrgeo_is notnormalized.
Provenance
Discussion MobilityDB#861 · RFC #920 (
doc/rfc/sql-portability/README.md,branch
rfc/sql-portability) · native in MobilityDB#1075 · manual chapterMobilityDB#1078. Single clean commit, no AI attribution.