Skip to content

feat(bindings): re-land splitNspans aliases + spans(<set_type>) constructor#44

Merged
nhungoc1508 merged 2 commits into
mainfrom
feat/splitnspans-lowercase-alias
Apr 28, 2026
Merged

feat(bindings): re-land splitNspans aliases + spans(<set_type>) constructor#44
nhungoc1508 merged 2 commits into
mainfrom
feat/splitnspans-lowercase-alias

Conversation

@estebanzimanyi

Copy link
Copy Markdown
Member

Summary

Re-lands the contents of PRs #8 and #9, which were both in MERGED state but the merge commits went into intermediate stack-base branches (fix/meos-error-handler and feat/splitnspans-lowercase-alias themselves) instead of main. As a result none of those changes reached main.

This PR brings forward both commits as a single linear history on top of main:

Verification

  • splitNspans / splitEachNspans (camelCase) already on main
  • splitnspans / spliteachnspans (lowercase) — confirmed missing from main, added here
  • spans() constructor on a SET type — confirmed missing from main, added here
  • spans() already exists on the SPANSET type independently

Replaces

MobilityDB's SQL surface exposes splitNspans and splitEachNspans
(lowercase "spans"). MobilityDuck registered only the camelCase
forms splitNSpans / splitEachNSpans in src/temporal/span.cpp, so
queries using the MobilityDB-native name errored with "function
not found". Adds the lowercase aliases for all five set types
(intset/bigintset/floatset/dateset/tstzset), pointing at the same
SpanFunctions::Set_split_n_spans /
SpanFunctions::Set_split_each_n_spans dispatchers. The camelCase
forms stay registered for back-compat.

Activates the splitNspans / splitEachNspans queries in
test/sql/parity/001_set.test.
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 9337c20 to 0ebd33f Compare April 27, 2026 12:37
@nhungoc1508 nhungoc1508 merged commit 356a7b1 into main Apr 28, 2026
17 checks passed
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