aboutsummaryrefslogtreecommitdiff
path: root/python
diff options
context:
space:
mode:
authorksonj <kson@siberie.de>2015-05-14 15:10:58 -0700
committerReynold Xin <rxin@databricks.com>2015-05-14 15:10:58 -0700
commit5d7d4f887d509e6d037d8fc5247d2e5f8a4563c9 (patch)
tree1b7781cda2670dc515c7bc0272a0f6dfae39b486 /python
parentf2cd00be350fdba3acfbfdf155701182d1c404fd (diff)
downloadspark-5d7d4f887d509e6d037d8fc5247d2e5f8a4563c9.tar.gz
spark-5d7d4f887d509e6d037d8fc5247d2e5f8a4563c9.tar.bz2
spark-5d7d4f887d509e6d037d8fc5247d2e5f8a4563c9.zip
[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
Diffstat (limited to 'python')
-rw-r--r--python/pyspark/sql/_types.py2
1 files changed, 1 insertions, 1 deletions
diff --git a/python/pyspark/sql/_types.py b/python/pyspark/sql/_types.py
index b96851a174..629c3a9451 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,),