Github user HyukjinKwon commented on a diff in the pull request:
https://github.com/apache/spark/pull/19459#discussion_r150206108
--- Diff: python/pyspark/serializers.py ---
@@ -225,11 +232,11 @@ def _create_batch(series):
# If a nullable integer series has been promoted to floating point
with NaNs, need to cast
# NOTE: this is not necessary with Arrow >= 0.7
def cast_series(s, t):
- if type(t) == pa.TimestampType:
+ if t is not None and type(t) == pa.TimestampType:
--- End diff --
Hm, mind asking why `t is not None` is added? I thought `None` is
`NoneType` and won't be `pa.TimestampType` anyway.
---
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]