Read the SQL aggregate a wrapper serves from its own tag - #90
Merged
estebanzimanyi merged 1 commit intoAug 28, 2026
Merged
Conversation
An aggregate's transition, combine and final wrappers each back a CREATE FUNCTION nobody calls and implement a CREATE AGGREGATE everybody does, and @sqlfn holds one name. Where the aggregate name takes that slot the catalog states a name no CREATE FUNCTION carries, and a consumer separates an aggregate from a function by the C symbol's suffix rather than by what the source says. @sqlaggfn names the aggregate on the wrapper that serves it, beside the @sqlfn naming the function the wrapper backs. It rides the same @csqlfn chain as sqlfn and lands as `sqlAggregate`, a third fact distinct from both neighbours: `sqlfn` is the CREATE FUNCTION (tcount_transfn), `sqlAgg` the aggregate-role name MEOS states in @csqlaggfn (setUnionTransition), and `sqlAggregate` the CREATE AGGREGATE a binding registers (tCount). The reader is faithful — verbatim, no derivation — and absent for a wrapper carrying no tag, so a catalog derived from sources that state no @sqlaggfn is byte-identical to one derived without it.
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.
An aggregate's transition, combine and final wrappers each back a CREATE FUNCTION nobody calls and implement a CREATE AGGREGATE everybody does, and @sqlfn holds one name. Where the aggregate name takes that slot the catalog states a name no CREATE FUNCTION carries, and a consumer separates an aggregate from a function by the C symbol's suffix rather than by what the source says. @sqlaggfn names the aggregate on the wrapper that serves it, beside the @sqlfn naming the function the wrapper backs. It rides the same @csqlfn chain as sqlfn and lands as
sqlAggregate, a third fact distinct from both neighbours:sqlfnis the CREATE FUNCTION (tcount_transfn),sqlAggthe aggregate-role name MEOS states in @csqlaggfn (setUnionTransition), andsqlAggregatethe CREATE AGGREGATE a binding registers (tCount). The reader is faithful — verbatim, no derivation — and is absent for a wrapper carrying no tag, so sources that state no @sqlaggfn yield the same catalog they yield today: generating from MobilityDB 6c107772f6 with and against master gives one sha256, and the run reportsAttached 0 @sqlaggfn SQL aggregate names. tests/test_sqlaggfn.py covers the wrapper map, the chain, and the two tags coexisting on one block. The MobilityDB change that states the tag follows this one.