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

[SPARK-16366][SPARKR] Fix time comparison failures in SparkR unit tests. #14046

Closed
wants to merge 1 commit into from

Conversation

sun-rui
Copy link
Contributor

@sun-rui sun-rui commented Jul 4, 2016

What changes were proposed in this pull request?

Fix time comparison failures in SparkR unit tests. For details, refer to https://issues.apache.org/jira/browse/SPARK-16366.

How was this patch tested?

SparkR unit tests.

@SparkQA
Copy link

SparkQA commented Jul 4, 2016

Test build #61727 has finished for PR 14046 at commit 448450e.

  • This patch passes all tests.
  • This patch merges cleanly.
  • This patch adds no public classes.

expect_equal(collect(select(df2, to_utc_timestamp(df2$b, "JST")))[, 1],
c(as.POSIXlt("2012-12-13 03:34:00 UTC"), as.POSIXlt("2014-12-14 16:24:34 UTC")))
t <- c(as.POSIXlt("2012-12-13 21:34:00 UTC"), as.POSIXlt("2014-12-15 10:24:34 UTC"))
attr(t, "tzone") <- NULL
Copy link
Contributor

Choose a reason for hiding this comment

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

Do you know why we need this ? Doesnt the code to set time zone as UTC do the right thing ?

 .originalTimeZone <- Sys.getenv("TZ")
   Sys.setenv(TZ = "UTC")

Copy link
Contributor Author

Choose a reason for hiding this comment

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

I do not have a deep understanding of time zone in R. let me spend some time to see if I can have a better fix. May need a look at date/time handling in serde.

@shivaram
Copy link
Contributor

@sun-rui Is this PR still active ? Can we close it if its not relevant ?

@sun-rui sun-rui closed this Aug 25, 2016
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
3 participants