test(sql): pin array_agg's rejection as a decision, not a gap (#111) - #122
Merged
Merged
Conversation
`array_agg` has no test, so "deliberately rejected" and "not implemented yet" look identical in the code. Assert the rejection, with the reasoning inline. AggIntent is the vocabulary the planner binds sketches and mergeable accumulators to. array_agg pre-aggregates nothing (output is O(input rows)), has no bounded-memory approximate form, and its partial state is the data itself. Since plan::boundary::realize is an exhaustive match, an AggIntent::ArrayAgg would force boundary, bind and schema derivation to each handle a variant whose every answer is PassThrough. Contrast median (#117), from the same bucket in #111: it *is* Quantile{q:0.5} and feeds the sketch path, so it was implemented rather than rejected. Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
This was referenced Jul 10, 2026
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.
Follow-up to the
array_aggWONTFIX decision on #111.Why
array_agghad no test anywhere in the repo. That means "we decided not to support this" and "nobody has gotten to it yet" are indistinguishable from the code — the next person to readunsupported aggregate: array_agghas no way to tell which it is.This adds the assertion, with the reasoning inline:
AggIntentis the vocabularyplan::bind/plan::boundarybind sketches and mergeable accumulators to.array_aggpre-aggregates nothing (output isO(input rows)), has no bounded-memory approximate form, and its partial state is the data — so "mergeable" carries no information.plan::boundary::realizeis deliberately an exhaustive match ("adding a variant without an explicit realization is a compile error"). AnAggIntent::ArrayAggwould forceboundary,bindand schema derivation to each handle a variant whose every answer isPassThrough.lower_sql, not because a workload asked for it.Contrast
medianfrom the same bucket in #111: it isQuantile { q: 0.5 }and feeds the sketch path directly, so it was implemented (#117) rather than rejected.Scope
Test only — no source change. Reopen the decision if a real workload needs
array_aggat L3; the argument is cost/benefit, not impossibility.Verification
🤖 Generated with Claude Code