Repository navigation
fix: accept second-precision zone offsets in native timestamp casts #7579
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
Changes from all commits
79bc4bf
53810a4
703fdea
32af98a
977f4aa
b150863
c5563dd
abc6b5b
2c802ad
191b92a
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -1918,6 +1918,12 @@ class CometNativeCastSuite | |
| "2020-01-01T12:34:56-08:00", | ||
| // Single-digit hour offset (extract_offset_suffix supports ±H:MM) | ||
| "2020-01-01T12:34:56+5:30", | ||
| // Second-precision offsets, the forms Java's ZoneOffset.of accepts | ||
| "2020-01-01T12:34:56+08:00:30", | ||
| "2020-01-01T12:34:56-01:30:15", | ||
| "2020-01-01T12:34:56+080030", | ||
| // Spark rejects a short minute or second segment once seconds are present | ||
| "2020-01-01T12:34:56+8:0:3", | ||
| // T-prefixed time-only with colon | ||
| "T12:34", | ||
| "T12:34:56", | ||
|
|
@@ -2011,6 +2017,9 @@ class CometNativeCastSuite | |
| "2020-06-15T12:30:00+05:30", | ||
| "2020-06-15T12:30:00-08:00", | ||
| "2020-06-15T12:30:00 UTC", | ||
| "2020-06-15T12:30:00+08:00:30", | ||
| "2020-06-15T12:30:00-01:30:15", | ||
|
Contributor
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Could this list also have the rejected |
||
| "2020-06-15T12:30:00+8:0:3", | ||
| "2024-03-10 02:30:00", | ||
| "2024-11-03 01:30:00", | ||
| "not a timestamp", | ||
|
|
||
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.
This is the third copy of the "ANSI error, otherwise NULL" block in the
TIMESTAMPpath, next to the empty-input check at the top oftimestamp_parserand the end ofparse_timestamp_pattern.invalid_ntz_timestampalready does this forTIMESTAMP_NTZ. Could aTIMESTAMPsibling, orinvalid_ntz_timestamptaking the target type, replace all three? This arm would then beNone => invalid_timestamp(value, eval_mode).