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: add merge status #13903

Merged

Conversation

JackTan25
Copy link
Contributor

@JackTan25 JackTan25 commented Dec 2, 2023

I hereby agree to the terms of the CLA available at: https://databend.rs/dev/policies/cla/

Summary

Summary about this PR

  1. after merge into operation, we should return the status of update/delete/insert affected rows.
    it should be like:
mysql> create table t1(a int);
mysql> create table t2(a int);
mysql> insert into t1 values(1),(3);
mysql> insert into t2 values(1),(3),(4);
mysql> merge into t1 using t2 on t1.a = t2.a when matched and t2.a = 1 then update * when
matched then delete when not matched then insert *;
+-------------+-------------+-------------+
| insert_rows | update_rows | delete_rows |
+-------------+-------------+-------------+
|           1 |           1 |           1 |
+-------------+-------------+-------------+

This change is Reviewable

@github-actions github-actions bot added the pr-feature this PR introduces a new feature to the codebase label Dec 2, 2023
@JackTan25 JackTan25 marked this pull request as ready for review December 3, 2023 08:37
@JackTan25 JackTan25 marked this pull request as draft December 3, 2023 09:19
Copy link
Collaborator

@TCeason TCeason left a comment

Choose a reason for hiding this comment

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

Modify in 18_0001_udf_priv.result is LGTM.

@JackTan25 JackTan25 added this pull request to the merge queue Dec 4, 2023
@BohuTANG BohuTANG removed this pull request from the merge queue due to a manual request Dec 4, 2023
@BohuTANG BohuTANG merged commit 9e21c23 into databendlabs:main Dec 4, 2023
70 checks passed
Copy link
Contributor

Pull request description must contain CLA like the following:

I hereby agree to the terms of the CLA available at: https://docs.databend.com/dev/policies/cla/

## Summary

Summary about this PR

- Close #issue

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
pr-feature this PR introduces a new feature to the codebase
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants