Skip to content

BigQuery: support unquoted hyphen in table/view declaration #1178

New issue

Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? # to your account

Merged
merged 1 commit into from
Apr 9, 2024

Conversation

iffyio
Copy link
Contributor

@iffyio iffyio commented Mar 14, 2024

Adds support for proper object name parsing in bigquery to within a CREATE TABLE or CREATE VIEW statement. Similar to the parsing logic for when the table/view is later referenced.

The lacking part was that bigquery allows unquoted hyphens in the first part of an object name - so that e.g.
CREATE TABLE my-project.mydataset.mytable
wasn't being parsed correctly.

Adds support for proper object name parsing in bigquery
to within a `CREATE TABLE` or `CREATE VIEW` statement. Similar
to the parsing logic for when the table/view is later referenced.

The lacking part was that bigquery allows unquoted hyphens in the
first part of an object name - so that e.g.
`CREATE TABLE my-project.mydataset.mytable`
wasn't being parsed correctly.
@coveralls
Copy link

Pull Request Test Coverage Report for Build 8278999704

Details

  • 34 of 37 (91.89%) changed or added relevant lines in 2 files are covered.
  • No unchanged relevant lines lost coverage.
  • Overall coverage increased (+0.004%) to 87.874%

Changes Missing Coverage Covered Lines Changed/Added Lines %
tests/sqlparser_bigquery.rs 28 31 90.32%
Totals Coverage Status
Change from base Build 8266982631: 0.004%
Covered Lines: 20516
Relevant Lines: 23347

💛 - Coveralls

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

@alamb alamb merged commit 8dd213c into apache:main Apr 9, 2024
10 checks passed
@iffyio iffyio deleted the bq-unquoted-hyphen branch April 10, 2024 17:34
JichaoS pushed a commit to luabase/sqlparser-rs that referenced this pull request May 7, 2024
# for free to join this conversation on GitHub. Already have an account? # to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants