Repository: spark Updated Branches: refs/heads/branch-1.4 aa8a0f963 -> a49a14588
[SPARK-7278] [PySpark] DateType should find datetime.datetime acceptable DateType should not be restricted to `datetime.date` but accept `datetime.datetime` objects as well. Could someone with a little more insight verify this? Author: ksonj <[email protected]> Closes #6057 from ksonj/dates and squashes the following commits: 68a158e [ksonj] DateType should find datetime.datetime acceptable too (cherry picked from commit 5d7d4f887d509e6d037d8fc5247d2e5f8a4563c9) Signed-off-by: Reynold Xin <[email protected]> Project: http://git-wip-us.apache.org/repos/asf/spark/repo Commit: http://git-wip-us.apache.org/repos/asf/spark/commit/a49a1458 Tree: http://git-wip-us.apache.org/repos/asf/spark/tree/a49a1458 Diff: http://git-wip-us.apache.org/repos/asf/spark/diff/a49a1458 Branch: refs/heads/branch-1.4 Commit: a49a145884e23e8d98f8114d02f396b42bfaf3b5 Parents: aa8a0f9 Author: ksonj <[email protected]> Authored: Thu May 14 15:10:58 2015 -0700 Committer: Reynold Xin <[email protected]> Committed: Thu May 14 15:11:09 2015 -0700 ---------------------------------------------------------------------- python/pyspark/sql/_types.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) ---------------------------------------------------------------------- http://git-wip-us.apache.org/repos/asf/spark/blob/a49a1458/python/pyspark/sql/_types.py ---------------------------------------------------------------------- diff --git a/python/pyspark/sql/_types.py b/python/pyspark/sql/_types.py index b96851a..629c3a9 100644 --- a/python/pyspark/sql/_types.py +++ b/python/pyspark/sql/_types.py @@ -930,7 +930,7 @@ _acceptable_types = { DecimalType: (decimal.Decimal,), StringType: (str, unicode), BinaryType: (bytearray,), - DateType: (datetime.date,), + DateType: (datetime.date, datetime.datetime), TimestampType: (datetime.datetime,), ArrayType: (list, tuple, array), MapType: (dict,), --------------------------------------------------------------------- To unsubscribe, e-mail: [email protected] For additional commands, e-mail: [email protected]
