GitHub user marmbrus opened a pull request:

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

    [SPARK-8420][SQL] Fix comparision of timestamps/dates with strings

    In earlier versions of Spark SQL we casted `TimestampType` and `DataType` 
to `StringType` when it was involved in a binary comparision with a 
`StringType`.  This allowed comparing a timestamp with a partial date as a user 
would expect.
     - `time > "2014-06-10"`
     - `time > "2014"
    
    In 1.4.0 we tried to cast the String instead into a Timestamp.  However, 
since partial dates are not a valid complete timestamp this results in `null` 
which results in the tuple being filtered.
    
    This PR restores the earlier behavior.


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

    $ git pull https://github.com/marmbrus/spark timeCompareString

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

    https://github.com/apache/spark/pull/6888.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 #6888
    
----
commit 04d908f54b9867eaf0117a34f5f80452f3ad0336
Author: Michael Armbrust <mich...@databricks.com>
Date:   2015-06-18T21:58:32Z

    [SPARK-8420][SQL] Fix comparision of timestamps/dates with strings

commit aaa95085be186500c440067463c7090b4149a816
Author: Michael Armbrust <mich...@databricks.com>
Date:   2015-06-18T22:01:41Z

    newline

----


---
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 infrastruct...@apache.org or file a JIRA ticket
with INFRA.
---

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

Reply via email to