Github user ioana-delaney commented on the issue: https://github.com/apache/spark/pull/15363 @wzhfy I've looked at the new CBO join reordering. The star schema detection can be used as follows: Assume a four-way join: A, B, C, D. Star schema join detection is called before CBO. It returns **{A, B, D}** as a star join. This info can be used by the the dynamic programming as follows: * level 0: p({A}), p({B}), p({C}), p({D}) * level 1: p({A, B}), ~~p({A, C})~~, p({A, D}), ~~p({B, C})~~, p({B, D}), ~~p({C, D})~~ * level 2: ~~p({A, B, C})~~, p({A, B, D}), ~~p({A, C, D})~~, ~~p({B, C, D})~~ * level 3: {{A, B, D}, C} At level 2 we only generate a plan for {A, B, D}. The winner plan should be **{{A, B, D}, C}**
--- If your project is set up for it, you can reply to this email and have your reply appear on GitHub as well. If your project does not have this feature enabled and wishes so, or if the feature is enabled but not working, please contact infrastructure at infrastruct...@apache.org or file a JIRA ticket with INFRA. --- --------------------------------------------------------------------- To unsubscribe, e-mail: reviews-unsubscr...@spark.apache.org For additional commands, e-mail: reviews-h...@spark.apache.org