Skip to content

Add projection support to SortMergeJoinExec #24518

Description

@Dandandan

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

select * from t1 right join t2 on t1.c3 = t2.c3   -- c3 needs a cast
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

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    enhancementNew feature or request

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions