You are viewing a plain text version of this content. The canonical link for it is here.
Posted to github@datafusion.apache.org by "Dandandan (via GitHub)" <gi...@apache.org> on 2026/08/20 12:11:55 UTC

[I] Add projection support to `SortMergeJoinExec` [datafusion]

Dandandan opened a new issue, #24518:
URL: https://github.com/apache/datafusion/issues/24518

   ### Is your feature request related to a problem or challenge?
   
   
   `SortMergeJoinExec` emits every column of both inputs.
   We can add projection support to only produce the output columns (saving some compute / copy).
   
   ```sql
   select * from t1 right join t2 on t1.c3 = t2.c3   -- c3 needs a cast
   ```
   
   ```text
   ProjectionExec: expr=[c1@0 as c1, ..., c4@8 as c4]
     SortMergeJoinExec: join_type=Right, on=[(CAST(t1.c3 AS Decimal128(10, 2))@4, c3@2)]
   ```
   
   The cast column is only there to be joined on, and every operator above the join
   carries it until the projection removes it.
   
   
   ### Describe the solution you'd like
   
   Add projection support to `SortMergeJoinExec`
   
   ### Describe alternatives you've considered
   
   _No response_
   
   ### Additional context
   
   _No response_


-- 
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-unsubscribe@datafusion.apache.org.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: github-unsubscribe@datafusion.apache.org
For additional commands, e-mail: github-help@datafusion.apache.org


Re: [I] Add projection support to `SortMergeJoinExec` [datafusion]

Posted by "Dandandan (via GitHub)" <gi...@apache.org>.
Dandandan closed issue #24518: Add projection support to `SortMergeJoinExec`
URL: https://github.com/apache/datafusion/issues/24518


-- 
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-unsubscribe@datafusion.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: github-unsubscribe@datafusion.apache.org
For additional commands, e-mail: github-help@datafusion.apache.org