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

Support RENAME for wildcard SELECTs #784

Merged
merged 1 commit into from Jan 2, 2023

Conversation

Jefffrey
Copy link
Contributor

@Jefffrey Jefffrey commented Jan 2, 2023

Closes #716

Allow RENAME for wildcard selects, for Generic and Snowflake dialects

@coveralls
Copy link

Pull Request Test Coverage Report for Build 3821658894

  • 95 of 98 (96.94%) changed or added relevant lines in 4 files are covered.
  • No unchanged relevant lines lost coverage.
  • Overall coverage increased (+0.04%) to 86.071%

Changes Missing Coverage Covered Lines Changed/Added Lines %
src/ast/query.rs 13 14 92.86%
src/parser.rs 20 21 95.24%
tests/sqlparser_snowflake.rs 48 49 97.96%
Totals Coverage Status
Change from base Build 3801061789: 0.04%
Covered Lines: 13156
Relevant Lines: 15285

💛 - Coveralls

@@ -4432,7 +4440,7 @@ impl<'a> Parser<'a> {
// ignore the <separator> and treat the multiple strings as
// a single <literal>."
Token::SingleQuotedString(s) => Ok(Some(Ident::with_quote('\'', s))),
// Support for MySql dialect double qouted string, `AS "HOUR"` for example
// Support for MySql dialect double quoted string, `AS "HOUR"` for example
Copy link
Collaborator

Choose a reason for hiding this comment

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

👍

Copy link
Collaborator

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

LGTM -- thank you @Jefffrey

@@ -440,7 +506,7 @@ impl fmt::Display for ExcludeSelectItem {
#[cfg_attr(feature = "visitor", derive(Visit))]
pub struct ExceptSelectItem {
/// First guaranteed column.
pub fist_elemnt: Ident,
pub first_element: Ident,
Copy link
Collaborator

Choose a reason for hiding this comment

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

thank you for this fix

@alamb alamb merged commit 17f604f into sqlparser-rs:main Jan 2, 2023
@alamb alamb mentioned this pull request Jan 2, 2023
@Jefffrey Jefffrey deleted the snowflake_rename branch January 2, 2023 19:12
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 EXCLUDE and RENAME in Snowflake
3 participants