Github user HyukjinKwon commented on a diff in the pull request:

    https://github.com/apache/spark/pull/20163#discussion_r160094816
  
    --- Diff: 
sql/core/src/main/scala/org/apache/spark/sql/execution/python/EvaluatePython.scala
 ---
    @@ -120,10 +121,18 @@ object EvaluatePython {
         case (c: java.math.BigDecimal, dt: DecimalType) => Decimal(c, 
dt.precision, dt.scale)
     
         case (c: Int, DateType) => c
    +    // Pyrolite will unpickle a Python datetime.date to a 
java.util.Calendar
    +    case (c: Calendar, DateType) => 
DateTimeUtils.fromJavaCalendarForDate(c)
    --- End diff --
    
    I think he did this in Python side because here we don't know if `Calendar` 
is from `datetime.date` or `datetime.datetime`.


---

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

Reply via email to