-
Notifications
You must be signed in to change notification settings - Fork 778
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
feature(athena): add SHOW #4782
Conversation
Ηι @theborch, can you please fix the build? |
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.
@theborch, please open a new PR that only inludes changes related to the SHOW
syntax. There's too much going on here and it's hard to review.
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.
Please revert all the changes to this file, they're unrelated to the PR and it's not clear why they were made.
properties: t.Optional[exp.Properties] = expression.args.get("properties") | ||
properties: exp.Properties | None = expression.args.get("properties") |
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.
Again, please avoid making changes like these. It makes reviewing PRs harder. Stylistic changes need to be discussed with the core team first and, if accepted, reviewed separately.
IDENTIFIERS: ClassVar[list] = ['"', "`"] | ||
KEYWORDS: ClassVar[dict] = { |
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.
Why were these added? This pattern is inconsistent with the rest of the codebase.
target = f"IN {target}" | ||
like = self._prefixed_sql("LIKE", expression, "like") | ||
rlike = self._prefixed_sql("LIKE", expression, "rlike") | ||
print(this, target, db, like, rlike) |
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.
debug?
Parse the following Athena statements as
SHOW
:SHOW COLUMNS
SHOW CREATE TABLE
SHOW CREATE VIEW
SHOW DATABASES
SHOW PARTITIONS
SHOW TABLES
SHOW TBLPROPERTIES
SHOW VIEWS
Example:
Output:
Notes:
SHOW TABLES
it needs to be prefixed withLIKE
SHOW TBLPROPERTIES
does not currently parse the optional('property_name')
.