-
Notifications
You must be signed in to change notification settings - Fork 1.2k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Handle strings with partial date/time specifications and time zones i…
…n Presto's from_iso8601_timestamp and cast to TSwTZ from Varchar (#11412) Summary: Pull Request resolved: #11412 Today in from_iso8601_timestamp and when casting to TimestampWithTimeZone from Varchar, Velox doesn't support specifying a time zone, unless theres is a timestamp also specified. Presto Java allows specifying just a date and a time zone in these cases. The root cause was that tryParseTimestampString in TimestampConversion wouldn't allow trailing characters after a date unless they were a time (trailing characters after a time were allowed). For from_iso8601_timestamp, I had to update tryParseDateString to allow just specifying the year or the year and month with a time zone as well. In addition I noticed from_iso8601_timestamp does not allow specifying just the hour portion of the timestamp with a time zone (without a time zone this is allowed). Again, this is allowed in Presto Java. The root cause was tryParseTimeString not allowing trailing characters after the hour unless they are a minute in Iso8601 parse mode. Reviewed By: bikramSingh91 Differential Revision: D65370931 fbshipit-source-id: 9fcb67ed57cf89f7642cc8a6ab6082c2643f219f
- Loading branch information
1 parent
c95f1e0
commit f4a1223
Showing
5 changed files
with
122 additions
and
15 deletions.
There are no files selected for viewing
This file contains 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
This file contains 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
This file contains 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
This file contains 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
This file contains 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