Skip to content

feat(bindings): set_hash / set_hash_extended for all set types#10

Merged
nhungoc1508 merged 1 commit into
mainfrom
feat/set-hash-bindings
Apr 27, 2026
Merged

feat(bindings): set_hash / set_hash_extended for all set types#10
nhungoc1508 merged 1 commit into
mainfrom
feat/set-hash-bindings

Conversation

@estebanzimanyi

Copy link
Copy Markdown
Member

Summary

Adds the two MEOS hash scalars for all six set types (intset/bigintset/floatset/textset/dateset/tstzset):

  • set_hash(<set>) -> UINTEGER (MEOS uint32 set_hash)
  • set_hash_extended(<set>, BIGINT seed) -> UBIGINT (MEOS uint64 set_hash_extended; seed cast to uint64)

Implementation mirrors the existing memSize accessor pattern: copy the blob into a malloc'd Set, call MEOS, free. Registered in the per-set-type loop in src/temporal/set.cpp next to memSize / numValues.

Parity file

Unwraps the set_hash skip block — 8 queries now active (4 set_hash equality / inequality round-trips on dateset and tstzset, plus 4 set_hash_extended equivalents).

Test plan

  • TZ=UTC ./build/release/test/unittest "<proj>/test/*" locally: 747 assertions pass across 13 test cases, no regressions.
  • CI validates on linux_amd64, linux_arm64, macos, wasm.

Dependencies

Branched off main (post #7 merge). Independent of #8 / #9 — no rebase or stack required.

🤖 Generated with Claude Code

Adds the two MEOS hash scalars for intset/bigintset/floatset/textset/
dateset/tstzset:
  - set_hash(<set>) -> UINTEGER (MEOS uint32 set_hash)
  - set_hash_extended(<set>, BIGINT seed) -> UBIGINT (MEOS uint64
    set_hash_extended; seed cast to uint64)

Implementation mirrors the existing memSize accessor: copy the blob
into a malloc'd Set, call MEOS, free. Registered in the per-set-type
loop in src/temporal/set.cpp next to memSize / numValues.

Activates the corresponding queries in test/sql/parity/001_set.test
(set_hash and set_hash_extended round-trips on dateset and tstzset).
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.

2 participants