You are viewing a plain text version of this content. The canonical link for it is here.
Posted to reviews@spark.apache.org by sun-rui <gi...@git.apache.org> on 2016/07/04 15:25:40 UTC

[GitHub] spark pull request #14046: [SPARK-16366][SPARKR] Fix time comparison failure...

GitHub user sun-rui opened a pull request:

    https://github.com/apache/spark/pull/14046

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

    ## 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.
    
    


You can merge this pull request into a Git repository by running:

    $ git pull https://github.com/sun-rui/spark SPARK-16366

Alternatively you can review and apply these changes as the patch at:

    https://github.com/apache/spark/pull/14046.patch

To close this pull request, make a commit to your master/trunk branch
with (at least) the following in the commit message:

    This closes #14046
    
----
commit 448450ea795a68e5933d62f8c5521f4d520e02bd
Author: Sun Rui <su...@gmail.com>
Date:   2016-07-04T15:19:41Z

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

----


---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at infrastructure@apache.org or file a JIRA ticket
with INFRA.
---

---------------------------------------------------------------------
To unsubscribe, e-mail: reviews-unsubscribe@spark.apache.org
For additional commands, e-mail: reviews-help@spark.apache.org


[GitHub] spark issue #14046: [SPARK-16366][SPARKR] Fix time comparison failures in Sp...

Posted by shivaram <gi...@git.apache.org>.
Github user shivaram commented on the issue:

    https://github.com/apache/spark/pull/14046
  
    @sun-rui Is this PR still active ? Can we close it if its not relevant ?


---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at infrastructure@apache.org or file a JIRA ticket
with INFRA.
---

---------------------------------------------------------------------
To unsubscribe, e-mail: reviews-unsubscribe@spark.apache.org
For additional commands, e-mail: reviews-help@spark.apache.org


[GitHub] spark pull request #14046: [SPARK-16366][SPARKR] Fix time comparison failure...

Posted by shivaram <gi...@git.apache.org>.
Github user shivaram commented on a diff in the pull request:

    https://github.com/apache/spark/pull/14046#discussion_r69486820
  
    --- Diff: R/pkg/inst/tests/testthat/test_sparkSQL.R ---
    @@ -1258,10 +1258,12 @@ test_that("date functions on a DataFrame", {
       df2 <- createDataFrame(l2)
       expect_equal(collect(select(df2, minute(df2$b)))[, 1], c(34, 24))
       expect_equal(collect(select(df2, second(df2$b)))[, 1], c(0, 34))
    -  expect_equal(collect(select(df2, from_utc_timestamp(df2$b, "JST")))[, 1],
    -               c(as.POSIXlt("2012-12-13 21:34:00 UTC"), as.POSIXlt("2014-12-15 10:24:34 UTC")))
    -  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
    --- End diff --
    
    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")
    ```



---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at infrastructure@apache.org or file a JIRA ticket
with INFRA.
---

---------------------------------------------------------------------
To unsubscribe, e-mail: reviews-unsubscribe@spark.apache.org
For additional commands, e-mail: reviews-help@spark.apache.org


[GitHub] spark issue #14046: [SPARK-16366][SPARKR] Fix time comparison failures in Sp...

Posted by AmplabJenkins <gi...@git.apache.org>.
Github user AmplabJenkins commented on the issue:

    https://github.com/apache/spark/pull/14046
  
    Merged build finished. Test PASSed.


---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at infrastructure@apache.org or file a JIRA ticket
with INFRA.
---

---------------------------------------------------------------------
To unsubscribe, e-mail: reviews-unsubscribe@spark.apache.org
For additional commands, e-mail: reviews-help@spark.apache.org


[GitHub] spark issue #14046: [SPARK-16366][SPARKR] Fix time comparison failures in Sp...

Posted by SparkQA <gi...@git.apache.org>.
Github user SparkQA commented on the issue:

    https://github.com/apache/spark/pull/14046
  
    **[Test build #61727 has finished](https://amplab.cs.berkeley.edu/jenkins/job/SparkPullRequestBuilder/61727/consoleFull)** for PR 14046 at commit [`448450e`](https://github.com/apache/spark/commit/448450ea795a68e5933d62f8c5521f4d520e02bd).
     * This patch passes all tests.
     * This patch merges cleanly.
     * This patch adds no public classes.


---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at infrastructure@apache.org or file a JIRA ticket
with INFRA.
---

---------------------------------------------------------------------
To unsubscribe, e-mail: reviews-unsubscribe@spark.apache.org
For additional commands, e-mail: reviews-help@spark.apache.org


[GitHub] spark issue #14046: [SPARK-16366][SPARKR] Fix time comparison failures in Sp...

Posted by AmplabJenkins <gi...@git.apache.org>.
Github user AmplabJenkins commented on the issue:

    https://github.com/apache/spark/pull/14046
  
    Test PASSed.
    Refer to this link for build results (access rights to CI server needed): 
    https://amplab.cs.berkeley.edu/jenkins//job/SparkPullRequestBuilder/61727/
    Test PASSed.


---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at infrastructure@apache.org or file a JIRA ticket
with INFRA.
---

---------------------------------------------------------------------
To unsubscribe, e-mail: reviews-unsubscribe@spark.apache.org
For additional commands, e-mail: reviews-help@spark.apache.org


[GitHub] spark pull request #14046: [SPARK-16366][SPARKR] Fix time comparison failure...

Posted by sun-rui <gi...@git.apache.org>.
Github user sun-rui closed the pull request at:

    https://github.com/apache/spark/pull/14046


---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at infrastructure@apache.org or file a JIRA ticket
with INFRA.
---

---------------------------------------------------------------------
To unsubscribe, e-mail: reviews-unsubscribe@spark.apache.org
For additional commands, e-mail: reviews-help@spark.apache.org


[GitHub] spark issue #14046: [SPARK-16366][SPARKR] Fix time comparison failures in Sp...

Posted by SparkQA <gi...@git.apache.org>.
Github user SparkQA commented on the issue:

    https://github.com/apache/spark/pull/14046
  
    **[Test build #61727 has started](https://amplab.cs.berkeley.edu/jenkins/job/SparkPullRequestBuilder/61727/consoleFull)** for PR 14046 at commit [`448450e`](https://github.com/apache/spark/commit/448450ea795a68e5933d62f8c5521f4d520e02bd).


---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at infrastructure@apache.org or file a JIRA ticket
with INFRA.
---

---------------------------------------------------------------------
To unsubscribe, e-mail: reviews-unsubscribe@spark.apache.org
For additional commands, e-mail: reviews-help@spark.apache.org


[GitHub] spark pull request #14046: [SPARK-16366][SPARKR] Fix time comparison failure...

Posted by sun-rui <gi...@git.apache.org>.
Github user sun-rui commented on a diff in the pull request:

    https://github.com/apache/spark/pull/14046#discussion_r69501135
  
    --- Diff: R/pkg/inst/tests/testthat/test_sparkSQL.R ---
    @@ -1258,10 +1258,12 @@ test_that("date functions on a DataFrame", {
       df2 <- createDataFrame(l2)
       expect_equal(collect(select(df2, minute(df2$b)))[, 1], c(34, 24))
       expect_equal(collect(select(df2, second(df2$b)))[, 1], c(0, 34))
    -  expect_equal(collect(select(df2, from_utc_timestamp(df2$b, "JST")))[, 1],
    -               c(as.POSIXlt("2012-12-13 21:34:00 UTC"), as.POSIXlt("2014-12-15 10:24:34 UTC")))
    -  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
    --- End diff --
    
    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.


---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at infrastructure@apache.org or file a JIRA ticket
with INFRA.
---

---------------------------------------------------------------------
To unsubscribe, e-mail: reviews-unsubscribe@spark.apache.org
For additional commands, e-mail: reviews-help@spark.apache.org