alamb opened a new pull request, #13910:
URL: https://github.com/apache/datafusion/pull/13910

   ## Which issue does this PR close?
   
   <!--
   We generally require a GitHub issue to be filed for all bug fixes and 
enhancements and this helps us generate change logs for our releases. You can 
link an issue to this PR using the GitHub syntax. For example `Closes #123` 
indicates that this PR will close issue #123.
   -->
   
   Closes #.
   
   ## Rationale for this change
   
   I want to make it as easy as possible for people to implement (join order) 
optimizers on top of DataFusion (for example, https://github.com/cmu-db/optd, 
though I fully admit I have failed so far to get them to engage with us)
   
   However, some of the key building blocks of such optimizations like swapping 
join inputs, are crate internal APIs of the very basic join ordering optimizer 
included with DataFusion. Thus it will be hard for others to find and use this 
cdoe
   
   Some additional evidence there is demand for these functions is 
   - this PR (that makes them more visible for use in forks) 
https://github.com/apache/datafusion/pull/13893 from @berkaysynnada 
   - `swap_hash_join` is used in comet: 
https://github.com/apache/datafusion/pull/13899
   
   Making the functions public and on the `Exec`s they are used for will make 
it even easier to find and use
   
   This also makes the datafusion core crate a tiny bit smaller which should 
help compile times
   
   
   
   ## What changes are included in this PR?
   
   There are no functional changes, this PR just moves code around
   
   1. Create HashJoinExec::swap_inputs, `NestedLoopsJoinExec::swap_inputs`, and 
`CrossJoinExec::swap_inputs`
   2. Refactor JoinSelection to use those functions
   2. Extract JoinFilter into its own module, and move `swap` and `can_swap` 
there
   4. Deprecate existing functions 
   
   ## Are these changes tested?
   
   <!--
   We typically require tests for all PRs in order to:
   1. Prevent the code from being accidentally broken by subsequent changes
   2. Serve as another way to document the expected behavior of the code
   
   If tests are not included in your PR, please explain why (for example, are 
they covered by existing tests)?
   -->
   
   ## Are there any user-facing changes?
   
   <!--
   If there are user-facing changes then we may require documentation to be 
updated before approving the PR.
   -->
   
   <!--
   If there are any breaking changes to public APIs, please add the `api 
change` label.
   -->
   


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

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


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

Reply via email to