mirror of
https://github.com/apache/datafusion-sqlparser-rs.git
synced 2025-10-09 13:40:22 +00:00
Change CREATE INDEX serialization to not end with a semicolon
This commit is contained in:
parent
9371652446
commit
9a2d86dcb5
2 changed files with 2 additions and 2 deletions
|
@ -750,7 +750,7 @@ impl fmt::Display for Statement {
|
|||
if_not_exists,
|
||||
} => write!(
|
||||
f,
|
||||
"CREATE {unique}INDEX {if_not_exists}{name} ON {table_name}({columns});",
|
||||
"CREATE {unique}INDEX {if_not_exists}{name} ON {table_name}({columns})",
|
||||
unique = if *unique { "UNIQUE " } else { "" },
|
||||
if_not_exists = if *if_not_exists { "IF NOT EXISTS " } else { "" },
|
||||
name = name,
|
||||
|
|
|
@ -3152,7 +3152,7 @@ fn ensure_multiple_dialects_are_tested() {
|
|||
|
||||
#[test]
|
||||
fn parse_create_index() {
|
||||
let sql = "CREATE UNIQUE INDEX IF NOT EXISTS idx_name ON test(name,age);";
|
||||
let sql = "CREATE UNIQUE INDEX IF NOT EXISTS idx_name ON test(name,age)";
|
||||
let ident_vec = vec![Ident::new("name"), Ident::new("age")];
|
||||
match verified_stmt(sql) {
|
||||
Statement::CreateIndex {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue