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

change plan for insert without unique key column #14713

Merged

Conversation

ouyuanning
Copy link
Contributor

@ouyuanning ouyuanning commented Feb 27, 2024

What type of PR is this?

  • API-change
  • BUG
  • Improvement
  • Documentation
  • Feature
  • Test and CI
  • Code Refactoring

Which issue(s) this PR fixes:

issue https://github.com/matrixorigin/MO-Cloud/issues/2567

What this PR does / why we need it:

当insert语句中,没有包含unique key的列时。
现在MO会做一次去重检查和insert操作,跟莫尘讨论了下,应该这部分可以去掉。

--这种不需要给b这个隐藏表做去重,也不写隐藏表
create table t(a int, b int unique key);
insert into t(a) select * from x;
insert into t (a) values (1); 


--但是以下情况需要去重
create table t(a int, b int unique key default 0);
create table t(a int, b int unique key auto_inrement);
insert into t(a) values (1);
insert into t(a) select * from x;

@matrix-meow matrix-meow added the size/M Denotes a PR that changes [100,499] lines label Feb 27, 2024
@sukki37 sukki37 merged commit 2196ac2 into matrixorigin:main Mar 4, 2024
14 of 18 checks passed
mergify bot pushed a commit that referenced this pull request Mar 7, 2024
@ouyuanning ouyuanning deleted the improve-plan-for-insert-uniquekey branch April 2, 2024 05:38
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
kind/enhancement size/M Denotes a PR that changes [100,499] lines
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

7 participants