Chore!: fix mypy issues, use _parse_table_parts instead of _parse_table#903
Merged
georgesittas merged 3 commits intomainfrom May 26, 2023
Merged
Chore!: fix mypy issues, use _parse_table_parts instead of _parse_table#903georgesittas merged 3 commits intomainfrom
georgesittas merged 3 commits intomainfrom
Conversation
tobymao
approved these changes
May 25, 2023
75cb458 to
6e64a76
Compare
georgesittas
commented
May 26, 2023
Comment on lines
-175
to
+176
| columns=exp.Tuple( | ||
| expressions=[exp.to_column(c) for c in columns], | ||
| ), | ||
| columns=[exp.to_column(c) for c in columns], |
Collaborator
Author
There was a problem hiding this comment.
@tobymao can you take a look here? Seems like this became invalid due to tobymao/sqlglot@fbf5f47.
Note that by assigning a list of Columns we'll generate a different AST here than what parse_one outputs:
>>> import sqlglot
>>> sqlglot.parse_one("CREATE INDEX my_idx ON tbl (a, b)")
(CREATE this:
(INDEX this:
(IDENTIFIER this: my_idx, quoted: False), table:
(TABLE this:
(IDENTIFIER this: tbl, quoted: False)), columns:
(ORDERED this:
(COLUMN this:
(IDENTIFIER this: a, quoted: False)), desc: False, nulls_first: True),
(ORDERED this:
(COLUMN this:
(IDENTIFIER this: b, quoted: False)), desc: False, nulls_first: True)), kind: INDEX)
Collaborator
Author
There was a problem hiding this comment.
Cool, thanks for verifying. Doing a final pass on the codebase to see if there's any other place where we could have a regression, but it's probably good to go.
tobymao
approved these changes
May 26, 2023
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
This will resolve mypy issues created due to the latest sqlglot changes.
When we bump sqlglot to v14.1.0, I'll bump its version here too and the CI will be fixed.