Github user 0x0FFF commented on a diff in the pull request: https://github.com/apache/spark/pull/8556#discussion_r38462716 --- Diff: python/pyspark/sql/types.py --- @@ -168,10 +168,12 @@ def needConversion(self): return True def toInternal(self, d): - return d and d.toordinal() - self.EPOCH_ORDINAL + if d is not None: --- End diff -- Sorry, I see. Should I revert this change? It is mostly for both methods to follow the same logic, as `return x and y` is not a very readable code in my opinion. Also the class `TimestampType` is implemented in a similar way - both methods are starting with input parameter check for None
--- If your project is set up for it, you can reply to this email and have your reply appear on GitHub as well. If your project does not have this feature enabled and wishes so, or if the feature is enabled but not working, please contact infrastructure at infrastruct...@apache.org or file a JIRA ticket with INFRA. --- --------------------------------------------------------------------- To unsubscribe, e-mail: reviews-unsubscr...@spark.apache.org For additional commands, e-mail: reviews-h...@spark.apache.org