yujun777 opened a new pull request, #67534:
URL: https://github.com/apache/doris/pull/67534

   Support conditional array aggregation: rows whose condition is false or NULL 
are skipped entirely; remaining rows are collected with `array_agg` semantics, 
so NULL elements are kept. Returns an empty array when no row matches.
   
   Docs: https://github.com/apache/doris-website/pull/4117
   
   Key changes:
   - BE: implement `array_agg_if(cond, elem)` reusing the `array_agg` state 
template, parameterized by element argument index and input nullability, so the 
per-row `add()` path keeps zero-cost asserts
   - BE: handle raw (non-nullable) complex element types in the native serde 
state output/deserialize paths
   - FE: add `ArrayAggIf` aggregate expression class with cond-first signature 
and register it in the builtin aggregate catalog
   - regression: add three `array_agg_if` queries to the agg suite with 
generated expected output
   
   Unit Test:
   - `agg_array_agg_if_test`: 9 cases covering cond filtering, NULL element 
retention, NULL cond, and string/complex (nullable and NOT NULL) element types, 
each exercised through single-add, merge and serialize/deserialize paths
   - `agg_array_agg_test` regression: 9 existing array_agg cases
   - end-to-end: `array_agg_if` queries verified against the generated 
`agg.out` on a local cluster
   


-- 
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