Lordworms commented on issue #14958:
URL: https://github.com/apache/datafusion/issues/14958#issuecomment-2777223899

   Like what duckdb did
   ## 1. Detect Correlated Columns
   - Walk subquery expressions and collect all outer (correlated) column 
references.
   - Represent them as `Expr::OuterReference(Column)` to preserve through 
planning.
   
   ## 2. Implement LogicalPlan for Delim Join
   - Add a new `LogicalPlan::DelimJoin` node (or extend `Join`) with:
     - `left`, `right`, `correlated_columns`, `join_type`
   - This plan node records the correlation without rewriting or flattening the 
subquery.
   - Acts as a placeholder that defers correlation handling to execution.
   
   ## 3. Implement PhysicalPlan for Delim Join
   - Add `DelimJoinExec`, a new `ExecutionPlan` that:
     - For each row in `left`, extracts correlated column values
     - Binds them as parameters and executes `right` subplan with substituted 
values
     - Joins results per the requested join type (e.g., INNER, LEFT)


-- 
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

Reply via email to