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(stream): introduce relational top_n #3160

Merged
merged 30 commits into from
Jun 15, 2022
Merged

Conversation

wcy-fdu
Copy link
Contributor

@wcy-fdu wcy-fdu commented Jun 13, 2022

What's changed and what's your intention?

This PR Implements the read/write of TopN executor by state table, which removed flush_buffer in top_n_state and top_n_bottom_n_state.
Since top_n has implemented a merge logic of flush_buffer and storage named scan_and_merge, I just refactor it and rename to scan from relational_table (Or we can change it to something more appropriate).

Checklist

  • I have written necessary docs and comments
  • I have added necessary unit tests and integration tests
  • All checks passed in ./risedev check (or alias, ./risedev c)

Refer to a related PR or issue link (optional)

close #1206

@wcy-fdu wcy-fdu changed the title [WIP]feat(top_n): introduce relational top_n [WIP]feat(stream): introduce relational top_n Jun 13, 2022
@wcy-fdu wcy-fdu marked this pull request as draft June 13, 2022 06:43
@wcy-fdu wcy-fdu changed the title [WIP]feat(stream): introduce relational top_n feat(stream): introduce relational top_n[WIP] Jun 13, 2022
@wcy-fdu wcy-fdu marked this pull request as ready for review June 14, 2022 07:29
@wcy-fdu wcy-fdu changed the title feat(stream): introduce relational top_n[WIP] feat(stream): introduce relational top_n Jun 14, 2022
@codecov
Copy link

codecov bot commented Jun 14, 2022

Codecov Report

Merging #3160 (d3d6ff3) into main (46d5477) will decrease coverage by 0.03%.
The diff coverage is 87.34%.

@@            Coverage Diff             @@
##             main    #3160      +/-   ##
==========================================
- Coverage   73.55%   73.51%   -0.04%     
==========================================
  Files         745      744       -1     
  Lines      101501   101354     -147     
==========================================
- Hits        74659    74514     -145     
+ Misses      26842    26840       -2     
Flag Coverage Δ
rust 73.51% <87.34%> (-0.04%) ⬇️

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

Impacted Files Coverage Δ
src/stream/src/executor/mview/materialize.rs 89.28% <ø> (ø)
src/storage/src/table/cell_based_table.rs 71.67% <54.54%> (+0.24%) ⬆️
...ecutor/managed_state/top_n/top_n_bottom_n_state.rs 82.70% <64.15%> (+5.07%) ⬆️
src/storage/src/table/state_table.rs 83.49% <82.60%> (+0.73%) ⬆️
...am/src/executor/managed_state/top_n/top_n_state.rs 93.52% <94.64%> (+0.49%) ⬆️
src/common/src/util/ordered/serde.rs 89.10% <100.00%> (-2.53%) ⬇️
src/storage/src/table/test_relational_table.rs 98.07% <100.00%> (ø)
...am/src/executor/managed_state/aggregation/value.rs 94.30% <100.00%> (ø)
src/stream/src/executor/mview/test_utils.rs 100.00% <100.00%> (ø)
src/stream/src/executor/top_n.rs 91.47% <100.00%> (-0.12%) ⬇️
... and 9 more

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

@wcy-fdu wcy-fdu requested a review from lmatz June 14, 2022 08:46
src/common/src/util/ordered/serde.rs Outdated Show resolved Hide resolved
src/common/src/util/ordered/serde.rs Outdated Show resolved Hide resolved
src/storage/src/keyspace.rs Outdated Show resolved Hide resolved
src/storage/src/table/state_table.rs Outdated Show resolved Hide resolved
src/storage/src/table/state_table.rs Outdated Show resolved Hide resolved
@wcy-fdu wcy-fdu requested a review from lmatz June 15, 2022 03:44
Copy link
Contributor

@lmatz lmatz left a comment

Choose a reason for hiding this comment

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

LGTM!

@lmatz lmatz merged commit 4342668 into main Jun 15, 2022
@lmatz lmatz deleted the wcy_introduce_relational_top_n branch June 15, 2022 05:09
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.

Implement the read/write of TopN executor by CellbasedTable
3 participants