You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@spark.apache.org by "Yin Huai (JIRA)" <ji...@apache.org> on 2015/06/22 19:46:05 UTC

[jira] [Resolved] (SPARK-8420) Inconsistent behavior with Dataframe Timestamp between 1.3.1 and 1.4.0

     [ https://issues.apache.org/jira/browse/SPARK-8420?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Yin Huai resolved SPARK-8420.
-----------------------------
       Resolution: Fixed
    Fix Version/s: 1.4.1

Issue resolved by pull request 6914
[https://github.com/apache/spark/pull/6914]

> Inconsistent behavior with Dataframe Timestamp between 1.3.1 and 1.4.0
> ----------------------------------------------------------------------
>
>                 Key: SPARK-8420
>                 URL: https://issues.apache.org/jira/browse/SPARK-8420
>             Project: Spark
>          Issue Type: Bug
>          Components: SQL
>    Affects Versions: 1.4.0
>            Reporter: Justin Yip
>            Assignee: Michael Armbrust
>            Priority: Blocker
>              Labels: releasenotes
>             Fix For: 1.5.0, 1.4.1
>
>
> I am trying out 1.4.0 and notice there are some differences in behavior with Timestamp between 1.3.1 and 1.4.0. 
> In 1.3.1, I can compare a Timestamp with string.
> {code}
> scala> val df = sqlContext.createDataFrame(Seq((1, Timestamp.valueOf("2015-01-01 00:00:00")), (2, Timestamp.valueOf("2014-01-01 00:00:00"))))
> ...
> scala> df.filter($"_2" <= "2014-06-01").show
> ...
> _1 _2                  
> 2  2014-01-01 00:00:...
> {code}
> However, in 1.4.0, the filter is always false:
> {code}
> scala> val df = sqlContext.createDataFrame(Seq((1, Timestamp.valueOf("2015-01-01 00:00:00")), (2, Timestamp.valueOf("2014-01-01 00:00:00"))))
> df: org.apache.spark.sql.DataFrame = [_1: int, _2: timestamp]
> scala> df.filter($"_2" <= "2014-06-01").show
> +--+--+
> |_1|_2|
> +--+--+
> +--+--+
> {code}
> Not sure if that is intended, but I cannot find any doc mentioning these inconsistencies.



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

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