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 handling of /~% in the stage name #1009

Merged
merged 2 commits into from
Oct 26, 2023

Conversation

lustefaniak
Copy link
Contributor

@lustefaniak lustefaniak commented Oct 19, 2023

Fixes: #1008

Changed as discussed in the code review. Tokenizer accepts /, %, ~ normally, and then when parsing stage name, that is accepted as part of identifier.

@lustefaniak lustefaniak changed the title snowflake: Fix handling of @~% in the stage name snowflake: Fix handling of /~% in the stage name Oct 19, 2023
@coveralls
Copy link

coveralls commented Oct 19, 2023

Pull Request Test Coverage Report for Build 6652040155

  • 34 of 35 (97.14%) changed or added relevant lines in 3 files are covered.
  • 1 unchanged line in 1 file lost coverage.
  • Overall coverage increased (+0.008%) to 87.655%

Changes Missing Coverage Covered Lines Changed/Added Lines %
src/dialect/snowflake.rs 23 24 95.83%
Files with Coverage Reduction New Missed Lines %
src/tokenizer.rs 1 88.67%
Totals Coverage Status
Change from base Build 6643642320: 0.008%
Covered Lines: 17545
Relevant Lines: 20016

💛 - 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.

Thanks @lustefaniak -- I have a question about why the tests were changed

Perhaps @pawel-big-lebowski can help review this as the author of #841

tests/sqlparser_snowflake.rs Outdated Show resolved Hide resolved
@yuval-illumex
Copy link
Contributor

Just wanted to say thanks to @lustefaniak - I also noticed this issue and wanted to tackle it.

Copy link
Contributor

@pawel-big-lebowski pawel-big-lebowski left a comment

Choose a reason for hiding this comment

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

Thanks for fixing this.
Great job.

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 @lustefaniak for both this PR as well as #1025 -- they look great.

@alamb alamb merged commit 7b3cc18 into apache:main Oct 26, 2023
10 checks passed
@lustefaniak lustefaniak deleted the snowflake-division branch October 26, 2023 23:31
serprex pushed a commit to serprex/sqlparser-rs that referenced this pull request Nov 6, 2023
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.

In Snowflake dialect field/100 tokenizes as Word(field/100) instead of Word(field),Div,Number(100)
5 participants