You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@spark.apache.org by "Felix Cheung (JIRA)" <ji...@apache.org> on 2018/01/02 06:45:00 UTC

[jira] [Commented] (SPARK-16366) Time comparison failures in SparkR unit tests

    [ https://issues.apache.org/jira/browse/SPARK-16366?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=16307728#comment-16307728 ] 

Felix Cheung commented on SPARK-16366:
--------------------------------------

not 100% sure, but a a similar timestamp test failure was reported at one point and I thought both cases were caused by the machine time zone and R picking that up.


> 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.4.14#64029)

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