Documentation and test coverage for the size of the ARRAY_AGG() partial state - #4597
Open
robert-brunel wants to merge 1 commit into
Open
Documentation and test coverage for the size of the ARRAY_AGG() partial state#4597robert-brunel wants to merge 1 commit into
ARRAY_AGG() partial state#4597robert-brunel wants to merge 1 commit into
Conversation
…tial state `ARRAY_AGG()` has some inherent caveats around its partial state, which deserve dedicated tests and a note in the SQL Reference. The size of the state is O(N), since it holds every element collected so far, and on a mid-group stop it is serialized into the continuation that is handed to the client. Nothing in either the Record Layer or FDB limits the size. * Document the group-size caveats in the SQL Reference. * Add a block to `array-agg-tests.yamsql` that covers a fairly large group end to end, and a second one that exercises the continuation carrying the partial state. * Add a `partialAggregateArrayAggLargeGroup()` test to pin the per-element cost against a potential blowup, and to check that a group resumed from a mid-group continuation completes with every element present exactly once.
robert-brunel
force-pushed
the
apple/robert-brunel/array_agg-limit-1
branch
from
September 8, 2026 18:57
18cabca to
d2a3607
Compare
📊 Metrics Diff Analysis ReportSummary
ℹ️ About this analysisThis automated analysis compares query planner metrics between the base branch and this PR. It categorizes changes into:
The last category in particular may indicate planner regressions that should be investigated. |
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.
ARRAY_AGG()comes with inherent caveats around the size of its partial state, which deserve some dedicated tests and a note in the SQL Reference. The size of the state is O(N), since it holds every element collected so far, and on a mid-group stop it is serialized into the continuation that is handed to the client. Nothing in either the Record Layer or FDB limits the size.array-agg-tests.yamsqlthat covers a fairly large group end to end, and a second one that exercises the continuation carrying the partial state.partialAggregateArrayAggLargeGroup()test to pin the per-element cost against a potential blowup, and to check that a group resumed from a mid-group continuation completes with every element present exactly once.