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: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]


---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to