feat(bindings): spans(<set_type>) — list of unit spans from a set#9
Merged
nhungoc1508 merged 1 commit intoApr 27, 2026
Merged
Conversation
This was referenced Apr 25, 2026
Adds the set-level spans scalar for all five set types (intset/bigintset/floatset/dateset/tstzset), reading a Set and calling MEOS set_spans(s) + set_num_values(s) to build a LIST(<span_type>) result. SpanFunctions::Set_spans existed as a stub but was never registered and had wrong semantics (BinaryExecutor calling set_to_span returning a single Span, not a list). Replaces the body with a proper list-building implementation and registers spans(<set_type>) for each of the five set types. Activates the spans(intset ...) query in test/sql/parity/001_set.test.
eb736ab to
918ce88
Compare
52feed7 to
cdea92e
Compare
9337c20
into
feat/splitnspans-lowercase-alias
17 checks passed
This was referenced Apr 27, 2026
Member
Author
|
@nhungoc1508 — flagging a merge-target issue. This PR is marked MERGED, but the merge commit went into the stack-base branch, not
Net effect: this PR's contents never reached Re-landed in #44, which brings both commits forward as a clean linear history on top of For future stacked PRs: when a base PR (e.g. #7) is merged into main, the dependent PRs (#8, #9) should have their base updated to |
estebanzimanyi
added a commit
that referenced
this pull request
May 10, 2026
Bumps `vcpkg_ports/meos/portfile.cmake` REF from current master to the `th3index` branch tip (`87a89db2f`). Adds `-DH3=ON` to the MEOS CMake configure and `h3` as a vcpkg dependency so libmeos.a exports the 66-symbol `meos_h3.h` API surface (`h3index_in`, `th3index_*`, `tgeompoint_to_th3index`, etc.). Prerequisite for the MobilityDuck H3INDEX / TH3INDEX type registrations and the cross-platform BerlinMOD benchmark prefilter (MobilitySpark PR #9 ports the same surface to Spark; this lands the matching layer on the DuckDB binding so all three platforms can run the same H3-prefiltered queries).
estebanzimanyi
added a commit
that referenced
this pull request
May 10, 2026
Lands the MobilityDuck binding for the temporal H3 index types, in lock-step with MobilitySpark's th3index port (PR #9 over there) so all three platforms run the same H3-prefiltered BerlinMOD queries. Surface: H3INDEX → BIGINT alias (64-bit cell id; signed reinterp is safe — comparison cares only about bit pattern). TH3INDEX → BLOB alias (Temporal* blob). Functions registered (mapped from `meos_h3.h`): I/O h3IndexFromText / h3IndexAsText / VARCHAR↔H3INDEX casts VARCHAR↔TH3INDEX casts Constructor th3index(H3INDEX, TIMESTAMPTZ) Accessors startValue / endValue / valueN / values / valueAtTimestamp Type casts th3index(tbigint), tbigint(th3index) th3index(tgeompoint, INT), th3index(tgeogpoint, INT) tgeompoint(th3index), tgeogpoint(th3index) Ever/always predicates (12 overloads) everEq / everNe / alwaysEq / alwaysNe across H3INDEX×TH3INDEX, TH3INDEX×H3INDEX, TH3INDEX×TH3INDEX Temporal eq/ne (6 overloads) tEq / tNe across the same 3 shapes H3 cell properties th3indexGetResolution / th3indexGetBaseCellNumber / th3indexIsValidCell / th3indexIsResClassIII / th3indexIsPentagon Hierarchy th3indexCellToParent[+Next] / th3indexCellToCenterChild[+Next] th3indexCellToChildPos / th3indexChildPosToCell Geometry / boundary th3indexCellToBoundary Directed edges th3indexAreNeighborCells / th3indexCellsToDirectedEdge th3indexIsValidDirectedEdge / th3indexGetDirectedEdge[Origin|Destination] th3indexDirectedEdgeToBoundary Vertices th3indexCellToVertex / th3indexVertexToLatlng / th3indexIsValidVertex Grid traversal th3indexGridDistance / th3indexCellToLocalIj / th3indexLocalIjToCell Cell area / edge length / great-circle distance th3indexCellArea / th3indexEdgeLength / tgeogpointGreatCircleDistance Template-macro `TH3_UNARY_TEMP`, `TH3_TEMP_INT32_TEMP`, `TH3_TEMP_TEMP_TEMP`, `TH3_TEMP_TEXT_TEMP`, `TH3_EA_H3_T`, `TH3_EA_T_H3`, `TH3_EA_T_T`, `TH3_T_H3_T_TEMP`, `TH3_T_T_H3_TEMP`, `TH3_T_T_T_TEMP` shrink the boilerplate.
3 tasks
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.
Summary
Adds the set-level
spansscalar for all five set types (intset/bigintset/floatset/dateset/tstzset), mirroringSpansetFunctions::Spanset_spansbut reading aSetand calling the MEOS-sideset_spans(s)+set_num_values(s)pair.SpanFunctions::Set_spansalready existed as a stub insrc/temporal/span_functions.cppbut was never registered and had the wrong semantics — it was aBinaryExecutorcallingset_to_spanthat returned a singleSpan, not a list. Replaced with a proper list-building implementation and registeredspans(<set_type>)as aLIST(<span_type>)returner for each of the five set types.Parity file
Unwraps the
spans(intset ...)skip block — 1 query now active.Test plan
TZ=UTC ./build/release/test/unittest "<proj>/test/*"locally: 747 assertions pass across 13 test cases, no regressions.Dependencies
Stacked on top of the MEOS error handler / lowercase aliases chain. Merge order: #7 → #8 → this.
🤖 Generated with Claude Code