Name the aggregate field the way the SQL surface names an aggregate - #91
Merged
estebanzimanyi merged 1 commit intoAug 28, 2026
Conversation
`Agg` is how MobilityDB's own SQL distinguishes an aggregate from a scalar that shares its spelling — merge and mergeAgg, tMin and tMinAgg, the rule doc/temporal_types_aggregation.xml states — so `sqlAgg` is the field that holds an aggregate name, and it holds the one a binding registers: tCount, setUnion. The field @csqlaggfn fills states a ROLE rather than an aggregate: setUnionTransition is the transition member OF setUnion. It is `sqlAggRole`, which says what it holds and leaves `sqlAgg` to the aggregate. Twelve functions carry the role; a wrapper stating no @sqlaggfn carries no aggregate.
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.
Aggis how MobilityDB's own SQL distinguishes an aggregate from a scalar that shares its spelling — merge and mergeAgg, tMin and tMinAgg, the rule doc/temporal_types_aggregation.xml states — sosqlAggis the field that holds an aggregate name, and it holds the one a binding registers: tCount, setUnion. The field @csqlaggfn fills states a ROLE rather than an aggregate: setUnionTransition is the transition member OF setUnion. It issqlAggRole, which says what it holds and leavessqlAggto the aggregate. Generating from MobilityDB 6c107772f6 puts the role on the same twelve functions it names today and leavessqlAggempty until a wrapper states @sqlaggfn. tests/test_sqlaggfn.py reads the aggregate under its field name.