viirya opened a new issue, #511: URL: https://github.com/apache/datafusion-comet/issues/511
### Describe the bug While working on https://github.com/apache/datafusion-comet/pull/403, one new test error happens: ``` - first/last *** FAILED *** (291 milliseconds) org.apache.spark.SparkException: Job aborted due to stage failure: Task 0 in stage 17002.0 failed 1 times, most recent failure: Lost task 0.0 in stage 17002.0 (TID 49989) (1d885a59c17c executor driver): org.apache.comet.CometNativeException: Arrow error: Invalid argument error: column types must match schema types, expected Null but found Int32 at column index 0 ``` The root cause of it is new design of aggregate expressions in DataFusion. Some aggregate expressions are now implemented using `AggregateUDF`. To create the physical aggregate expression (i.e., `AggregateFunctionExpr `) for them, we need to call `create_aggregate_expr` API. But there is a circular relationship on the required arguments: https://github.com/apache/datafusion/issues/10785. It makes Comet cannot determine correct `input_phy_exprs` so an incorrect return type is determined during the call to `create_aggregate_expr`. To fix it, we may need to revamp the design in DataFusion. ### Steps to reproduce _No response_ ### Expected behavior _No response_ ### Additional context _No response_ -- 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]
