adriangb commented on PR #14837: URL: https://github.com/apache/datafusion/pull/14837#issuecomment-2869167967
> What if we just added a new method to the PhysicalExpr trait, like `evaluate_async()`? We could then call this from streams that might involve async work. The default implementation would delegate to `evaluate()`, but in the case of `ScalarFunctionExpr`, we could branch depending on the function type. How would that work going from sync -> async? For example: `1 = 2 OR 1 = call_llm_model_async()`. I imagine this would build something like `BinaryExpr(BinaryExpr(1, Eq, 2), Or, ScalarFunc(call_llm_model_async))`. If we call `evaluate_async` on the outer `BinaryExpr` it would call `evaluate()` by default so now you're in sync world. How do you break back into async world? Do we pass around a handle to the tokio runtime? -- 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: github-unsubscr...@datafusion.apache.org For queries about this service, please contact Infrastructure at: us...@infra.apache.org --------------------------------------------------------------------- To unsubscribe, e-mail: github-unsubscr...@datafusion.apache.org For additional commands, e-mail: github-h...@datafusion.apache.org