mirror of
https://github.com/apache/datafusion-sqlparser-rs.git
synced 2025-10-17 09:17:14 +00:00
parent
ce498864dc
commit
a71b3f5e82
3 changed files with 217 additions and 0 deletions
|
@ -7678,6 +7678,14 @@ impl<'a> Parser<'a> {
|
|||
// Hive lets you put table here regardless
|
||||
let table = self.parse_keyword(Keyword::TABLE);
|
||||
let table_name = self.parse_object_name()?;
|
||||
|
||||
let table_alias =
|
||||
if dialect_of!(self is PostgreSqlDialect) && self.parse_keyword(Keyword::AS) {
|
||||
Some(self.parse_identifier()?)
|
||||
} else {
|
||||
None
|
||||
};
|
||||
|
||||
let is_mysql = dialect_of!(self is MySqlDialect);
|
||||
|
||||
let (columns, partitioned, after_columns, source) =
|
||||
|
@ -7752,6 +7760,7 @@ impl<'a> Parser<'a> {
|
|||
Ok(Statement::Insert {
|
||||
or,
|
||||
table_name,
|
||||
table_alias,
|
||||
ignore,
|
||||
into,
|
||||
overwrite,
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue