Recover the bare uint32 typedef in the catalog#62
Merged
estebanzimanyi merged 1 commit intoJul 16, 2026
Merged
Conversation
The parser's type-recovery table restored the bare PostgreSQL uint64 typedef (hash seeds, cell ids) but not uint32, so every MEOS *_hash return -- declared uint32 in the headers -- stayed collapsed to a signed int. Hash values >= 2**31 then flipped sign in every generated binding (e.g. MobilityDuck registered span_hash as INTEGER instead of UINTEGER). Add the uint32 -> uint32_t entry, mirroring uint64 -> uint64_t, plus a regression test asserting the *_hash returns recover, so this sibling of the recurrently-dropped uint64 entry cannot be lost in a refactor.
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.
The parser's type-recovery table (
parser/typerecover.py_TYPE_MAP) restores the bare PostgreSQL integer typedefs that libclang collapses tointwhen parsing the MEOS headers withoutc.h. It mapsint64 → int64_tanduint64 → uint64_t, but has nouint32entry — so every MEOS*_hashfunction, declareduint32in the headers, is recorded as a signedintin the catalog.That signed
intpropagates to every generated binding: hash values>= 2**31flip sign, and MobilityDuck registersspan_hash/set_hash/spanset_hashasINTEGERrather thanUINTEGER, disagreeing with both the hand surface and the*_hash_extendedsiblings (which recover touint64_t).This change adds the
uint32 → uint32_tentry, mirroringuint64 → uint64_t, and a regression test asserting the*_hashreturns recover touint32_t.With the entry present, all 17
*_hashfunctions recorduint32_t,*_hash_extendedstaysuint64_t, and genuineintreturns such asset_num_valuesare untouched.