Github user adrian-wang commented on a diff in the pull request:

    https://github.com/apache/spark/pull/2901#discussion_r19329014
  
    --- Diff: python/pyspark/sql.py ---
    @@ -1084,10 +1096,11 @@ def applySchema(self, rdd, schema):
             ...     StructField("null", DoubleType(), True)])
             >>> srdd = sqlCtx.applySchema(rdd, schema)
             >>> results = srdd.map(
    -        ...     lambda x: (x.byte1, x.byte2, x.short1, x.short2, x.int, 
x.float, x.time,
    -        ...         x.map["a"], x.struct.b, x.list, x.null))
    -        >>> results.collect()[0]
    -        (127, -128, -32768, 32767, 2147483647, 1.0, ...(2010, 1, 1, 1, 1, 
1), 1, 2, [1, 2, 3], None)
    +        ...     lambda x: (x.byte1, x.byte2, x.short1, x.short2, x.int, 
x.float, x.date,
    +        ...         x.time, x.map["a"], x.struct.b, x.list, x.null))
    +        >>> results.collect()[0] # doctest: +NORMALIZE_WHITESPACE
    +        (127, -128, -32768, 32767, 2147483647, 1.0, 
datetime.datetime(2010, 1, 1, 0, 0),
    --- End diff --
    
    @davies because of using pyrolite, `java.sql.Date` is serialized in the 
same way as `java.sql.Timestamp`, since they are all subtype of 
`java.util.Date`. And this make the `dumps()` function to generate datetime 
instead of date for `java.util.Date`. I think this is related to your comments 
in JIRA SPARK-2674


---
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