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 expression in AT TIME ZONE and fix precedence #1272

Merged
merged 1 commit into from
May 23, 2024

Conversation

jmhain
Copy link
Contributor

@jmhain jmhain commented May 16, 2024

Postgres supports an expression for the timezone input to the AT TIME ZONE operator. Through some experimentation, I discovered that the precedence is actually not that of the "(any other operator)" entry in the documentation, so I corrected this as well. The latter makes the workaround from https://github.com/sqlparser-rs/sqlparser-rs/pull/1267/files no longer necessary - the test added in that PR passes without it.

Resolves #1270.

@coveralls
Copy link

Pull Request Test Coverage Report for Build 9106544276

Details

  • 20 of 23 (86.96%) changed or added relevant lines in 4 files are covered.
  • 3 unchanged lines in 1 file lost coverage.
  • Overall coverage increased (+0.01%) to 89.508%

Changes Missing Coverage Covered Lines Changed/Added Lines %
tests/sqlparser_postgres.rs 6 7 85.71%
src/parser/mod.rs 7 9 77.78%
Files with Coverage Reduction New Missed Lines %
tests/sqlparser_common.rs 3 89.45%
Totals Coverage Status
Change from base Build 9060810029: 0.01%
Covered Lines: 24869
Relevant Lines: 27784

💛 - Coveralls

Copy link
Contributor

@iffyio iffyio left a comment

Choose a reason for hiding this comment

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

LGTM! cc @alamb

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

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 column references and other expressions in RHS of AT TIME ZONE operator
4 participants