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

snowflake: fix rendering of SELECT TOP #1070

Merged
merged 1 commit into from
Dec 22, 2023
Merged

Conversation

jmhain
Copy link
Contributor

@jmhain jmhain commented Dec 21, 2023

In Snowflake, SELECT TOP only supports an unparenthesized integer constant as its operand. This syntax was being parsed successfully but the Display impl was rendering MSSQL style (i.e. with parentheses), which causes the resultant queries to fail in Snowflake. I fixed this by distinguishing the two different syntactic forms for TOP in the AST.

@coveralls
Copy link

coveralls commented Dec 21, 2023

Pull Request Test Coverage Report for Build 7293605325

  • 20 of 21 (95.24%) changed or added relevant lines in 4 files are covered.
  • No unchanged relevant lines lost coverage.
  • Overall coverage increased (+0.003%) to 87.678%

Changes Missing Coverage Covered Lines Changed/Added Lines %
src/parser/mod.rs 5 6 83.33%
Totals Coverage Status
Change from base Build 7280713756: 0.003%
Covered Lines: 18287
Relevant Lines: 20857

💛 - Coveralls

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.

Looks good to me -- thank you @jmhain

@alamb alamb merged commit 2950a84 into apache:main Dec 22, 2023
10 checks passed
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.

3 participants