Skip to content

Commit 4504e25

Browse files
committed
feat: Expose DefaultPhysicalPlanner::create_project_physical_exec
1 parent 50e9973 commit 4504e25

File tree

1 file changed

+19
-1
lines changed

1 file changed

+19
-1
lines changed

datafusion/core/src/physical_planner.rs

Lines changed: 19 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2138,7 +2138,25 @@ impl DefaultPhysicalPlanner {
21382138
Ok(mem_exec)
21392139
}
21402140

2141-
fn create_project_physical_exec(
2141+
/// Creates a physical [`ProjectionExec`] from logical projection expressions.
2142+
///
2143+
/// This method converts logical projection expressions into physical expressions,
2144+
/// handling column name mapping between logical and physical schemas. It also
2145+
/// detects and plans asynchronous expressions (e.g., async UDFs) by wrapping them
2146+
/// in an [`AsyncFuncExec`] when needed.
2147+
///
2148+
/// # Arguments
2149+
///
2150+
/// * `session_state`: The session state for accessing configuration and resources
2151+
/// * `input_exec`: The physical execution plan providing input data
2152+
/// * `input`: The logical plan corresponding to the input execution plan
2153+
/// * `expr`: The logical projection expressions to convert
2154+
///
2155+
/// # Returns
2156+
///
2157+
/// A [`ProjectionExec`] for synchronous expressions, or a [`ProjectionExec`]
2158+
/// wrapping an [`AsyncFuncExec`] when async expressions are detected.
2159+
pub fn create_project_physical_exec(
21422160
&self,
21432161
session_state: &SessionState,
21442162
input_exec: Arc<dyn ExecutionPlan>,

0 commit comments

Comments
 (0)