boluor opened a new pull request, #3729:
URL: https://github.com/apache/doris-website/pull/3729

   ## Summary
   
   The FOREACH combinator page (`sql-manual/sql-functions/combinators/foreach`) 
only had a description and examples. It didn't document the accepted input 
types or the behavior when array arguments have different lengths. Added a 
**Notes** section covering three points, verified against the engine source:
   
   - **Input/return types** — each argument must be an `ARRAY` whose element 
type matches the corresponding argument of the nested aggregate function; the 
result is an `ARRAY` of the nested function's return type, computed position by 
position.
   - **Unequal-length arrays** — when a single call passes multiple array 
arguments, all arrays in the **same row** must have the same length, otherwise 
the query fails with `Arrays passed to <function> aggregate function have 
different sizes` (see `be/src/exprs/aggregate/aggregate_function_foreach.h`). 
Array lengths may differ **across rows** (the existing example already 
demonstrates per-position aggregation across rows).
   - **Unsupported functions** — `percentile`, `percentile_array`, 
`percentile_approx`, and `percentile_approx_weighted` are not supported with 
the `foreach` combinator.
   
   Applied to `docs/`, `versioned_docs/version-{2.1,3.x,4.x}/`, and the 
matching `i18n/zh-CN/` pages.
   
   Closes #2944
   
   ## Test plan
   
   - [x] Behavior confirmed against the BE source 
(`aggregate_function_foreach.h` size-mismatch check; FE `ForEachCombinator` 
unsupported-function list).
   - [x] Dead-link check passes on the changed files.
   - [ ] CI build.


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]


---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to