ayman-sigma commented on PR #1598: URL: https://github.com/apache/datafusion-sqlparser-rs/pull/1598#issuecomment-2563244111
> 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'm not sure about the table name, but I know for sure that project name allows unquoted hyphenated identifier for BigQuery. > > > 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? I believe the original PR from @jmhain was scoped to BigQuery, so we should be fine there. We just need to fix the tokenizer again for your case. The tokenizer change in this PR allow parsing `foo-123.bar` as `[Word('"foo"), Minus, Number("123"), Period, Word("bar")]` instead of `[Word("foo"), Minus, Number("123."), Word("bar")]`. I believe the former is more correct than the latter. You can scope that change to BigQuery, but I prefer that we fix it to allow the `1.` and `1.e5`, ... cases. -- 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