You are viewing a plain text version of this content. The canonical link for it is here.
Posted to github@datafusion.apache.org by "tshauck (via GitHub)" <gi...@apache.org> on 2024/06/17 20:39:35 UTC

[I] Complete Possible Join Type Handling for EmptyRelation Propagation Rule [datafusion]

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

   ### Is your feature request related to a problem or challenge?
   
   Currently on `main` only the `Inner` join type is considered when doing EmptyRelation propagation, but it's possible to infer if an EmptyRelation is propagatable for some other join types for some other empty conditions.
   
   ### Describe the solution you'd like
   
   Fill out the join types per the TODO here, add or remove any that do or do not make sense: https://github.com/apache/datafusion/blob/a8847e1a825f8e588362430d99363672d8c3e7db/datafusion/optimizer/src/propagate_empty_relation.rs#L98-L109
   
   - [ ] For LeftOuter/LeftSemi/LeftAnti Join, only the left side is empty, the Join result is empty.
   - [ ] For LeftSemi Join, if the right side is empty, the Join result is empty.
   - [ ] For LeftAnti Join, if the right side is empty, the Join result is left side(should exclude null ??).
   - [ ] For RightOuter/RightSemi/RightAnti Join, only the right side is empty, the Join result is empty.
   - [ ] For RightSemi Join, if the left side is empty, the Join result is empty.
   - [ ] For RightAnti Join, if the left side is empty, the Join result is right side(should exclude null ??).
   - [ ] For Full Join, only both sides are empty, the Join result is empty.
   - [ ] 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 RightOut/Full Join, if the left side is empty, the Join can be eliminated with a Projection with right side columns + left side columns replaced with null values.
   
   ### 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] Complete Possible Join Type Handling for EmptyRelation Propagation Rule [datafusion]

Posted by "LorrensP-2158466 (via GitHub)" <gi...@apache.org>.
LorrensP-2158466 commented on issue #10967:
URL: https://github.com/apache/datafusion/issues/10967#issuecomment-2176050885

   Can i help with this one?


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


Re: [I] Complete Possible Join Type Handling for EmptyRelation Propagation Rule [datafusion]

Posted by "tshauck (via GitHub)" <gi...@apache.org>.
tshauck commented on issue #10967:
URL: https://github.com/apache/datafusion/issues/10967#issuecomment-2176953308

   Sounds good to me -- once https://github.com/apache/datafusion/pull/10963 is merged, I'll mark off the ones it updates, then you can take the rest? I took the easy ones on the first go 😅


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


Re: [I] Complete Possible Join Type Handling for EmptyRelation Propagation Rule [datafusion]

Posted by "LorrensP-2158466 (via GitHub)" <gi...@apache.org>.
LorrensP-2158466 commented on issue #10967:
URL: https://github.com/apache/datafusion/issues/10967#issuecomment-2183468763

   Alright, I've never done the rebase thing, it does sound nicer than 2 separate branches, I guess I can try it out now. You'll see the PR for cases 1, 2 and 3 tomorrow. 


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