mirror of
https://github.com/apache/datafusion-sqlparser-rs.git
synced 2025-09-06 06:00:32 +00:00
merge CreateExternalTable & CreateTable.
This commit is contained in:
parent
35556593f5
commit
d8f824c400
4 changed files with 63 additions and 82 deletions
|
@ -641,11 +641,12 @@ impl Parser {
|
|||
self.expect_keyword("LOCATION")?;
|
||||
let location = self.parse_literal_string()?;
|
||||
|
||||
Ok(SQLStatement::SQLCreateExternalTable {
|
||||
Ok(SQLStatement::SQLCreateTable {
|
||||
name: table_name,
|
||||
columns,
|
||||
file_format,
|
||||
location,
|
||||
external: true,
|
||||
file_format: Some(file_format),
|
||||
location: Some(location),
|
||||
})
|
||||
}
|
||||
|
||||
|
@ -676,6 +677,9 @@ impl Parser {
|
|||
Ok(SQLStatement::SQLCreateTable {
|
||||
name: table_name,
|
||||
columns,
|
||||
external: false,
|
||||
file_format: None,
|
||||
location: None,
|
||||
})
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue