HyukjinKwon commented on code in PR #42541:
URL: https://github.com/apache/spark/pull/42541#discussion_r1299533479


##########
python/pyspark/sql/types.py:
##########
@@ -442,7 +442,7 @@ def needConversion(self) -> bool:
 
     def toInternal(self, dt: datetime.timedelta) -> Optional[int]:
         if dt is not None:
-            return (math.floor(dt.total_seconds()) * 1000000) + dt.microseconds

Review Comment:
   BTW, do you know why and how it adds one more second though?



-- 
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: reviews-unsubscr...@spark.apache.org

For queries about this service, please contact Infrastructure at:
us...@infra.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: reviews-unsubscr...@spark.apache.org
For additional commands, e-mail: reviews-h...@spark.apache.org

Reply via email to