Skip to content

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

Merged
alamb merged 1 commit intoapache:mainfrom
validio-io:bq-unquoted-hyphen
Apr 9, 2024
Merged

BigQuery: support unquoted hyphen in table/view declaration#1178
alamb merged 1 commit intoapache:mainfrom
validio-io:bq-unquoted-hyphen

Conversation

@iffyio
Copy link
Copy Markdown
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
Copy Markdown

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

3 participants