Github user cloud-fan commented on a diff in the pull request:

    https://github.com/apache/spark/pull/20163#discussion_r160086824
  
    --- 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 --
    
    seems what we need is a `case (c: Calendar, StringType) => ...`


---

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

Reply via email to