Jefffrey commented on issue #18150: URL: https://github.com/apache/datafusion/issues/18150#issuecomment-4418263231
> Would be possible to, during logical planning, move async udfs into a `LogicalPlan::Projection` below the original node, so the physical planner can only care about async udf in projections? This also would introduce the async columns (`__async_fn_0`) earlier during planning, which could fix [#18149](https://github.com/apache/datafusion/issues/18149) and the second error I faced at [#22091](https://github.com/apache/datafusion/issues/22091) > > Rewrite example from [#18149](https://github.com/apache/datafusion/issues/18149) > > ``` > Aggregate: groupBy=[[]], aggr=[[approx_distinct(custom_udf(CAST(data.x AS Int64)))]] > TableScan: data projection=[x] > ``` > > Into: > > ``` > Aggregate: groupBy=[[]], aggr=[[approx_distinct(__async_fn_0)]] > Projection: custom_udf(CAST(data.x AS Int64)) AS __async_fn_0 > TableScan: data projection=[x] > ``` Would this potentially require modifying multiple optimizer rules to ensure they don't get pushed down? -- 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]
