xiangfu0 opened a new pull request, #19988:
URL: https://github.com/apache/pinot/pull/19988

   ## Summary
   Supports `ARRAY_AGG(expr)` and `ARRAY_AGG(expr, isDistinct)` without the 
explicit data type argument.
   
   Stacked on #19986; will be retargeted to `master` once it merges.
   
   ## How
   Both engines rewrite the call to the existing explicit form `ARRAY_AGG(expr, 
'dataType'[, isDistinct])`, using the type of `expr`, or its element type for a 
multi-value input. A JSON column maps to `STRING` in both engines.
   - Single-stage: `AggregateFunctionRewriteOptimizer`, for column operands.
   - Multi-stage: `PinotAggregateTypeArgumentRewriteRule`, for any expression. 
Validation rejects types that the explicit form does not support.
   
   The explicit form is unchanged: a string second argument is the data type. 
Distinct `ARRAY_AGG` is still served from the star-tree.
   
   ## Tests
   - `AggregateFunctionRewriteOptimizerTest`
   - `ArrayAggQueriesTest`, `ArrayAggMvQueriesTest`, 
`ArrayAggStarTreeQueriesTest`
   - Multi-stage plans in `AggregatePlans.json`, runtime queries in 
`UDFAggregates.json`
   


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