{"action":"created","issue":{"url":"https://api.github.com/repos/apache/spark/issues/8556","labels_url":"https://api.github.com/repos/apache/spark/issues/8556/labels{/name}","comments_url":"https://api.github.com/repos/apache/spark/issues/8556/comments","events_url":"https://api.github.com/repos/apache/spark/issues/8556/events","html_url":"https://github.com/apache/spark/pull/8556","id":104268335,"number":8556,"title":"[SPARK-10392] [SQL] Pyspark - Wrong DateType support on JDBC connection","user":{"login":"0x0FFF","id":1366872,"avatar_url":"https://avatars.githubusercontent.com/u/1366872?v=3","gravatar_id":"","url":"https://api.github.com/users/0x0FFF","html_url":"https://github.com/0x0FFF","followers_url":"https://api.github.com/users/0x0FFF/followers","following_url":"https://api.github.com/users/0x0FFF/following{/other_user}","gists_url":"https://api.github.com/users/0x0FFF/gists{/gist_id}","starred_url":"https://api.github.com/users/0x0FFF/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/0x0FFF/subscriptions","organizations_url":"https://api.github.com/users/0x0FFF/orgs","repos_url":"https://api.github.com/users/0x0FFF/repos","events_url":"https://api.github.com/users/0x0FFF/events{/privacy}","received_events_url":"https://api.github.com/users/0x0FFF/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":4,"created_at":"2015-09-01T13:37:10Z","updated_at":"2015-09-01T17:36:26Z","closed_at":null,"pull_request":{"url":"https://api.github.com/repos/apache/spark/pulls/8556","html_url":"https://github.com/apache/spark/pull/8556","diff_url":"https://github.com/apache/spark/pull/8556.diff","patch_url":"https://github.com/apache/spark/pull/8556.patch"},"body":"This PR addresses issue [SPARK-10392](https://issues.apache.org/jira/browse/SPARK-10392)\r\nThe problem is that for \"start of epoch\" date (01 Jan 1970) PySpark class DateType returns 0 instead of the `datetime.date` due to implementation of its return statement\r\n\r\nIssue reproduction on master:\r\n```\r\n>>> from pyspark.sql.types import *\r\n>>> a = DateType()\r\n>>> a.fromInternal(0)\r\n0\r\n>>> a.fromInternal(1)\r\ndatetime.date(1970, 1, 2)\r\n```"},"comment":{"url":"https://api.github.com/repos/apache/spark/issues/comments/136806464","html_url":"https://github.com/apache/spark/pull/8556#issuecomment-136806464","issue_url":"https://api.github.com/repos/apache/spark/issues/8556","id":136806464,"user":{"login":"AmplabJenkins","id":4031291,"avatar_url":"https://avatars.githubusercontent.com/u/4031291?v=3","gravatar_id":"","url":"https://api.github.com/users/AmplabJenkins","html_url":"https://github.com/AmplabJenkins","followers_url":"https://api.github.com/users/AmplabJenkins/followers","following_url":"https://api.github.com/users/AmplabJenkins/following{/other_user}","gists_url":"https://api.github.com/users/AmplabJenkins/gists{/gist_id}","starred_url":"https://api.github.com/users/AmplabJenkins/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/AmplabJenkins/subscriptions","organizations_url":"https://api.github.com/users/AmplabJenkins/orgs","repos_url":"https://api.github.com/users/AmplabJenkins/repos","events_url":"https://api.github.com/users/AmplabJenkins/events{/privacy}","received_events_url":"https://api.github.com/users/AmplabJenkins/received_events","type":"User","site_admin":false},"created_at":"2015-09-01T17:36:26Z","updated_at":"2015-09-01T17:36:26Z","body":"Merged build finished. Test PASSed."}}