Skip to content

Commit 2c646a5

Browse files
committed
make all datetime types consistent with JVM type classes
1 parent 5b67a79 commit 2c646a5

File tree

1 file changed

+4
-0
lines changed

1 file changed

+4
-0
lines changed

python/pyspark/sql/types.py

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -368,8 +368,10 @@ class BooleanType(AtomicType, metaclass=DataTypeSingleton):
368368

369369
pass
370370

371+
371372
class DatetimeType(AtomicType):
372373
"""Super class of ass datetime data type."""
374+
373375
def needConversion(self) -> bool:
374376
return True
375377

@@ -390,8 +392,10 @@ def fromInternal(self, v: int) -> datetime.date:
390392

391393
class AnyTimeType(DatetimeType):
392394
"""A TIME type of any valid precision."""
395+
393396
pass
394397

398+
395399
class TimeType(AnyTimeType):
396400
"""Time (datetime.time) data type."""
397401

0 commit comments

Comments
 (0)