Skip to content
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 regressions in cast from string to date and timestamp #3485

Merged
merged 7 commits into from
Sep 16, 2021

Conversation

andygrove
Copy link
Contributor

@andygrove andygrove commented Sep 14, 2021

Signed-off-by: Andy Grove andygrove@nvidia.com

Partially addresses #3478

cuDF recently started supporting variable-length date/timestamp components in is_timestamp and when parsing strings as timestamps. This caused regressions in the plugin.

This PR fixes the regressions and has the following changes:

  • Removes code that modified strings to replace single digit month and day with two digit versions
  • Removes methods based on assumptions around fixed-lengh parsing in cuDF
  • Updates regex patterns to accept one or two-digit month, day, hour, minute, second components
  • Enables a test for casting string to timestamp since the only existing tests were ignored due to other documented issues

We also now support single digit hour, minute and second in timestamps. We still require 6 digits for fractional second.

@andygrove
Copy link
Contributor Author

build

@@ -960,30 +959,6 @@ class CastOpSuite extends GpuExpressionTestSuite {
}
}

test("CAST string to date - sanitize step") {
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This test is no longer needed since we no longer have the sanitization step

@andygrove andygrove marked this pull request as ready for review September 15, 2021 00:24
@andygrove andygrove changed the title WIP: Fix regressions in cast from string to date and timestamp Fix regressions in cast from string to date and timestamp Sep 15, 2021
@andygrove andygrove changed the title Fix regressions in cast from string to date and timestamp WIP: Fix regressions in cast from string to date and timestamp Sep 15, 2021
@andygrove andygrove marked this pull request as draft September 15, 2021 00:35
@andygrove andygrove changed the title WIP: Fix regressions in cast from string to date and timestamp Fix regressions in cast from string to date and timestamp Sep 15, 2021
@andygrove andygrove marked this pull request as ready for review September 15, 2021 00:53
@revans2
Copy link
Collaborator

revans2 commented Sep 15, 2021

build

1 similar comment
@revans2
Copy link
Collaborator

revans2 commented Sep 15, 2021

build

@revans2
Copy link
Collaborator

revans2 commented Sep 15, 2021

The last build failure looked like a networking issue (could not fetch from github...)

@andygrove andygrove merged commit 630c78a into NVIDIA:branch-21.10 Sep 16, 2021
@andygrove andygrove deleted the cudf-cast-fix branch September 16, 2021 04:12
@sameerz sameerz added the bug Something isn't working label Sep 19, 2021
@sameerz sameerz added this to the Sep 13 - Sep 24 milestone Sep 19, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants