mirror of
https://github.com/apache/datafusion-sqlparser-rs.git
synced 2025-10-07 20:50:21 +00:00
Snowflake: Support CLONE
option in CREATE DATABASE/SCHEMA
statements (#1958)
This commit is contained in:
parent
a73577c29f
commit
799c1f748d
3 changed files with 63 additions and 0 deletions
|
@ -4917,12 +4917,19 @@ impl<'a> Parser<'a> {
|
|||
None
|
||||
};
|
||||
|
||||
let clone = if self.parse_keyword(Keyword::CLONE) {
|
||||
Some(self.parse_object_name(false)?)
|
||||
} else {
|
||||
None
|
||||
};
|
||||
|
||||
Ok(Statement::CreateSchema {
|
||||
schema_name,
|
||||
if_not_exists,
|
||||
with,
|
||||
options,
|
||||
default_collate_spec,
|
||||
clone,
|
||||
})
|
||||
}
|
||||
|
||||
|
@ -4957,11 +4964,18 @@ impl<'a> Parser<'a> {
|
|||
_ => break,
|
||||
}
|
||||
}
|
||||
let clone = if self.parse_keyword(Keyword::CLONE) {
|
||||
Some(self.parse_object_name(false)?)
|
||||
} else {
|
||||
None
|
||||
};
|
||||
|
||||
Ok(Statement::CreateDatabase {
|
||||
db_name,
|
||||
if_not_exists: ine,
|
||||
location,
|
||||
managed_location,
|
||||
clone,
|
||||
})
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue