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 trailing commas in BigQuery dialect #557

Merged
merged 1 commit into from Aug 11, 2022

Conversation

komukomo
Copy link
Contributor

@komukomo komukomo commented Aug 7, 2022

BigQuery supports trailing commas in a SELECT statement.
ref. https://cloud.google.com/bigquery/docs/reference/standard-sql/lexical#trailing_commas

@komukomo komukomo changed the title feat: Support trailing commas Support trailing commas Aug 7, 2022
@coveralls
Copy link

Pull Request Test Coverage Report for Build 2812898923

  • 24 of 26 (92.31%) changed or added relevant lines in 2 files are covered.
  • 4 unchanged lines in 1 file lost coverage.
  • Overall coverage decreased (-0.03%) to 89.919%

Changes Missing Coverage Covered Lines Changed/Added Lines %
src/parser.rs 14 16 87.5%
Files with Coverage Reduction New Missed Lines %
src/parser.rs 4 83.29%
Totals Coverage Status
Change from base Build 2805421159: -0.03%
Covered Lines: 9116
Relevant Lines: 10138

💛 - Coveralls

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.

Looks good -- thank you @komukomo

("SELECT a, b,", "SELECT a, b"),
("SELECT a, b AS c,", "SELECT a, b AS c"),
("SELECT a, b AS c, FROM t", "SELECT a, b AS c FROM t"),
("SELECT a, b, FROM t", "SELECT a, b FROM t"),
Copy link
Collaborator

Choose a reason for hiding this comment

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

tests look good to me.

@alamb alamb changed the title Support trailing commas Support trailing commas in BigQuery dialect Aug 11, 2022
@alamb alamb merged commit aabafc9 into sqlparser-rs:main Aug 11, 2022
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.

None yet

3 participants