Skip to content

Read the SQL aggregate a wrapper serves from its own tag - #90

Merged
estebanzimanyi merged 1 commit into
MobilityDB:masterfrom
estebanzimanyi:feat/sqlaggfn-names-the-sql-aggregate
Aug 28, 2026
Merged

Read the SQL aggregate a wrapper serves from its own tag#90
estebanzimanyi merged 1 commit into
MobilityDB:masterfrom
estebanzimanyi:feat/sqlaggfn-names-the-sql-aggregate

Conversation

@estebanzimanyi

Copy link
Copy Markdown
Member

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 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 reports Attached 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.

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.
@estebanzimanyi
estebanzimanyi merged commit acb945c into MobilityDB:master Aug 28, 2026
2 checks passed
@estebanzimanyi
estebanzimanyi deleted the feat/sqlaggfn-names-the-sql-aggregate branch August 28, 2026 09:33
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.

1 participant