Skip to content

Allow to use the TABLE keyword in DESC|DESCRIBE|EXPLAIN TABLE statement #1351

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

Merged
merged 1 commit into from
Jul 29, 2024

Conversation

git-hulk
Copy link
Member

This closes #1160.

@@ -7972,10 +7972,13 @@ impl<'a> Parser<'a> {
_ => {}
}

// only allow to use TABLE keyword for DESC|DESCRIBE statement
let has_table_keyword = self.parse_keyword(Keyword::TABLE);
Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I didn't add the dialect guard since the TABLE keyword is allowed in multiple dialects(Snowflake and ClicHouse), and it should be good to let the downstream determine if it's a valid syntax.

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

See #1385

@coveralls
Copy link

Pull Request Test Coverage Report for Build 10070975254

Details

  • 25 of 26 (96.15%) changed or added relevant lines in 3 files are covered.
  • No unchanged relevant lines lost coverage.
  • Overall coverage increased (+0.002%) to 89.258%

Changes Missing Coverage Covered Lines Changed/Added Lines %
tests/sqlparser_common.rs 21 22 95.45%
Totals Coverage Status
Change from base Build 10063291795: 0.002%
Covered Lines: 27239
Relevant Lines: 30517

💛 - Coveralls

Copy link
Contributor

@iffyio iffyio left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM! cc @alamb

Copy link
Contributor

@alamb alamb left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thank you @git-hulk and @iffyio

@alamb alamb merged commit 7fdb2ec into apache:main Jul 29, 2024
10 checks passed
@alamb
Copy link
Contributor

alamb commented Aug 15, 2024

@samuelcolvin found a seeming regression due to this change here: #1385

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 this pull request may close these issues.

snowflake describe table not supported
4 participants