iffyio commented on code in PR #2403:
URL:
https://github.com/apache/datafusion-sqlparser-rs/pull/2403#discussion_r3727259871
##########
src/parser/mod.rs:
##########
@@ -18404,7 +18404,9 @@ impl<'a> Parser<'a> {
let table = self.parse_keyword(Keyword::TABLE);
let table_object = self.parse_table_object()?;
+ // `BY NAME` is an INSERT clause, not a table alias.
let table_alias = if self.dialect.supports_insert_table_alias()
+ && !self.peek_keywords(&[Keyword::BY, Keyword::NAME])
Review Comment:
hmm yeah I think it might depend on how that `BY NAME` syntax works. Can we
add a test demonstrating the behavior of `INSERT INTO BY NAME SELECT 1 AS a`?
Also can we add a doc to the reference describing this syntax. Currently its
unclear from the PR alone how the syntax fits with existing grammar the parser
covers here otherwise
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]