feat(bindings): extend extent() aggregate across all fixed-state inputs#86
Closed
estebanzimanyi wants to merge 1 commit intomainfrom
Closed
feat(bindings): extend extent() aggregate across all fixed-state inputs#86estebanzimanyi wants to merge 1 commit intomainfrom
estebanzimanyi wants to merge 1 commit intomainfrom
Conversation
Previous PR landed extent() for the 5 span types only. This expands
the same aggregate to cover the full MobilityDB SQL surface for fixed-
size-state extent variants (still avoiding the SkipList-state aggregates
like tcount / tmin / tcentroid / merge / appendInstant — those need a
larger lift).
Added (15 new overloads on the same `extent` aggregate set):
- extent(integer | bigint | double | date | timestamptz) -> typed span
- extent(intset | bigintset | floatset | dateset | tstzset) -> typed span
- extent(intspanset | bigintspanset | floatspanset
| datespanset | tstzspanset) -> typed span
- extent(tbox) -> tbox
- extent(stbox) -> stbox
- extent(tint | tfloat) -> tbox
- extent(tbool | ttext) -> tstzspan
- extent(tgeompoint) -> stbox
All variants share a small set of templated state types — Span, TBox,
STBox — and dispatch on the appropriate MEOS *_extent_transfn for the
input. Combine functions use span_extent_transfn / tbox_expand /
stbox_expand so parallel-agg merge works.
Tests in 030_aggregates_extent.test cover one assertion per category
plus NULL handling.
Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
This was referenced May 1, 2026
Member
Author
|
Superseded by the consolidated PR branch |
3 tasks
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.
Summary
Builds on PR #b8efad4 (extent for the 5 span types) and adds 15 more overloads to the same `extent` aggregate set, covering everything in the MobilityDB `extent(...)` family that has fixed-size aggregate state.
All variants share three small templated state types (`Span`, `TBox`, `STBox`) and dispatch on the appropriate MEOS `*_extent_transfn` for each input shape. Combine functions use `span_extent_transfn` / `tbox_expand` / `stbox_expand` so parallel-aggregate merge is correct.
Out of scope (next aggregate PRs)
The remaining MobilityDB aggregates need a SkipList-based variable-size state (currently outside MobilityDuck's aggregate-state machinery): `merge`, `appendInstant`, `appendSequence`, `tcount`, `tmin`, `tmax`, `tsum`, `tavg`, `tand`, `tor`, `tcentroid`, `spanUnion`, `setUnion`, and the window aggregates `wmin` / `wmax` / `wsum` / `wcount` / `wavg`. They will get their own PR(s) once the SkipList serializer is in place.
Test plan
🤖 Generated with Claude Code