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

Consolidate MergeJoin with HashJoin to adaptive join relations according to runtime resources and table sizes #2316

Open
Tracked by #1599
yjshen opened this issue Apr 22, 2022 · 0 comments

Comments

@yjshen
Copy link
Member

yjshen commented Apr 22, 2022

A possible solution I could think of currently:

  1. Always choose to use HashJoin when there is no statistical information indicating that both tables are large.
  2. Memory tracking while building hashtable for building side.
  3. When the hash-builder fails to grow its memory
    3.1. sort and spill the in-memory hashtable into spill0, free memory.
    3.2. buffer and sort the incoming records for the buffer table until it's exhausted, do a sort.
    3.3. buffer and sort the records for the streaming side until it's finished, do a sort.
    3.4 MergeJoin the two sides.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant