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
Fix DoubleColon cast skipping AT TIME ZONE #1266 #1267
Fix DoubleColon cast skipping AT TIME ZONE #1266 #1267
Conversation
src/ast/mod.rs
Outdated
@@ -424,7 +424,7 @@ pub enum CastKind { | |||
/// See <https://cloud.google.com/bigquery/docs/reference/standard-sql/functions-and-operators#safe_casting>. | |||
SafeCast, | |||
/// `<expr> :: <datatype>` | |||
DoubleColon, | |||
DoubleColonCast, |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Please rename this back to DoubleColon
. The others have the word Cast
because you actually use the word CAST
in the syntax. This is also a breaking change without enough benefit to justify.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
agreed
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Can we also remove the formatting changes that are not related to the PR ?
9a87256
to
5c5f66f
Compare
Is CastFormat::ValueAtTimeZone still needed if we parse the cast as a separate "at time zone" ast node ? |
I'm currently working on the infix part where there is no formatting involved. However, in the prefix part, we are using the BigQuery style where the format is a part of the expression itself. Line 313 in e3692f4
|
This isn't something this PR necessarily needs to address, but I think we should actually get rid
|
agreed. but we should merge this pr first. It fixes a clear bug and does not require a refactoring |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks @dmitrybugakov @jmhain and @lovasoa 🙏 |
Pull Request Test Coverage Report for Build 9029285843Warning: This coverage report may be inaccurate.This pull request's base commit is no longer the HEAD commit of its target branch. This means it includes changes from outside the original pull request, including, potentially, unrelated coverage changes.
Details
💛 - Coveralls |
Closes: #1266