{"action":"created","issue":{"url":"https://api.github.com/repos/apache/spark/issues/6888","labels_url":"https://api.github.com/repos/apache/spark/issues/6888/labels{/name}","comments_url":"https://api.github.com/repos/apache/spark/issues/6888/comments","events_url":"https://api.github.com/repos/apache/spark/issues/6888/events","html_url":"https://github.com/apache/spark/pull/6888","id":89408447,"number":6888,"title":"[SPARK-8420][SQL] Fix comparision of timestamps/dates with strings","user":{"login":"marmbrus","id":527,"avatar_url":"https://avatars.githubusercontent.com/u/527?v=3","gravatar_id":"","url":"https://api.github.com/users/marmbrus","html_url":"https://github.com/marmbrus","followers_url":"https://api.github.com/users/marmbrus/followers","following_url":"https://api.github.com/users/marmbrus/following{/other_user}","gists_url":"https://api.github.com/users/marmbrus/gists{/gist_id}","starred_url":"https://api.github.com/users/marmbrus/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/marmbrus/subscriptions","organizations_url":"https://api.github.com/users/marmbrus/orgs","repos_url":"https://api.github.com/users/marmbrus/repos","events_url":"https://api.github.com/users/marmbrus/events{/privacy}","received_events_url":"https://api.github.com/users/marmbrus/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":9,"created_at":"2015-06-18T22:02:04Z","updated_at":"2015-06-18T22:58:59Z","closed_at":null,"pull_request":{"url":"https://api.github.com/repos/apache/spark/pulls/6888","html_url":"https://github.com/apache/spark/pull/6888","diff_url":"https://github.com/apache/spark/pull/6888.diff","patch_url":"https://github.com/apache/spark/pull/6888.patch"},"body":"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.\r\n - `time > \"2014-06-10\"`\r\n - `time > \"2014\"`\r\n\r\nIn 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.\r\n\r\nThis PR restores the earlier behavior.\r\n"},"comment":{"url":"https://api.github.com/repos/apache/spark/issues/comments/113311134","html_url":"https://github.com/apache/spark/pull/6888#issuecomment-113311134","issue_url":"https://api.github.com/repos/apache/spark/issues/6888","id":113311134,"user":{"login":"SparkQA","id":8108735,"avatar_url":"https://avatars.githubusercontent.com/u/8108735?v=3","gravatar_id":"","url":"https://api.github.com/users/SparkQA","html_url":"https://github.com/SparkQA","followers_url":"https://api.github.com/users/SparkQA/followers","following_url":"https://api.github.com/users/SparkQA/following{/other_user}","gists_url":"https://api.github.com/users/SparkQA/gists{/gist_id}","starred_url":"https://api.github.com/users/SparkQA/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/SparkQA/subscriptions","organizations_url":"https://api.github.com/users/SparkQA/orgs","repos_url":"https://api.github.com/users/SparkQA/repos","events_url":"https://api.github.com/users/SparkQA/events{/privacy}","received_events_url":"https://api.github.com/users/SparkQA/received_events","type":"User","site_admin":false},"created_at":"2015-06-18T22:58:59Z","updated_at":"2015-06-18T22:58:59Z","body":"  [Test build #35183 has finished](https://amplab.cs.berkeley.edu/jenkins/job/SparkPullRequestBuilder/35183/console) for   PR 6888 at commit [`4dfc412`](https://github.com/apache/spark/commit/4dfc4120dc732cdbb4d98162ec655cf2d770a4c0).\n * This patch **fails Spark unit tests**.\n * This patch merges cleanly.\n * This patch adds no public classes."}}