-
Notifications
You must be signed in to change notification settings - Fork 752
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
fix: incorrect schema may be used while executing
replace-into
(#14592
) * chore: rename to `fill_missing_and_reorder_columns` * adjust test case * rename to `fill_and_reorder_columns` * fix * add sql logic test --------- Co-authored-by: dantengsky <[email protected]>
- Loading branch information
1 parent
432ead0
commit 71241d1
Showing
8 changed files
with
56 additions
and
23 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
41 changes: 41 additions & 0 deletions
41
tests/sqllogictests/suites/base/09_fuse_engine/09_0024_replace_into_issue_14593.test
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,41 @@ | ||
statement ok | ||
DROP DATABASE IF EXISTS issue_14593 | ||
|
||
statement ok | ||
CREATE DATABASE issue_14593 | ||
|
||
statement ok | ||
USE issue_14593 | ||
|
||
# https://github.com/datafuselabs/databend/issues/14593 | ||
|
||
statement ok | ||
create table t (a string, b string, c string, id int, d string) cluster by (id); | ||
|
||
statement ok | ||
replace into t (b, id, a) on(id) values('b', 1, 'a'); | ||
|
||
query ITT | ||
select id, a, b from t; | ||
---- | ||
1 a b | ||
|
||
statement ok | ||
alter table t drop column c; | ||
|
||
statement ok | ||
alter table t drop column d; | ||
|
||
statement ok | ||
replace into t (b, id, a) on(id) values('bb', 1, 'aa'); | ||
|
||
query ITT | ||
select id, a, b from t; | ||
---- | ||
1 aa bb | ||
|
||
statement ok | ||
drop table t; | ||
|
||
statement ok | ||
DROP DATABASE issue_14593 |