Skip to content

Conversation

alexander-beedie
Copy link
Contributor

@alexander-beedie alexander-beedie commented Jun 23, 2024

Affects parsing of Snowflake SELECT * <opts> wildcard options that contain both RENAME and REPLACE options.

As per the Snowflake docs1:

If you specify REPLACE and RENAME:
You must specify REPLACE first

Made a minor fix and added a unit test to validate it and provide the missing coverage.

Footnotes

  1. https://docs.snowflake.com/en/sql-reference/sql/select#parameters

@alexander-beedie alexander-beedie force-pushed the wildcard-replace-rename-order branch from 7ef2d21 to e4ceed7 Compare June 23, 2024 19:24
@coveralls
Copy link

coveralls commented Jun 23, 2024

Pull Request Test Coverage Report for Build 9635875595

Details

  • 23 of 25 (92.0%) changed or added relevant lines in 3 files are covered.
  • 8 unchanged lines in 1 file lost coverage.
  • Overall coverage increased (+0.003%) to 89.011%

Changes Missing Coverage Covered Lines Changed/Added Lines %
tests/sqlparser_snowflake.rs 17 19 89.47%
Files with Coverage Reduction New Missed Lines %
tests/sqlparser_snowflake.rs 8 98.01%
Totals Coverage Status
Change from base Build 9633122504: 0.003%
Covered Lines: 26293
Relevant Lines: 29539

💛 - Coveralls

@coveralls
Copy link

coveralls commented Jun 23, 2024

Pull Request Test Coverage Report for Build 9635889639

Details

  • 22 of 23 (95.65%) changed or added relevant lines in 3 files are covered.
  • 1 unchanged line in 1 file lost coverage.
  • Overall coverage increased (+0.003%) to 89.011%

Changes Missing Coverage Covered Lines Changed/Added Lines %
tests/sqlparser_snowflake.rs 16 17 94.12%
Files with Coverage Reduction New Missed Lines %
tests/sqlparser_snowflake.rs 1 98.0%
Totals Coverage Status
Change from base Build 9633122504: 0.003%
Covered Lines: 26292
Relevant Lines: 29538

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

@alexander-beedie alexander-beedie changed the title Fix Snowflake wildcard REPLACE ... RENAME order Fix Snowflake SELECT * wildcard REPLACE ... RENAME order Jun 26, 2024
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 @alexander-beedie and @iffyio

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