matrixone icon indicating copy to clipboard operation
matrixone copied to clipboard

[Tech Request]: rewrite 'insert ... on duplicate key update' to 'replace into' in some case

Open ouyuanning opened this issue 8 months ago • 3 comments

Is there an existing issue for the same tech request?

  • [X] I have checked the existing issues.

Does this tech request not affect user experience?

  • [X] This tech request doesn't affect user experience.

What would you like to be added ?

create table t1(a int primary key, b int);
insert into t1 values (1,1),(2,2) on duplicate key update a = values(a), b = values(b);
-- -> rewrite to
replace into t1 values (1,1),(2,2);


### Why is this needed ?

_No response_

### Additional information

_No response_

ouyuanning avatar May 31 '24 05:05 ouyuanning