s5dsn-eqee commented on code in PR #2680:
URL:
https://github.com/apache/datafusion-sqlparser-rs/pull/2680#discussion_r4366967134
##########
src/parser/mod.rs:
##########
@@ -4547,6 +4560,20 @@ impl<'a> Parser<'a> {
})
}
+ /// Returns true if the next token is a word the dialect accepts as a table
+ /// name. The word is consumed while asking, so `is_table_factor` peeks
past
+ /// it as it does at the trailing comma check.
+ fn next_word_is_table_name(&mut self) -> bool {
Review Comment:
might be next_word_is_table_factor?
##########
src/dialect/generic.rs:
##########
@@ -193,6 +193,10 @@ impl Dialect for GenericDialect {
true
}
+ fn supports_in_table_expression(&self) -> bool {
Review Comment:
`GenericDialect` now accepts reserved words as an `IN` table name, because it
keeps the default `is_table_factor` (which reserves only `INTO`, `LIMIT`,
`HAVING`, `WHERE`). Inputs that failed with `Expected: (` before now parse:
- `SELECT 1 IN NULL` -> table named `NULL`
- `SELECT 1 IN select` -> table named `select`
- `SELECT 1 IN case` -> table named `case`
--
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]