Skip to content

Conversation

@BugenZhao
Copy link
Member

@BugenZhao BugenZhao commented Mar 16, 2022

What's changed and what's your intention?

This PR implements LogicalDelete and RwBatchDelete in the Java frontend, and add a modify.slt to test the insertions and deletions for table v2.

There's a workaround in the frontend named patchScan for scanning the hidden column as well for the delete executor.

There might be the possibility of bugs for handling DELETE in the implementations of some other executors. Therefore, the tests in this PR are relatively simple and no other MV is created. We may test and fix those in the next PRs. (#963)

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)

Signed-off-by: Bugen Zhao <[email protected]>
Signed-off-by: Bugen Zhao <[email protected]>
Signed-off-by: Bugen Zhao <[email protected]>
@github-actions github-actions bot added the type/feature Type: New feature. label Mar 16, 2022
Signed-off-by: Bugen Zhao <[email protected]>
@codecov
Copy link

codecov bot commented Mar 16, 2022

Codecov Report

Merging #962 (cc91e90) into main (58da156) will decrease coverage by 0.07%.
The diff coverage is 25.84%.

@@             Coverage Diff              @@
##               main     #962      +/-   ##
============================================
- Coverage     71.80%   71.72%   -0.08%     
  Complexity     2766     2766              
============================================
  Files           971      973       +2     
  Lines         56773    56862      +89     
  Branches       1787     1790       +3     
============================================
+ Hits          40767    40787      +20     
- Misses        15116    15184      +68     
- Partials        890      891       +1     
Flag Coverage Δ
java 61.03% <25.84%> (-0.20%) ⬇️
rust 75.86% <ø> (-0.01%) ⬇️

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

Impacted Files Coverage Δ
...com/risingwave/execution/handler/QueryHandler.java 0.00% <ø> (ø)
...m/risingwave/planner/rel/physical/RwBatchScan.java 92.59% <0.00%> (-7.41%) ⬇️
...ave/planner/rules/streaming/StreamingRuleSets.java 93.75% <ø> (ø)
...n/java/com/risingwave/sql/ToCalciteAstVisitor.java 77.11% <0.00%> (-0.58%) ⬇️
rust/batch/src/executor/delete.rs 79.06% <ø> (ø)
...risingwave/planner/rel/physical/RwBatchDelete.java 19.23% <19.23%> (ø)
...isingwave/planner/rel/logical/RwLogicalDelete.java 38.70% <38.70%> (ø)
...singwave/planner/rules/physical/BatchRuleSets.java 100.00% <100.00%> (ø)
rust/meta/src/model/cluster.rs 73.33% <0.00%> (-13.34%) ⬇️
rust/meta/src/cluster/mod.rs 73.49% <0.00%> (-0.36%) ⬇️

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

@BugenZhao BugenZhao requested a review from lmatz March 16, 2022 06:20
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

Copy link
Collaborator

@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.

LGTM

use crate::executor::{BoxedExecutorBuilder, Executor, ExecutorBuilder};

/// [`DeleteExecutor`] implements table deletion with values from its child executor.
// TODO: concurrent `DELETE` may cause problems. A scheduler might be required.
Copy link
Collaborator

@fuyufjh fuyufjh Mar 16, 2022

Choose a reason for hiding this comment

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

Indeed. So maybe we have to validate the input stream even for the TableSource (like other CDC sources)? Or introduce a table-level read-write lock? Need some discussions later.

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've created an issue for this, #963.

----
114 10
514 20
810 40
Copy link
Contributor

Choose a reason for hiding this comment

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

Stinky numbers as always.

Copy link
Collaborator

Choose a reason for hiding this comment

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

Bugen ❤️ 114514

Copy link
Contributor

@wyhyhyhyh wyhyhyhyh left a comment

Choose a reason for hiding this comment

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

LSTM

@BugenZhao BugenZhao merged commit 751d87d into main Mar 16, 2022
@BugenZhao BugenZhao deleted the bz/delete-part-4 branch March 16, 2022 07:26
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

type/feature Type: New feature.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

support DELETE in TableV2

5 participants