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(batch): apply row-based encoding for materialize executor and batch mode #4335

Merged
merged 13 commits into from
Aug 2, 2022

Conversation

wcy-fdu
Copy link
Contributor

@wcy-fdu wcy-fdu commented Aug 1, 2022

I hereby agree to the terms of the Singularity Data, Inc. Contributor License Agreement.

What's changed and what's your intention?

As title.

Checklist

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

Documentation

If your pull request contains user-facing changes, please specify the types of the changes, and create a release note. Otherwise, please feel free to remove this section.

Types of user-facing changes

Please keep the types that apply to your changes, and remove those that do not apply.

  • Installation and deployment
  • Connector (sources & sinks)
  • SQL commands, functions, and operators
  • RisingWave cluster configuration changes
  • Other (please specify in the release note below)

Release note

Please create a release note for your changes. In the release note, focus on the impact on users, and mention the environment or conditions where the impact may occur.

Refer to a related PR or issue link (optional)

close #4367

@@ -49,8 +49,8 @@ pub struct RowSeqScanExecutor<S: StateStore> {
}

pub enum ScanType<S: StateStore> {
TableScan(BatchDedupPkIter<S, CellBasedRowSerde>),
RangeScan(StorageTableIter<S, CellBasedRowSerde>),
TableScan(StorageTableIter<S, RowBasedSerde>),
Copy link
Collaborator

Choose a reason for hiding this comment

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

Do we still need to differentiate TableScan and RangeScan?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Not sure whether we need to differentiate, if we have row-based dudup pk. cc @BugenZhao

Copy link
Member

Choose a reason for hiding this comment

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

With dedup fully implemented, they should also use the same iterator. For now I think there's no need to differentiate them.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Will refactor this part in next PR.

src/storage/src/row_serde/row_based_deserializer.rs Outdated Show resolved Hide resolved
src/stream/src/from_proto/batch_query.rs Outdated Show resolved Hide resolved
@codecov
Copy link

codecov bot commented Aug 1, 2022

Codecov Report

Merging #4335 (23bb49b) into main (4269183) will increase coverage by 0.04%.
The diff coverage is 96.34%.

@@            Coverage Diff             @@
##             main    #4335      +/-   ##
==========================================
+ Coverage   74.42%   74.47%   +0.04%     
==========================================
  Files         846      846              
  Lines      122994   123168     +174     
==========================================
+ Hits        91537    91727     +190     
+ Misses      31457    31441      -16     
Flag Coverage Δ
rust 74.47% <96.34%> (+0.04%) ⬆️

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 17.29% <0.00%> (+0.80%) ⬆️
src/storage/src/row_serde/mod.rs 78.94% <ø> (ø)
src/storage/src/table/storage_table.rs 81.09% <ø> (ø)
src/stream/src/executor/lookup/impl_.rs 95.36% <ø> (ø)
src/stream/src/executor/lookup/sides.rs 29.16% <ø> (ø)
src/stream/src/from_proto/batch_query.rs 0.00% <0.00%> (ø)
src/stream/src/from_proto/lookup.rs 0.00% <0.00%> (ø)
src/stream/src/executor/mview/materialize.rs 75.92% <66.66%> (ø)
src/storage/src/table/test_relational_table.rs 97.86% <97.01%> (-0.07%) ⬇️
...orage/src/row_serde/cell_based_row_deserializer.rs 92.93% <100.00%> (+0.36%) ⬆️
... and 5 more

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

@wcy-fdu wcy-fdu force-pushed the wcy/row_based_batch branch from 5415e00 to 77ce7f0 Compare August 2, 2022 05:52
@wcy-fdu wcy-fdu requested review from hzxa21 and BugenZhao August 2, 2022 05:55
Copy link
Member

@BugenZhao BugenZhao left a comment

Choose a reason for hiding this comment

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

LGTM

src/storage/src/row_serde/mod.rs Outdated Show resolved Hide resolved
src/storage/src/row_serde/mod.rs Outdated Show resolved Hide resolved
Copy link
Collaborator

@hzxa21 hzxa21 left a comment

Choose a reason for hiding this comment

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

Good work! Thanks for the PR!

@mergify mergify bot merged commit 368823f into main Aug 2, 2022
@mergify mergify bot deleted the wcy/row_based_batch branch August 2, 2022 08:19
nasnoisaac pushed a commit to nasnoisaac/risingwave that referenced this pull request Aug 9, 2022
…tch mode (risingwavelabs#4335)

* x

* row-based mv and batch

* remove redudant code

* fmt happy

* fmt happy

* doc

* remove clone

* refactor

* fix column_mapping

* update comments

Co-authored-by: mergify[bot] <37929162+mergify[bot]@users.noreply.github.com>
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 materialize executor's read/write path with row-based encoding and benchmark.
3 participants