You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@spark.apache.org by rx...@apache.org on 2015/05/15 00:11:05 UTC
spark git commit: [SPARK-7278] [PySpark] DateType should find
datetime.datetime acceptable
Repository: spark
Updated Branches:
refs/heads/master f2cd00be3 -> 5d7d4f887
[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 <ks...@siberie.de>
Closes #6057 from ksonj/dates and squashes the following commits:
68a158e [ksonj] DateType should find datetime.datetime acceptable too
Project: http://git-wip-us.apache.org/repos/asf/spark/repo
Commit: http://git-wip-us.apache.org/repos/asf/spark/commit/5d7d4f88
Tree: http://git-wip-us.apache.org/repos/asf/spark/tree/5d7d4f88
Diff: http://git-wip-us.apache.org/repos/asf/spark/diff/5d7d4f88
Branch: refs/heads/master
Commit: 5d7d4f887d509e6d037d8fc5247d2e5f8a4563c9
Parents: f2cd00b
Author: ksonj <ks...@siberie.de>
Authored: Thu May 14 15:10:58 2015 -0700
Committer: Reynold Xin <rx...@databricks.com>
Committed: Thu May 14 15:10:58 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/5d7d4f88/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: commits-unsubscribe@spark.apache.org
For additional commands, e-mail: commits-help@spark.apache.org