GitHub user 0x0FFF opened a pull request:

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

    [SPARK-10392] [SQL] Pyspark - Wrong DateType support on JDBC connection

    This PR addresses issue 
[SPARK-10392](https://issues.apache.org/jira/browse/SPARK-10392)
    The 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
    
    Issue reproduction on master:
    ```
    >>> from pyspark.sql.types import *
    >>> a = DateType()
    >>> a.fromInternal(0)
    0
    >>> a.fromInternal(1)
    datetime.date(1970, 1, 2)
    ```

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

    $ git pull https://github.com/0x0FFF/spark SPARK-10392

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

    https://github.com/apache/spark/pull/8556.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 #8556
    
----
commit 7985de776958ddec7335a3399f2a6d772dbb18e1
Author: 0x0FFF <[email protected]>
Date:   2015-09-01T13:30:22Z

    [SPARK-10392] [SQL] Pyspark - Wrong DateType support on JDBC connection

----


---
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 [email protected] or file a JIRA ticket
with INFRA.
---

---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to