Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Implement independent right outer join #7599

Closed
xudong963 opened this issue Sep 14, 2022 · 1 comment · Fixed by #7634
Closed

Implement independent right outer join #7599

xudong963 opened this issue Sep 14, 2022 · 1 comment · Fixed by #7634
Assignees
Labels
A-executor Area: processor and shuffle C-feature Category: feature

Comments

@xudong963
Copy link
Member

Summary
Right outer join will be transferred to left outer join in the binder phase.

So there is only left outer join in the executor phase.

For some cases, we need to change left outer join to right outer join, then make the smaller table as the build side.

Such as tpch q13.

select
    c_count,
    count(*) as custdist
from
    (
        select
            c_custkey,
            count(o_orderkey) as c_count
        from
            customer
                left outer join
            orders
            on c_custkey = o_custkey
                and o_comment not like '%pending%deposits%'
        group by
            c_custkey
    )
        c_orders
group by
    c_count
order by
    custdist desc,
    c_count desc;
@xudong963
Copy link
Member Author

After supporting right outer join, we'll naturally support right single join.

@leiysky leiysky added A-executor Area: processor and shuffle C-feature Category: feature labels Sep 16, 2022
@leiysky leiysky moved this from 📒Backlog to 📖In Progress in Databend Query Planner Sep 16, 2022
@leiysky leiysky moved this to 📒Backlog in Databend Query Planner Sep 16, 2022
Repository owner moved this from 📖In Progress to 📕Done in Databend Query Planner Sep 19, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
A-executor Area: processor and shuffle C-feature Category: feature
Projects
Status: 📕Done
Development

Successfully merging a pull request may close this issue.

2 participants