Add array_agg() aggregate function documentation#376
Open
javier wants to merge 10 commits into
Open
Conversation
Ref: questdb/questdb#6812 - Add explicit syntax signatures for both scalar and array forms - Fix return value semantics: scalar form always produces an array when rows exist, array form returns NULL when all inputs are NULL/empty - Rename "Return type" to "Return value" to match page conventions - Split NULL handling into its own section with per-form behavior - Add result table with real output to first example - Remove internal NaN implementation details from user-facing docs - Add backticks to SAMPLE BY references
|
🚀 Build success! Latest successful preview: https://preview-376--questdb-documentation.netlify.app/docs/ Commit SHA: 225ccc3
|
jovfer
added a commit
to questdb/questdb
that referenced
this pull request
May 12, 2026
Adds class-level javadoc and a single-line WHY comment so the deliberate NULL handling difference between array_agg(D) and array_agg(D[]) is visible at the source: - array_agg(D) preserves NULL inputs as null elements - array_agg(D[]) skips NULL and empty input arrays (concat identity), but preserves null elements inside a non-null input array The asymmetry is intentional and already covered in the public-contract PR questdb/documentation#376; this commit mirrors that contract in the in-source javadoc so future reviewers find the rationale next to the code without needing out-of-band context. Also marks testCrossColumnPrevToAggregateSymbol as @ignore with a Pre #6812 rationale: the fill-list propagation in SqlOptimiser.rewriteSelectClause0 (introduced alongside array_agg's FILL(VALUE) rejection) disables duplicate-aggregate dedup on the calendar-align FILL path, exposing the SYMBOL guard in SqlCodeGenerator.generateFill. Restore once dedup is reactivated for FILL or once cross-column PREV is supported on SYMBOL columns. Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
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
array_agg()documentation to the aggregation functions reference page, covering both scalar and array input formsSAMPLE BYsupport with FILL options, and NULL handlingarray_agg()Ref: questdb/questdb#6812