lgbo-ustc opened a new issue, #12172:
URL: https://github.com/apache/gluten/issues/12172

   ### Backend
   
   CH (ClickHouse)
   
   ### Bug description
   
   `cpp-ch/local-engine/AggregateFunctions/GroupLimitFunctions.cpp:138-145` 
reads `ColumnArray` offsets from an empty result column.
   
   `insertResultInto` calls `result_array_offsets.back()` before pushing the 
first offset. A newly created aggregate result column has no offsets yet, so 
the first output row can access an empty container. The previous offset should 
be treated as `0` when `result_array_offsets.empty()`.
   
   
   
   ### Gluten version
   
   _No response_
   
   ### Spark version
   
   None
   
   ### Spark configurations
   
   _No response_
   
   ### System information
   
   _No response_
   
   ### Relevant logs
   
   ```bash
   
   ```


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