Merged
Conversation
waitingkuo
commented
Aug 23, 2022
Comment on lines
161
to
+162
| DataType::Timestamp => write!(f, "TIMESTAMP"), | ||
| DataType::TimestampTz => write!(f, "TIMESTAMPTZ"), |
Contributor
Author
There was a problem hiding this comment.
add DataType::TimestampTz
waitingkuo
commented
Aug 23, 2022
Comment on lines
-3123
to
3131
| Keyword::TIMESTAMP => { | ||
| // TBD: we throw away "with/without timezone" information | ||
| if self.parse_keyword(Keyword::WITH) || self.parse_keyword(Keyword::WITHOUT) { | ||
| if self.parse_keyword(Keyword::WITH) { | ||
| self.expect_keywords(&[Keyword::TIME, Keyword::ZONE])?; | ||
| Ok(DataType::TimestampTz) | ||
| } else if self.parse_keyword(Keyword::WITHOUT) { | ||
| self.expect_keywords(&[Keyword::TIME, Keyword::ZONE])?; | ||
| Ok(DataType::Timestamp) | ||
| } else { | ||
| Ok(DataType::Timestamp) | ||
| } | ||
| Ok(DataType::Timestamp) | ||
| } |
Contributor
Author
There was a problem hiding this comment.
enable with time zone and without time zone
waitingkuo
commented
Aug 23, 2022
| } | ||
| Ok(DataType::Timestamp) | ||
| } | ||
| Keyword::TIMESTAMPTZ => Ok(DataType::TimestampTz), |
Contributor
Author
There was a problem hiding this comment.
add TimestampTz into parser
Pull Request Test Coverage Report for Build 2910912498
💛 - Coveralls |
Contributor
Author
|
@liukun4515 @alamb this is to add time zone support for sql parser we need this to solve time-zone related issue in apache/datafusion#3148 |
|
I need some time to get familiar with the context in the datafusion/arrow-rs. @waitingkuo Maybe be slower to reply |
This was referenced Sep 30, 2022
Contributor
|
@waitingkuo @andygrove |
ovr
pushed a commit
to cube-js/sqlparser-rs
that referenced
this pull request
Mar 21, 2023
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
close #588
close #464
add datetype
TimestampTzadd following into parser
TIMESTAMP [WITHOUT TIME ZONE]=>TimestampTIMESTAMP WITH TIME ZONEandTIMESTAMPTZ=> `TimestampTz