feat(bindings): re-land splitNspans aliases + spans(<set_type>) constructor#44
Merged
Merged
Conversation
This was referenced Apr 27, 2026
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.
9337c20 to
0ebd33f
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.
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-handlerandfeat/splitnspans-lowercase-aliasthemselves) instead ofmain. As a result none of those changes reachedmain.This PR brings forward both commits as a single linear history on top of
main:cdea92e— splitNspans / splitEachNspans lowercase aliases (originally PR feat(bindings): splitNspans / splitEachNspans lowercase aliases #8)9337c20— spans(<set_type>) constructor — list of unit spans from a set (originally PR feat(bindings): spans(<set_type>) — list of unit spans from a set #9)Verification
splitNspans/splitEachNspans(camelCase) already on mainsplitnspans/spliteachnspans(lowercase) — confirmed missing from main, added herespans()constructor on a SET type — confirmed missing from main, added herespans()already exists on the SPANSET type independentlyReplaces