Skip to content

Recover the quadbin Quadbin collapsed C type#22

Open
estebanzimanyi wants to merge 1 commit into
MobilityDB:masterfrom
estebanzimanyi:fix/recover-quadbin-type
Open

Recover the quadbin Quadbin collapsed C type#22
estebanzimanyi wants to merge 1 commit into
MobilityDB:masterfrom
estebanzimanyi:fix/recover-quadbin-type

Conversation

@estebanzimanyi

Copy link
Copy Markdown
Member

Quadbin is a typedef uint64 (meos_quadbin.h), so libclang collapses it to int — exactly like H3Index. It was missing from the type-recovery map, so the catalog reported the collapsed int and bindings disagreed on the quadbin cell type (JMEOS' FunctionsGenerator maps the Quadbin cType to a Pointer; the MobilitySpark generator maps the collapsed int to Integer) — a compile/runtime mismatch for every quadbin function.

Add "Quadbin": "uint64_t" to _TYPE_MAP so the recovered type is reported uniformly and every catalog-driven binding binds the quadbin cell as a 64-bit integer, mirroring H3Index.

Quadbin is a typedef of uint64 (meos_quadbin.h). Unlike H3Index — whose name is
erased to int by the host-collision prefix rename, so the existing recovery (slot
cType == int) catches it — Quadbin's name SURVIVES as the cType while only the
canonical collapses to int (its underlying uint64 is the part that erased). So the
recovery must also fire when the slot spells the typedef name, not just int.

Add "Quadbin": "uint64_t" to the type-recovery map AND generalize the recovery to
match either the collapsed `int` spelling or the surviving `original` typedef name,
rewriting both cType and the collapsed canonical to uint64_t. Every catalog-driven
binding now binds the quadbin cell as a 64-bit integer (bigint), like H3Index,
instead of disagreeing on the collapsed int (JMEOS mapped the Quadbin cType to a
Pointer; the Spark generator mapped the collapsed int to Integer).
@estebanzimanyi estebanzimanyi force-pushed the fix/recover-quadbin-type branch from 4204c7a to 5b04de9 Compare June 23, 2026 08:42
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.

1 participant