Skip to content

Name the aggregate field the way the SQL surface names an aggregate - #91

Merged
estebanzimanyi merged 1 commit into
MobilityDB:masterfrom
estebanzimanyi:fix/sqlagg-names-the-aggregate
Aug 28, 2026
Merged

Name the aggregate field the way the SQL surface names an aggregate#91
estebanzimanyi merged 1 commit into
MobilityDB:masterfrom
estebanzimanyi:fix/sqlagg-names-the-aggregate

Conversation

@estebanzimanyi

Copy link
Copy Markdown
Member

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. Generating from MobilityDB 6c107772f6 puts the role on the same twelve functions it names today and leaves sqlAgg empty until a wrapper states @sqlaggfn. tests/test_sqlaggfn.py reads the aggregate under its field name.

`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.
@estebanzimanyi
estebanzimanyi merged commit 070a169 into MobilityDB:master Aug 28, 2026
2 checks passed
@estebanzimanyi
estebanzimanyi deleted the fix/sqlagg-names-the-aggregate branch August 28, 2026 09:43
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