LucaCappelletti94 opened a new pull request, #2677:
URL: https://github.com/apache/datafusion-sqlparser-rs/pull/2677

   `SELECT t ._a FROM t` failed to tokenize with `Unexpected character '_'`, 
although SQLite 3.51.1, DuckDB 1.4.4 and PostgreSQL 16 all run it and read it 
as `t._a`. The tokenizer treats `._` as a period only when the previous token 
is a word, and with whitespace in between the previous token was the 
whitespace, so it fell through to number parsing.
   
   The check now looks at the previous token that is not whitespace. A `._` 
that follows a number, as in `SELECT 1 ._a`, is still a tokenizer error, and 
`SELECT ._abc` with no qualifier is still rejected by the parser. Tests cover 
these forms in every dialect where `_` can start an identifier.


-- 
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]

Reply via email to