warrenzhu25 commented on issue #7501:
URL: 
https://github.com/apache/datafusion-comet/issues/7501#issuecomment-7301932301

   take
   
   I'll split this in two:
   1. Return errors instead of panicking. `collect_list` already returns 
`OffsetOverflowError` from `concat`/`interleave`. For `collect_set` and 
`max_by`/`min_by`, decode with `convert_rows` in chunks of at most `i32::MAX` 
encoded bytes and `concat` them when the total passes that (a decoded value is 
never longer than its encoded row), so a real overflow comes back as an error 
and emits that fit today keep working. For `listagg` and the 
`approx_percentile` state, check the exact total before building the array.
   2. Then make `EmitTo::First(n)` cheap in `collect_list` and `collect_set`, 
so chunked emit (#7278) isn't quadratic.


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