Skip to content

Read every aggregate of the catalog as a static method of its values' class - #73

Merged
estebanzimanyi merged 1 commit into
MobilityDB:mainfrom
estebanzimanyi:feat/aggregate-methods
Nov 19, 2026
Merged

estebanzimanyi merged 1 commit into
MobilityDB:mainfrom
estebanzimanyi:feat/aggregate-methods

Conversation

@estebanzimanyi

Copy link
Copy Markdown
Member

The catalog's aggregates state, for each SQL aggregate, the MEOS functions of its transition and final steps. #aggregate_methods of tools/objectgen.py, built beside #method_for and calling its #map_param and #map_return, emits one static method per aggregate on the class of the value its transition takes after its state, as #aggregateMethods of MEOS.js's codegen/ObjectGenerator.ts does: the method takes the values as an array and the transition's other arguments, threads the transition over the values from a NULL state, as MEOS's C callers do, and answers the final function's result, the final function freeing the state. The method takes the name an engine holding one function per name calls the aggregate, its altSqlName or else its sqlName, in the PascalCase of every method: Raster.RasterUnion, Raster.SummaryStatsAgg and Raster.SameAlignmentAgg among the 27 emitted. An aggregate several transitions serve under one name over one class, as tMinAgg over the integer, float and text temporal values, takes no method, and GAP-LEDGER.md lists it under a kind of its own beside the two other reasons an aggregate stays out. MEOS.NET.Tests/AggregateTests.cs unions two tiles and states their statistics.

Why: the object layer projected no aggregate, so a caller threaded RasterUnionTransfn and RasterUnionFinalfn by hand, and rasterUnion and summaryStatsAgg were the two raster functions MEOS.NET lacked.

Measured: dotnet build reports 0 warnings and 0 errors, and dotnet test passes 120 of 120 with none skipped, against the libmeos of the catalog of MobilityDB master eb44541013.

… class

The catalog's aggregates state, for each SQL aggregate, the MEOS functions of its transition and final steps. #aggregate_methods of tools/objectgen.py, built beside #method_for and calling its #map_param and #map_return, emits one static method per aggregate on the class of the value its transition takes after its state, as #aggregateMethods of MEOS.js's codegen/ObjectGenerator.ts does: the method takes the values as an array and the transition's other arguments, threads the transition over the values from a NULL state, as MEOS's C callers do, and answers the final function's result, the final function freeing the state. The method takes the name an engine holding one function per name calls the aggregate, its altSqlName or else its sqlName, in the PascalCase of every method: Raster.RasterUnion, Raster.SummaryStatsAgg and Raster.SameAlignmentAgg among the 27 emitted. An aggregate several transitions serve under one name over one class, as tMinAgg over the integer, float and text temporal values, takes no method, and GAP-LEDGER.md lists it under a kind of its own beside the two other reasons an aggregate stays out. MEOS.NET.Tests/AggregateTests.cs unions two tiles and states their statistics.

Why: the object layer projected no aggregate, so a caller threaded RasterUnionTransfn and RasterUnionFinalfn by hand, and rasterUnion and summaryStatsAgg were the two raster functions MEOS.NET lacked.

Measured: dotnet build reports 0 warnings and 0 errors, and dotnet test passes 120 of 120 with none skipped, against the libmeos of the catalog of MobilityDB master eb44541013.
@estebanzimanyi
estebanzimanyi merged commit 605a652 into MobilityDB:main Nov 19, 2026
1 check passed
@estebanzimanyi
estebanzimanyi deleted the feat/aggregate-methods branch November 19, 2026 20:42
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