goldmedal commented on PR #1598:
URL: 
https://github.com/apache/datafusion-sqlparser-rs/pull/1598#issuecomment-2563220067

   > I think my example here was bad. I meant to write something like `SELECT * 
FROM foo-123.mydataset.mytable` which is a valid table syntax according to the 
docs you mentioned above.
   > 
   
   I see. So you mean the project name in BigQuery.  I think it backs to my 
another concern about unquoted hyphenated identifiers. I agree 
`foo-123.mydatset.mytable` is a valid table name but I don't think we can query 
it without quoting it in BigQuery.
   
   I tried a similar case in BigQuery (sorry for the non-English UI but I think 
it's easy to know which one works)
   ![Screenshot 2024-12-27 at 9 18 14 
AM](https://github.com/user-attachments/assets/106e417b-6e1f-4e58-a339-775fa2223a57)
   and
   ![Screenshot 2024-12-27 at 9 18 29 
AM](https://github.com/user-attachments/assets/c0f1494a-f379-41ca-8a5c-84a9118e6010)
   or
   ![Screenshot 2024-12-27 at 9 21 09 
AM](https://github.com/user-attachments/assets/2da13ab5-1b5f-4d34-97f4-062a0475b4fd)
   
   Or did I miss something? Can we use it in BigQuery by enabling some 
configuration?
   
   > Sorry about breaking that case. I'm actually surprised we don't have a 
test case for that. I think it easy to fix the case of `SELECT 1. AS c1`, but 
it will be tricky to handle `SELECT 1.e5` for example.
   >
   
   Never mind. I'm also surprised about it 😢. We should have tests to protect 
it (I'll do it in #1619)
   I think the problem is: **should we allow unquoted hyphenated identifiers 
for BigQuery or any dialect by default?**
   
   If it's a BigQuery official valid syntax, I prefer to limit it to be a 
BigQuery-specific behavior in the tokenizer.
   I pretty sure other dialects don't allow this kind of identifier.
   
   However, it's not a valid syntax for BigQUery but it's used by some 
downstream projects (maybe in your case?). I prefer to let it be an optional 
behavior for the dialect. Maybe add a method in the Dialect trait to control 
it. 🤔 
   
   WDYT?
   


-- 
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: github-unsubscr...@datafusion.apache.org

For queries about this service, please contact Infrastructure at:
us...@infra.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: github-unsubscr...@datafusion.apache.org
For additional commands, e-mail: github-h...@datafusion.apache.org

Reply via email to