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 DATETIME keyword #512

Merged
merged 1 commit into from Jun 4, 2022
Merged

Conversation

komukomo
Copy link
Contributor

BigQuery can parse DATETIME.
https://cloud.google.com/bigquery/docs/reference/standard-sql/lexical#datetime_literals

Before this PR, SELECT DATETIME '1999-01-01 01:23:34.45' was parsed as DATETIME column with '1999-01-..' alias.

@coveralls
Copy link

Pull Request Test Coverage Report for Build 2400844184

  • 10 of 10 (100.0%) changed or added relevant lines in 3 files are covered.
  • 1 unchanged line in 1 file lost coverage.
  • Overall coverage increased (+0.01%) to 89.669%

Files with Coverage Reduction New Missed Lines %
src/parser.rs 1 83.04%
Totals Coverage Status
Change from base Build 2395967002: 0.01%
Covered Lines: 8558
Relevant Lines: 9544

💛 - Coveralls

@komukomo komukomo changed the title Support DATETIME literals Support DATETIME keyword May 28, 2022
@komukomo
Copy link
Contributor Author

Also, DATETIME was treated as a Custom type in SELECT CAST('1999-01-01 01:23:34.45' AS DATETIME) for example.

ref. #503

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 to me -- thank you @komukomo

@alamb alamb merged commit d19d955 into sqlparser-rs:main Jun 4, 2022
mobuchowski pushed a commit to mobuchowski/sqlparser-rs that referenced this pull request Aug 3, 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