gengliangwang opened a new pull request #24203: [SPARK-27269][SQL] File source 
v2 should validate data schema only
URL: https://github.com/apache/spark/pull/24203
 
 
   ## What changes were proposed in this pull request?
   
   Currently, File source v2 allows each data source to specify the supported 
data types by implementing the method `supportsDataType` in `FileScan` and 
`FileWriteBuilder`.
   
   However, in the read path, the validation checks all the data types in 
`readSchema`, which might contain partition columns. This is actually a 
regression. E.g. Text data source only supports String data type, while the 
partition columns can still contain Integer type since partition columns are 
processed by Spark.
   
   This PR is to:
   1. Refactor schema validation and check data schema only.
   2. Filter the partition columns in data schema if user specified schema 
provided.
   
   ## How was this patch tested?
   
    Unit 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.
 
For queries about this service, please contact Infrastructure at:
[email protected]


With regards,
Apache Git Services

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

Reply via email to