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

refactor(storage): simplify state table iter with async stream #3272

Merged
merged 8 commits into from
Jun 16, 2022

Conversation

BugenZhao
Copy link
Member

@BugenZhao BugenZhao commented Jun 16, 2022

Signed-off-by: Bugen Zhao i@bugenzhao.com

What's changed and what's your intention?

As title. The diff of cell_based_table is totally unreadable, please review the latest version. 🤣

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)

Signed-off-by: Bugen Zhao <i@bugenzhao.com>
Signed-off-by: Bugen Zhao <i@bugenzhao.com>
Signed-off-by: Bugen Zhao <i@bugenzhao.com>
Signed-off-by: Bugen Zhao <i@bugenzhao.com>
Signed-off-by: Bugen Zhao <i@bugenzhao.com>
@BugenZhao BugenZhao changed the title [WIP] refactor(storage): simplify state table iter [WIP] refactor(storage): simplify state table iter with async stream Jun 16, 2022
@BugenZhao BugenZhao changed the title [WIP] refactor(storage): simplify state table iter with async stream refactor(storage): simplify state table iter with async stream Jun 16, 2022
@BugenZhao BugenZhao marked this pull request as ready for review June 16, 2022 09:18
Copy link
Member

@xxchan xxchan left a comment

Choose a reason for hiding this comment

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

L😍TM

src/storage/src/table/cell_based_table.rs Show resolved Hide resolved
src/storage/src/table/cell_based_table.rs Show resolved Hide resolved
// (st1page): Maybe we will have a "ChunkIter" trait which returns a chunk each time, so the name
// "RowTableIter" is reserved now
pub struct CellBasedTableRowIter<S: StateStore> {
/// [`CellBasedIter`] iterates on the cell-based table.
Copy link
Member

Choose a reason for hiding this comment

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

No need to link to itself? 🤪

Copy link
Member Author

Choose a reason for hiding this comment

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

I'm afraid the clippy will complain about this. 😁

Signed-off-by: Bugen Zhao <i@bugenzhao.com>
@wcy-fdu
Copy link
Contributor

wcy-fdu commented Jun 16, 2022

Leave me some time to review this PR😊

@codecov
Copy link

codecov bot commented Jun 16, 2022

Codecov Report

Merging #3272 (7cadde2) into main (53a49d8) will decrease coverage by 0.00%.
The diff coverage is 69.87%.

@@            Coverage Diff             @@
##             main    #3272      +/-   ##
==========================================
- Coverage   73.23%   73.22%   -0.01%     
==========================================
  Files         747      748       +1     
  Lines      101789   101767      -22     
==========================================
- Hits        74545    74523      -22     
  Misses      27244    27244              
Flag Coverage Δ
rust 73.22% <69.87%> (-0.01%) ⬇️

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

Impacted Files Coverage Δ
src/batch/src/executor/row_seq_scan.rs 22.80% <0.00%> (-0.88%) ⬇️
src/storage/src/error.rs 0.00% <ø> (ø)
src/stream/src/executor/batch_query.rs 91.42% <ø> (ø)
src/storage/src/table/cell_based_table.rs 74.23% <46.15%> (-2.85%) ⬇️
src/storage/src/table/state_table.rs 95.23% <97.05%> (-0.34%) ⬇️
src/storage/src/table/test_relational_table.rs 98.08% <97.14%> (-0.06%) ⬇️
src/common/src/array/data_chunk_iter.rs 83.11% <100.00%> (+0.22%) ⬆️
src/storage/src/table/mem_table.rs 78.57% <100.00%> (+4.49%) ⬆️
src/storage/src/table/mod.rs 100.00% <100.00%> (ø)
...am/src/executor/managed_state/aggregation/value.rs 94.30% <100.00%> (ø)
... and 7 more

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

Copy link
Contributor

@wcy-fdu wcy-fdu left a comment

Choose a reason for hiding this comment

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

Good Job!

@BugenZhao BugenZhao merged commit d577da0 into main Jun 16, 2022
@BugenZhao BugenZhao deleted the bz/simplify-state-table-iter branch June 16, 2022 10:40
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.

None yet

3 participants