mihailom-db opened a new pull request, #50079:
URL: https://github.com/apache/spark/pull/50079

   ### What changes were proposed in this pull request?
   Making createDataFrame use lenient Encoder for serialization.
   
   
   ### Why are the changes needed?
   Passing Rows is something defined by users, so if we do not allow this, we 
would fail queries like this.
   ```
   val schema = new org.apache.spark.sql.types.StructType().add("a", "date")
   val rdd = spark.sparkContext.parallelize(
   org.apache.spark.sql.Row(java.time.LocalDate.of(2020, 5, 13)) :: Nil)
   spark.createDataFrame(rdd, schema).collect() 
   ```
   
   
   ### Does this PR introduce _any_ user-facing change?
   Yes.
   The change is that we fix failing queries when we try to read Date/LocalDate 
independent of java8API config value.
   
   
   ### How was this patch tested?
   Added appropriate tests.
   
   
   ### Was this patch authored or co-authored using generative AI tooling?
   No.
   


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