-
Notifications
You must be signed in to change notification settings - Fork 1.7k
Open
Labels
enhancementNew feature or requestNew feature or requestperformanceMake DataFusion fasterMake DataFusion faster
Description
Is your feature request related to a problem or challenge? Please describe what you are trying to do.
We currently support uncorrelated scalar subqueries by translating them into a cross-join. It would likely be more efficient to execute the subquery and update the original plan with the scalar value.
We also need to do this so we can throw an error if more than 1 row is returned and there is no way to do this in the logical plan.
Describe the solution you'd like
The optimizer will need some kind of trait that execution engines (DataFusion, Ballista, Dask SQL, etc) can implement for resolving scalar values.
trait OptimizerContext {
fn supports_scalar_subquery_execution() -> bool;
fn execute_scalar_subquery(plan: &LogicalPlan) -> Result<ScalarValue>;
}Describe alternatives you've considered
Additional context
Metadata
Metadata
Assignees
Labels
enhancementNew feature or requestNew feature or requestperformanceMake DataFusion fasterMake DataFusion faster