Skip to content

feat(bindings): spans(<set_type>) — list of unit spans from a set#9

Merged
nhungoc1508 merged 1 commit intofeat/splitnspans-lowercase-aliasfrom
feat/spans-set-type
Apr 27, 2026
Merged

feat(bindings): spans(<set_type>) — list of unit spans from a set#9
nhungoc1508 merged 1 commit intofeat/splitnspans-lowercase-aliasfrom
feat/spans-set-type

Conversation

@estebanzimanyi
Copy link
Copy Markdown
Member

Summary

Adds the set-level spans scalar for all five set types (intset/bigintset/floatset/dateset/tstzset), mirroring SpansetFunctions::Spanset_spans but reading a Set and calling the MEOS-side set_spans(s) + set_num_values(s) pair.

SpanFunctions::Set_spans already existed as a stub in src/temporal/span_functions.cpp but was never registered and had the wrong semantics — it was a BinaryExecutor calling set_to_span that returned a single Span, not a list. Replaced with a proper list-building implementation and registered spans(<set_type>) as a LIST(<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.
  • CI validates on linux_amd64, linux_arm64, macos, wasm.

Dependencies

Stacked on top of the MEOS error handler / lowercase aliases chain. Merge order: #7#8 → this.

🤖 Generated with Claude Code

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.
@estebanzimanyi estebanzimanyi force-pushed the feat/splitnspans-lowercase-alias branch from 52feed7 to cdea92e Compare April 25, 2026 08:43
@nhungoc1508 nhungoc1508 merged commit 9337c20 into feat/splitnspans-lowercase-alias Apr 27, 2026
17 checks passed
@estebanzimanyi
Copy link
Copy Markdown
Member Author

@nhungoc1508 — flagging a merge-target issue. This PR is marked MERGED, but the merge commit went into the stack-base branch, not main:

Net effect: this PR's contents never reached main. Verified by greping src/ on origin/mainsplitnspans (lowercase) and spans(<set_type>) constructor are absent.

Re-landed in #44, which brings both commits forward as a clean linear history on top of main using the existing branch.

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 main (gh pr edit <N> --base main) before merging — otherwise the merge target stays the now-deleted/abandoned base branch and the work doesn't propagate.

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