We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
VALUES
This is the last error I have on our entire codebase 🎉 all other queries are correctly parsed under sqlglot-16.0.1.dev10
sqlglot-16.0.1.dev10
This query works in Snowflake, but fails to get parsed:
SELECT * FROM (VALUES (0) foo(bar))
The following code was used:
parse_one("SELECT * FROM (VALUES (0) foo(bar))", read=dialects.Snowflake)
It is only because of the outer parenthesis. The following code samples work, and are correctly parsed:
-- Sample 1 ✅ SELECT * FROM VALUES (0) foo(bar) -- Sample 2 ✅ SELECT * FROM (VALUES (0)) foo(bar)
Traceback (most recent call last): File "/Users/florian.ernst/Library/Application Support/JetBrains/Toolbox/apps/PyCharm-P/ch-0/231.9011.38/PyCharm.app/Contents/plugins/python/helpers/pydev/pydevconsole.py", line 364, in runcode coro = func() File "<input>", line 1, in <module> File "/Users/florian.ernst/Alan/alan-jobs/env/lib/python3.10/site-packages/sqlglot/__init__.py", line 158, in parse_one result = dialect.parse(sql, **opts) File "/Users/florian.ernst/Alan/alan-jobs/env/lib/python3.10/site-packages/sqlglot/dialects/dialect.py", line 217, in parse return self.parser(**opts).parse(self.tokenize(sql), sql) File "/Users/florian.ernst/Alan/alan-jobs/env/lib/python3.10/site-packages/sqlglot/parser.py", line 856, in parse The list of the produced syntax trees. File "/Users/florian.ernst/Alan/alan-jobs/env/lib/python3.10/site-packages/sqlglot/parser.py", line 922, in _parse self._advance() File "/Users/florian.ernst/Alan/alan-jobs/env/lib/python3.10/site-packages/sqlglot/parser.py", line 1112, in _parse_statement File "/Users/florian.ernst/Alan/alan-jobs/env/lib/python3.10/site-packages/sqlglot/parser.py", line 1893, in _parse_select this.set("into", into) File "/Users/florian.ernst/Alan/alan-jobs/env/lib/python3.10/site-packages/sqlglot/parser.py", line 2031, in _parse_from self, modifiers: bool = False, skip_from_token: bool = False File "/Users/florian.ernst/Alan/alan-jobs/env/lib/python3.10/site-packages/sqlglot/parser.py", line 2299, in _parse_table return lateral File "/Users/florian.ernst/Alan/alan-jobs/env/lib/python3.10/site-packages/sqlglot/parser.py", line 2372, in _parse_derived_table_values if not is_derived and not self._match(TokenType.VALUES): File "/Users/florian.ernst/Alan/alan-jobs/env/lib/python3.10/site-packages/sqlglot/parser.py", line 4585, in _match_r_paren if not self._curr or not self._next: File "/Users/florian.ernst/Alan/alan-jobs/env/lib/python3.10/site-packages/sqlglot/parser.py", line 966, in raise_error sqlglot.errors.ParseError: Expecting ). Line 1, Col: 29. SELECT * FROM (VALUES (0) foo(bar))
Don't hesitate to ask if more information is needed 🙏
The text was updated successfully, but these errors were encountered:
5955b9e
Fix: values inner alias snowflake closes tobymao#1768
d19b31d
tobymao
No branches or pull requests
This is the last error I have on our entire codebase 🎉 all other queries are correctly parsed under
sqlglot-16.0.1.dev10
This query works in Snowflake, but fails to get parsed:
The following code was used:
It is only because of the outer parenthesis. The following code samples work, and are correctly parsed:
Here is the tracelog:
Don't hesitate to ask if more information is needed 🙏
The text was updated successfully, but these errors were encountered: