spark-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From r...@apache.org
Subject spark git commit: [SPARK-7278] [PySpark] DateType should find datetime.datetime acceptable
Date Thu, 14 May 2015 22:46:40 GMT
Repository: spark
Updated Branches:
  refs/heads/branch-1.3 944581410 -> 3baa82fda


[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 <kson@siberie.de>

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 <rxin@databricks.com>


Project: http://git-wip-us.apache.org/repos/asf/spark/repo
Commit: http://git-wip-us.apache.org/repos/asf/spark/commit/3baa82fd
Tree: http://git-wip-us.apache.org/repos/asf/spark/tree/3baa82fd
Diff: http://git-wip-us.apache.org/repos/asf/spark/diff/3baa82fd

Branch: refs/heads/branch-1.3
Commit: 3baa82fda7cdc7f3bf5e845b8f26160d8b316958
Parents: 9445814
Author: ksonj <kson@siberie.de>
Authored: Thu May 14 15:10:58 2015 -0700
Committer: Reynold Xin <rxin@databricks.com>
Committed: Thu May 14 15:46:31 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/3baa82fd/python/pyspark/sql/types.py
----------------------------------------------------------------------
diff --git a/python/pyspark/sql/types.py b/python/pyspark/sql/types.py
index ef76d84..5015ce1 100644
--- a/python/pyspark/sql/types.py
+++ b/python/pyspark/sql/types.py
@@ -919,7 +919,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


Mime
View raw message