You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@spark.apache.org by "Gengliang Wang (JIRA)" <ji...@apache.org> on 2019/03/25 14:50:00 UTC

[jira] [Created] (SPARK-27269) File source v2 should validate data schema only

Gengliang Wang created SPARK-27269:
--------------------------------------

             Summary: File source v2 should validate data schema only
                 Key: SPARK-27269
                 URL: https://issues.apache.org/jira/browse/SPARK-27269
             Project: Spark
          Issue Type: Task
          Components: SQL
    Affects Versions: 3.0.0
            Reporter: Gengliang Wang


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.





--
This message was sent by Atlassian JIRA
(v7.6.3#76005)

---------------------------------------------------------------------
To unsubscribe, e-mail: issues-unsubscribe@spark.apache.org
For additional commands, e-mail: issues-help@spark.apache.org