datafusion icon indicating copy to clipboard operation
datafusion copied to clipboard

Resolve empty relation opt for the remaining join types

Open LorrensP-2158466 opened this issue 1 year ago • 0 comments

Which issue does this PR close?

If successful, Closes #10967

Rationale for this change

Currently the PropagateEmptyRelation relation doesn't optimize all join types This draft proposes to resolve following remaining cases:

  • For LeftOut/Full Join, if the right side is empty, the Join can be eliminated with a Projection with left side columns + right side columns replaced with null values.
  • For LeftOut/Full Join, if the right side is empty, the Join can be eliminated with a Projection with left side columns + right side columns replaced with null values.

Currently we don't know exactly if these solutions work.

What changes are included in this PR?

  • Add match statements for those cases
  • SLT & unit Tests
  • some final reworks

Are these changes tested?

Yes

Are there any user-facing changes?

No

LorrensP-2158466 avatar Jun 22 '24 13:06 LorrensP-2158466