-
Notifications
You must be signed in to change notification settings - Fork 160
New issue
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
Chore!: fix mypy issues, use _parse_table_parts instead of _parse_table #903
Conversation
75cb458
to
6e64a76
Compare
columns=exp.Tuple( | ||
expressions=[exp.to_column(c) for c in columns], | ||
), | ||
columns=[exp.to_column(c) for c in columns], |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@tobymao can you take a look here? Seems like this became invalid due to tobymao/sqlglot@fbf5f47.
Note that by assigning a list of Column
s 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)
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
yea that was wrong
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
columns is fine
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
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.
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.