HyukjinKwon commented on a change in pull request #34614:
URL: https://github.com/apache/spark/pull/34614#discussion_r751278057



##########
File path: 
sql/core/src/main/scala/org/apache/spark/sql/execution/python/EvaluatePython.scala
##########
@@ -137,11 +137,12 @@ object EvaluatePython {
       case c: Int => c
     }
 
-    case TimestampType | TimestampNTZType => (obj: Any) => 
nullSafeConvert(obj) {
-      case c: Long => c
-      // Py4J serializes values between MIN_INT and MAX_INT as Ints, not Longs
-      case c: Int => c.toLong
-    }
+    case TimestampType | TimestampNTZType | _: DayTimeIntervalType => (obj: 
Any) =>

Review comment:
       e.g.) PySpark reads internal data format of `DayTimeIntervalType` as 
`Long`, and convert it to Python instances at 
https://github.com/apache/spark/pull/34614/files#diff-bb02965370d515ec7add7967bc949c18c88ffc7346cceaebefb84907dfdce903R376
 for both createDataFrame and Python UDF




-- 
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