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

feat(frontend): add delta join solver #2144

Merged
merged 6 commits into from
Apr 27, 2022
Merged

feat(frontend): add delta join solver #2144

merged 6 commits into from
Apr 27, 2022

Conversation

skyzh
Copy link
Contributor

@skyzh skyzh commented Apr 26, 2022

Signed-off-by: Alex Chi iskyzh@gmail.com

What's changed and what's your intention?

The solver generates the lookup plans by controlling two parameters StreamStrategy::LeftThisEpoch or ArrangeStrategy::LeftFirst and based on join order generated by optimizer.

Checklist

  • I have written necessary docs and comments
  • I have added necessary unit tests and integration tests

Refer to a related PR or issue link (optional)

ref #1962
close #2147

Signed-off-by: Alex Chi <iskyzh@gmail.com>
Signed-off-by: Alex Chi <iskyzh@gmail.com>
Signed-off-by: Alex Chi <iskyzh@gmail.com>
@skyzh skyzh enabled auto-merge (squash) April 26, 2022 08:16
@codecov
Copy link

codecov bot commented Apr 26, 2022

Codecov Report

Merging #2144 (25a1e06) into main (a315894) will increase coverage by 0.09%.
The diff coverage is 95.16%.

@@            Coverage Diff             @@
##             main    #2144      +/-   ##
==========================================
+ Coverage   70.51%   70.60%   +0.09%     
==========================================
  Files         645      649       +4     
  Lines       81785    82164     +379     
==========================================
+ Hits        57668    58010     +342     
- Misses      24117    24154      +37     
Flag Coverage Δ
rust 70.60% <95.16%> (+0.09%) ⬆️

Flags with carried forward coverage won't be shown. Click here to find out more.

Impacted Files Coverage Δ
src/frontend/src/optimizer/mod.rs 94.35% <ø> (ø)
src/frontend/src/optimizer/join_solver.rs 95.16% <95.16%> (ø)
src/stream/src/executor/barrier_align.rs 0.00% <0.00%> (-93.11%) ⬇️
src/stream/src/executor/mod.rs 43.14% <0.00%> (-5.43%) ⬇️
src/stream/src/executor_v2/debug/update_check.rs 92.85% <0.00%> (-0.90%) ⬇️
src/stream/src/executor_v2/debug/schema_check.rs 94.11% <0.00%> (-0.23%) ⬇️
src/meta/src/stream/stream_manager.rs 63.53% <0.00%> (-0.10%) ⬇️
src/stream/src/executor_v2/global_simple_agg.rs 94.71% <0.00%> (-0.08%) ⬇️
src/stream/src/executor_v2/hash_agg.rs 96.81% <0.00%> (-0.05%) ⬇️
src/stream/src/executor_v2/local_simple_agg.rs 97.60% <0.00%> (-0.05%) ⬇️
... and 26 more

📣 Codecov can now indicate which changes are the most critical in Pull Requests. Learn more

Signed-off-by: Alex Chi <iskyzh@gmail.com>
Copy link
Contributor

@fuyufjh fuyufjh left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LSTM

@skyzh skyzh disabled auto-merge April 26, 2022 08:44
Copy link
Contributor

@st1page st1page left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

generally LGTM. if we can rename the join_solver as delta_join_solver?

@skyzh
Copy link
Contributor Author

skyzh commented Apr 26, 2022

generally LGTM. if we can rename the join_solver as delta_join_solver?

+1. I've got a lot of rename requests recently, and I'd like to do this in one PR later.

@skyzh
Copy link
Contributor Author

skyzh commented Apr 26, 2022

Just come up with a new arrange strategy: tables with larger join order should be placed to lookup prev epoch, while placing to right-most position 🤣

@yuhao-su
Copy link
Contributor

yuhao-su commented Apr 26, 2022

LGTM. But for a, b, c on a.x=b.x and a.y=c.y case, we might another solver.

Signed-off-by: Alex Chi <iskyzh@gmail.com>
@skyzh
Copy link
Contributor Author

skyzh commented Apr 27, 2022

Fixed several typos in this PR, and made arrange strategies to be left-most by default. After some discussion with @st1page, we decide to minimize the data on stream in all cases.

@skyzh skyzh enabled auto-merge (squash) April 27, 2022 02:33
@skyzh skyzh merged commit 0945b73 into main Apr 27, 2022
@skyzh skyzh deleted the skyzh/join-solver branch April 27, 2022 02:50
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

streaming: resolve inputs and order of lookup
4 participants