Skip to content

Commit

Permalink
test: add a case for duplicate columns
Browse files Browse the repository at this point in the history
  • Loading branch information
devgony committed Nov 9, 2022
1 parent 6d147f5 commit b219726
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions test-suite/src/alter/create_table.rs
Original file line number Diff line number Diff line change
Expand Up @@ -129,6 +129,11 @@ test_case!(create_table, async move {
"CREATE TABLE TargetTableWithData2 AS SELECT * FROM NonExistentTable",
Err(AlterError::CtasSourceTableNotFound("NonExistentTable".to_owned()).into()),
),
(
// Cannot create table with duplicate column name
"CREATE TABLE DuplicateColumns (id INT, id INT)",
Err(AlterError::DuplicateColumnName("id".to_owned()).into()),
),
];

for (sql, expected) in test_cases {
Expand Down

0 comments on commit b219726

Please sign in to comment.