itholic commented on code in PR #37647:
URL: https://github.com/apache/spark/pull/37647#discussion_r955833929


##########
python/pyspark/sql/types.py:
##########
@@ -176,14 +177,36 @@ def needConversion(self):
 
     def toInternal(self, dt):
         if dt is not None:
-            seconds = (calendar.timegm(dt.utctimetuple()) if dt.tzinfo
-                       else time.mktime(dt.timetuple()))
+            if platform.system().lower() == "windows":
+                """
+                On Windows, the current value is converted to a timestamp
+                when the current value is less than 1970
+                """

Review Comment:
   docstring should be placed at the top of the function.
   
   I think we can just leave the multi-line comments in this case.



##########
python/pyspark/sql/types.py:
##########
@@ -498,20 +521,20 @@ def __init__(self, fields=None):
 
     def add(self, field, data_type=None, nullable=True, metadata=None):
         """
-        Construct a :class:`StructType` by adding new elements to it, to 
define the schema.
+        Construct a StructType by adding new elements to it, to define the 
schema.

Review Comment:
   qq: Why do we change this ?



-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]


---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to