karenfeng opened a new pull request #35158:
URL: https://github.com/apache/spark/pull/35158


   ### What changes were proposed in this pull request?
   
   Ignores the metadata when comparing the user-provided schema and the actual 
schema during BaseRelation resolution.
   
   ### Why are the changes needed?
   
   Makes it possible to read tables with Spark 3.2 that were written with Spark 
3.1, as 
https://github.com/apache/spark/blob/bd24b4884b804fc85a083f82b864823851d5980c/sql/core/src/main/scala/org/apache/spark/sql/execution/datasources/jdbc/JdbcUtils.scala#L312
 added a new metadata field that broke compatibility.
   
   ### Does this PR introduce _any_ user-facing change?
   
   Yes. Previously, an error was thrown when a SQL table written with JDBC in 
Spark 3.1 was read in Spark 3.2. Now, no error is thrown.
   
   ### How was this patch tested?
   
   Unit test and manual test
   


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