Generate the static quadbin cell-index scalar ops - #224
Open
estebanzimanyi wants to merge 2 commits into
Open
Conversation
estebanzimanyi
force-pushed
the
feat/duck-quadbin-cell-ops
branch
2 times, most recently
from
July 22, 2026 19:09
a5cc5a6 to
8d69575
Compare
…ical Regenerates the generated UDF surface from MobilityDB master (which brings in the generic temporal_hash surface). The MEOS-API catalog now renders the uint32 canonical type as `unsigned int` (it was `uint32_t`); key the scalar type maps on it so the *_hash functions keep registering instead of being dropped. uint32 hashes map to DuckDB's native `UINTEGER`, not a signed `INTEGER` — a hash >= 2**31 is out of range for INT32 and DuckDB range-checks the cast rather than bit-reinterpreting the way PostgreSQL/C do; DuckDB has real unsigned SQL types, so `UINTEGER` is the faithful representation.
Add shape_quadbin_scalar to the MobilityDuck generator: the @InGroup meos_quadbin cell-index scalar ops over the BIGINT-backed quadbin() type — isValidCell/isValidIndex (bool), quadbinGetResolution (integer), quadbinCellToParent/quadbinCellSibling/quadbinTileToCell (quadbin), quadbinCellArea (double) and quadbinCellToQuadkey (text). The shape is gated on retired(f): meos_quadbin joins RETIRED_GROUPS and the hand quadbinGetResolution / quadbinTileToCell / quadbinIsValidCell registrations are retired (isValidCell is the canonical MobilityDB SQL name; the per-axis quadbinCellToTileX/Y/Z stay hand pending an array export). The geometry-in / Set-out / geometry-out cell ops (geoToQuadbinCell, quadbinCellToChildren, quadbinCellToPoint, quadbinCellToBoundingBox, quadbinCellToTile) stay in RETIRE_UNCOVERED_OK pending typed public MEOS exports; the type output function (quadbin_out) is served by the quadbin<->VARCHAR cast.
estebanzimanyi
force-pushed
the
feat/duck-quadbin-cell-ops
branch
from
July 22, 2026 19:41
8d69575 to
1ddd802
Compare
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Adds the static quadbin cell-index scalar ops of
quadbin/352_quadbin_ops.in.sqlto the generator, following thegenerate-then-retire procedure.
Generated (shape_quadbin_scalar, @InGroup meos_quadbin)
Eight scalar ops over the BIGINT-backed
quadbin()type:isValidCell/isValidIndex→ boolean,quadbinGetResolution→integer,
quadbinCellToParent/quadbinCellSibling/quadbinTileToCell→ quadbin,quadbinCellArea→ double,quadbinCellToQuadkey→ text. The shape mirrors the h3 prefiltersibling and emits only for a group in
RETIRED_GROUPS.Retired hand registrations
meos_quadbinis a member ofRETIRED_GROUPS. The handquadbinGetResolution/quadbinTileToCell/quadbinIsValidCellregistrations are removed;
isValidCellis the canonical MobilityDBSQL name. The per-axis
quadbinCellToTileX/Y/Zremain hand.Held in RETIRE_UNCOVERED_OK
geoToQuadbinCell,quadbinCellToChildren,quadbinCellToPoint,quadbinCellToBoundingBox,quadbinCellToTilerequire typed publicMEOS geometry-in / Set-out / geometry-out / array exports. The type
output
quadbin_outis served by thequadbin↔VARCHARcast.Tests
tquadbin.testexercises the generated ops (20 assertions). The fullsuite is green: 1602 assertions across 67 cases, on a clean build
against fresh master MEOS with zero first-party warnings.