Register the set element operations in either operand order - #356
Merged
estebanzimanyi merged 1 commit intoAug 29, 2026
Merged
Conversation
MobilityDB declares setUnion, setMinus and setIntersection with the element on
either side, setIntersection(bigint, bigintset) beside setIntersection(bigintset,
bigint), and 162 such declarations across the three names. The generator carried
only the set-first order, so the scalar-first half reached no DuckDB row.
shape_set returns the reversed order as scset_set, the shape the bool-returning
branch above it already carries as the scset half of setsc/scset, and the
registration follows the C parameter order so the signature matches the body.
The emitted body marshals through SetToBlobN, so setMinus(3, '{3}'::intset)
answers NULL for the empty result as its set-first twin does.
Nineteen hand registrations of the same signatures, the scalar-first +, -, *
and || over a set, go with the change: the generator emits them, so the surface
they carry is unchanged while the named functions beside them are new. The
registered surface gains exactly those 19 names and loses none. setUnion of 5
and {1,3} answers {1, 3, 5}, setMinus of 5 and {1,3} answers {5},
setIntersection of 3 and {1,3} answers {3}, and setConcat of 'a' and {"b","c"}
answers {"ab", "ac"}.
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.
MobilityDB declares setUnion, setMinus and setIntersection with the element on
either side, setIntersection(bigint, bigintset) beside setIntersection(bigintset,
bigint), and 162 such declarations across the three names. The generator carried
only the set-first order, so the scalar-first half reached no DuckDB row.
shape_set returns the reversed order as scset_set, the shape the bool-returning
branch above it already carries as the scset half of setsc/scset, and the
registration follows the C parameter order so the signature matches the body.
The emitted body marshals through SetToBlobN, so setMinus(3, '{3}'::intset)
answers NULL for the empty result as its set-first twin does.
Nineteen hand registrations of the same signatures, the scalar-first +, -, *
and || over a set, go with the change: the generator emits them, so the surface
they carry is unchanged while the named functions beside them are new. The
registered surface gains exactly those 19 names and loses none. setUnion of 5
and {1,3} answers {1, 3, 5}, setMinus of 5 and {1,3} answers {5},
setIntersection of 3 and {1,3} answers {3}, and setConcat of 'a' and {"b","c"}
answers {"ab", "ac"}.