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

supporting snowflake extract syntax #1374

Merged

Conversation

seve-martinez
Copy link
Contributor

Closes #1373

@seve-martinez seve-martinez force-pushed the smartinez/supporting_snowflake_extract_syntax branch from ebff9ba to d4a78f2 Compare August 10, 2024 19:10
@seve-martinez
Copy link
Contributor Author

seve-martinez commented Aug 11, 2024

@iffyio thank you for the review. I've updated the PR per your suggestions.

Snowflake also offers the option to pass a string to the EXTRACT method like so:

EXTRACT('hour', foo)

I've updated this PR to include that use case as well.

@seve-martinez seve-martinez force-pushed the smartinez/supporting_snowflake_extract_syntax branch from d23d250 to 35b7656 Compare August 11, 2024 20:34

Verified

This commit was created on GitHub.com and signed with GitHub’s verified signature.
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 @seve-martinez and @iffyio for the review. Looks great to me

alamb added 2 commits August 13, 2024 07:46

Verified

This commit was created on GitHub.com and signed with GitHub’s verified signature.
…snowflake_extract_syntax
@alamb
Copy link
Contributor

alamb commented Aug 13, 2024

I took the liberty of running cargo fmt and pushing a commit to this branch to get the CI passing

@coveralls
Copy link

coveralls commented Aug 13, 2024

Pull Request Test Coverage Report for Build 10369115339

Details

  • 35 of 38 (92.11%) changed or added relevant lines in 5 files are covered.
  • 2 unchanged lines in 1 file lost coverage.
  • Overall coverage increased (+0.003%) to 89.052%

Changes Missing Coverage Covered Lines Changed/Added Lines %
src/ast/mod.rs 6 7 85.71%
src/parser/mod.rs 8 10 80.0%
Files with Coverage Reduction New Missed Lines %
src/parser/mod.rs 2 93.34%
Totals Coverage Status
Change from base Build 10368470485: 0.003%
Covered Lines: 27648
Relevant Lines: 31047

💛 - Coveralls

@alamb alamb merged commit f5b818e into apache:main Aug 13, 2024
10 checks passed
ayman-sigma pushed a commit to sigmacomputing/sqlparser-rs that referenced this pull request Nov 19, 2024
Co-authored-by: Andrew Lamb <andrew@nerdnetworks.org>
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.

Support Snowflake-specific EXTRACT syntax
4 participants