Skip to content

[DISCUSSION] JOIN "task force" / project team #15885

New issue

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

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

Already on GitHub? # to your account

Open
1 of 22 tasks
alamb opened this issue Apr 28, 2025 · 5 comments
Open
1 of 22 tasks

[DISCUSSION] JOIN "task force" / project team #15885

alamb opened this issue Apr 28, 2025 · 5 comments

Comments

@alamb
Copy link
Contributor

alamb commented Apr 28, 2025

What I see (what problem we are trying to solve)

DataFusion's current join implementations are fairly basic. They are functional enough to run TPCH and TPC-DS, but lack other features such as larger-than-memory processing, ASOF joins, complete subquery support and more.

There seems to be a non trivial desire in the community to improve this.

Some examples of issues / tickets related to enhanced join support / features:

Subqueries (which are implemented as joins)

Join Features

Specialized Joins

Performance

What is blocking significant forward progress

In my mind, the major challenge is that "improving" JOINs can get arbitrarily complicated. There are dozens of academic paper each year on various aspects of join implemnetations, and designing / implementing join capabilities is a substantial engineering effort.

I spent 6 years of my life doing joins at Vertica where they accounted for around 50% of the optimizer's complexity, to give some sense

I don't think the issue is that any particular feature is super complicated to understand, but defining the overall goal, the framework that will accomodate the goal, and then breaking it down into implementable pieces itself I think will require both specialized knowledge and substantial time.

What I suggest

I suggest that people with the relevant skills and time to invest gather together to drive this process worward

  1. plan out a "join roadmap" (aka prioritize what join features they will push forward)
  2. Figure out what, if any, new structures are in place
  3. Start breaking it down into smaller tickets
    I can't personally lead such an effort, but I am filing this ticket to try and help connect the relevant people in the community that can.

Some potential people that could help (sorry if I didn't list you)

Related content:

Related blogs (join ordering section in part 2): https://www.influxdata.com/blog/optimizing-sql-dataframes-part-two/

@milenkovicm
Copy link
Contributor

milenkovicm commented Apr 29, 2025

not sure if it will help direction, cost nothing to share :) Debunking the Myth of Join Ordering: Toward Robust SQL Analytics

@alamb
Copy link
Contributor Author

alamb commented Apr 29, 2025

not sure if it will help direction, cost nothing to share :) Debunking the Myth of Join Ordering: Toward Robust SQL Analytics

I have that paper on my reading list. Does anyone know of a production system that has implemented the RPT framework?

@2010YOUY01
Copy link
Contributor

not sure if it will help direction, cost nothing to share :) Debunking the Myth of Join Ordering: Toward Robust SQL Analytics

I have that paper on my reading list. Does anyone know of a production system that has implemented the RPT framework?

DuckDB is integrating it duckdb/duckdb#17326

@xudong963
Copy link
Member

not sure if it will help direction, cost nothing to share :) Debunking the Myth of Join Ordering: Toward Robust SQL Analytics

I have that paper on my reading list. Does anyone know of a production system that has implemented the RPT framework?

DuckDB is integrating it duckdb/duckdb#17326

Cool, looking forward to seeing the final result

@alamb
Copy link
Contributor Author

alamb commented May 15, 2025

In case others haven't heard, @irenjj is working on additional subquery support as part of a Google Summer of Code Project (where @jayzhan211 and I are helping mentor).

I am not quite sure what our next steps will be here

# for free to join this conversation on GitHub. Already have an account? # to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants