-
Notifications
You must be signed in to change notification settings - Fork 2.4k
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
[CALCITE-6624] SqlBabelParser should parse MySQL DATETIME type #4002
base: main
Are you sure you want to change the base?
[CALCITE-6624] SqlBabelParser should parse MySQL DATETIME type #4002
Conversation
b24d053
to
86e204b
Compare
@@ -6182,6 +6182,12 @@ SqlTypeNameSpec DateTimeTypeName() : | |||
{ | |||
return new SqlBasicTypeNameSpec(typeName, precision, s.end(this)); | |||
} | |||
| |
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.
is this supposed to be in Babel?
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.
Regarding Babel, my initial plan was to implement DATETIME datatype parsing at the Babel parser level, but I noticed that we have DATETIME literal parsing for BigQuery inside Parser.jj, which is also valid for MySQL. Therefore, I decided to put DATETIME type parsing in Parser.jj, as it would be better to have both DATETIME datatype parsing and DATETIME literal parsing in the same place.
492a2ae
to
2833f46
Compare
2833f46
to
42206a9
Compare
Please retry analysis of this Pull-Request directly on SonarCloud |
|
||
!ok | ||
|
||
SELECT cast(cast(TIMESTAMP'9999-12-31 23:59:59' as DATETIME) as DATETIME); |
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 you also write DATETIME '1000-01-01 00:00:00'?
Are you supposed to?
No description provided.