Generate temporal_hash_extended over all temporal families - #237
Merged
estebanzimanyi merged 1 commit intoJul 31, 2026
Merged
Conversation
estebanzimanyi
force-pushed
the
feat/duck-hash-extended-ubigint
branch
3 times, most recently
from
July 31, 2026 09:42
d292795 to
874fc3a
Compare
Generates the extended (64-bit, seeded) hash temporal_hash_extended(<ttype>, UBIGINT) for every temporal family, inherited through Temporal<T> — the Duck side of the MEOS temporal_hash_extended surface. The uint64 hash and its seed use DuckDB's native UBIGINT, not a signed BIGINT: a MEOS hash fills the full unsigned range (temporal_hash_extended(tint '1@2000-01-01', 0) = 11445401048662056440 > 2**63 does not fit a signed BIGINT), and DuckDB range-checks the cast rather than bit-reinterpreting the way PostgreSQL/C do. Generator: key uint64_t to UBIGINT in the scalar arg/return maps (SCALAR, SCALAR_ARG, SCALAR_RET_CPP), and check the Tcell cell-id branch before the generic scalar branch in ret_type and shape_emittable so a uint64 cell id keeps its cell type instead of collapsing to UBIGINT.
estebanzimanyi
force-pushed
the
feat/duck-hash-extended-ubigint
branch
from
July 31, 2026 10:23
874fc3a to
e1f5b91
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.
Generates the extended (64-bit, seeded) hash
temporal_hash_extended(<ttype>, UBIGINT)for every temporal family, inherited throughTemporal<T>— the DuckDB side of the MEOStemporal_hash_extendedsurface.The uint64 hash and its seed use DuckDB's native
UBIGINT, not a signedBIGINT: a MEOS hash fills the full unsigned range (temporal_hash_extended(tint '1@2000-01-01', 0) = 11445401048662056440> 2^63 does not fit a signedBIGINT), and DuckDB range-checks the cast rather than bit-reinterpreting the way PostgreSQL/C do.Generator — keys
uint64_ttoUBIGINTin the scalar arg/return maps (SCALAR,SCALAR_ARG,SCALAR_RET_CPP), and checks theTcellcell-id branch before the generic scalar branch inret_type/shape_emittableso a uint64 cell id keeps its cell type (h3index/quadbin) instead of collapsing toUBIGINT.Adds
test/sql/temporal_hash.testcoveringtemporal_hash(UINTEGER) andtemporal_hash_extended(UBIGINT + seed).