Skip to content

feat: implement select * ilike for snowflake #1228

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
Apr 21, 2024

Conversation

HiranmayaGundu
Copy link
Contributor

Implements SELECT * ILIKE for Snowflake. This is the relevant SQL documentation: https://docs.snowflake.com/en/sql-reference/sql/select

@HiranmayaGundu HiranmayaGundu changed the title feat: impliement select * ilike for snowflake feat: implement select * ilike for snowflake Apr 20, 2024
@HiranmayaGundu HiranmayaGundu force-pushed the select_ilike_wildcard branch from 2214f5f to f480fda Compare April 20, 2024 02:51
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

@HiranmayaGundu HiranmayaGundu force-pushed the select_ilike_wildcard branch from f480fda to 29882fe Compare April 20, 2024 23:06
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 @HiranmayaGundu and @iffyio for the review 🙏


#[test]
fn test_select_wildcard_with_ilike_replace() {
let res = snowflake().parse_sql_statements(r#"SELECT * ILIKE '%id%' EXCLUDE col FROM tbl"#);
Copy link
Contributor

Choose a reason for hiding this comment

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

💯 for the negative test case

@coveralls
Copy link

Pull Request Test Coverage Report for Build 8768330043

Warning: This coverage report may be inaccurate.

This pull request's base commit is no longer the HEAD commit of its target branch. This means it includes changes from outside the original pull request, including, potentially, unrelated coverage changes.

Details

  • 39 of 44 (88.64%) changed or added relevant lines in 4 files are covered.
  • No unchanged relevant lines lost coverage.
  • Overall coverage increased (+0.001%) to 88.09%

Changes Missing Coverage Covered Lines Changed/Added Lines %
src/ast/query.rs 6 8 75.0%
tests/sqlparser_snowflake.rs 16 19 84.21%
Totals Coverage Status
Change from base Build 8660968190: 0.001%
Covered Lines: 21323
Relevant Lines: 24206

💛 - Coveralls

@alamb alamb merged commit 4604628 into apache:main Apr 21, 2024
10 checks passed
@HiranmayaGundu HiranmayaGundu deleted the select_ilike_wildcard branch April 21, 2024 17:29
JichaoS pushed a commit to luabase/sqlparser-rs that referenced this pull request May 7, 2024
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.

4 participants