Skip to content
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

Athena SHOW parsing for DDL statements #4705

Closed
theborch opened this issue Feb 4, 2025 · 1 comment
Closed

Athena SHOW parsing for DDL statements #4705

theborch opened this issue Feb 4, 2025 · 1 comment

Comments

@theborch
Copy link

theborch commented Feb 4, 2025

Is your feature request related to a problem? Please describe.

Not so much a problem, but would like to add parsing for SHOW statements in the athena dialect.

Example:

from sqlglot import parse_one

parse_one("show create table db.table", dialect="athena")

Output:

'show create table db.table' contains unsupported syntax. Falling back to parsing as a 'Command'.
Command(
  this=SHOW,
  expression=Literal(this=create table db.table, is_string=True))

Describe the solution you'd like

Desired Output:

Show(
  this=CREATE TABLE,
  target=Identifier(this=table, quoted=False),
  db=Identifier(this=db, quoted=False))

Describe alternatives you've considered

Alternatives would be adding SHOW parsing to Hive/Trino dialects, but Athena has a specific subset of SHOW statements, so figured it best to start there.

Additional context

#4703 Submitted as possible solution.

@georgesittas georgesittas linked a pull request Feb 5, 2025 that will close this issue
@georgesittas
Copy link
Collaborator

Closing this for now as the core team doesn't plan to address this. It should be closed "as completed" if/when the linked PR is in.

@georgesittas georgesittas closed this as not planned Won't fix, can't repro, duplicate, stale Feb 7, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants