Sun Rui created SPARK-16366:
-------------------------------

             Summary: Time comparison failures in SparkR unit tests
                 Key: SPARK-16366
                 URL: https://issues.apache.org/jira/browse/SPARK-16366
             Project: Spark
          Issue Type: Bug
          Components: SparkR
    Affects Versions: 1.6.2
            Reporter: Sun Rui


Got the following failures when running SparkR unit tests:
{panel}
Failed -------------------------------------------------------------------------
1. Failure: date functions on a DataFrame (@test_sparkSQL.R#1261) --------------
collect(select(df2, from_utc_timestamp(df2$b, "JST")))[, 1] not equal to 
c(as.POSIXlt("2012-12-13 21:34:00 UTC"), as.POSIXlt("2014-12-15 10:24:34 UTC")).
Attributes: < Component "tzone": 1 string mismatch >


2. Failure: date functions on a DataFrame (@test_sparkSQL.R#1263) --------------
collect(select(df2, to_utc_timestamp(df2$b, "JST")))[, 1] not equal to 
c(as.POSIXlt("2012-12-13 03:34:00 UTC"), as.POSIXlt("2014-12-14 16:24:34 UTC")).
Attributes: < Component "tzone": 1 string mismatch >
{panel}

My environment is Ubuntu 14.04, R 3.2.5, LC_TIME=zh_CN.UTF-8
{code}
> t<-c(as.POSIXlt("2012-12-13 21:34:00 UTC"), as.POSIXlt("2014-12-15 10:24:34 
> UTC"))
> attr(t, "tzone")
[1] ""    "CST" "CST"
{code}

The "tzone" attribute should be cleared before time comparison.



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)

---------------------------------------------------------------------
To unsubscribe, e-mail: issues-unsubscr...@spark.apache.org
For additional commands, e-mail: issues-h...@spark.apache.org

Reply via email to