mirror of
https://github.com/apache/datafusion-sqlparser-rs.git
synced 2025-08-30 18:57:21 +00:00
Implement CREATE TABLE IF NOT EXISTS (#163)
A non-standard feature supported at least by Postgres https://www.postgresql.org/docs/12/sql-createtable.html
This commit is contained in:
parent
06865113d7
commit
5ad578e3e5
4 changed files with 62 additions and 1 deletions
|
@ -909,6 +909,7 @@ fn parse_create_table() {
|
|||
columns,
|
||||
constraints,
|
||||
with_options,
|
||||
if_not_exists: false,
|
||||
external: false,
|
||||
file_format: None,
|
||||
location: None,
|
||||
|
@ -1045,6 +1046,7 @@ fn parse_create_external_table() {
|
|||
columns,
|
||||
constraints,
|
||||
with_options,
|
||||
if_not_exists,
|
||||
external,
|
||||
file_format,
|
||||
location,
|
||||
|
@ -1086,6 +1088,7 @@ fn parse_create_external_table() {
|
|||
assert_eq!("/tmp/example.csv", location.unwrap());
|
||||
|
||||
assert_eq!(with_options, vec![]);
|
||||
assert!(!if_not_exists);
|
||||
}
|
||||
_ => unreachable!(),
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue