dongjoon-hyun commented on a change in pull request #24203: [SPARK-27269][SQL] 
File source v2 should validate data schema only
URL: https://github.com/apache/spark/pull/24203#discussion_r268952963
 
 

 ##########
 File path: 
sql/core/src/main/scala/org/apache/spark/sql/execution/datasources/v2/FileScan.scala
 ##########
 @@ -76,13 +60,5 @@ abstract class FileScan(
     partitions.toArray
   }
 
-  override def toBatch: Batch = {
-    readSchema.foreach { field =>
-      if (!supportsDataType(field.dataType)) {
-        throw new AnalysisException(
-          s"$formatName data source does not support 
${field.dataType.catalogString} data type.")
-      }
-    }
-    this
-  }
 
 Review comment:
   Shall we update the `import` according to this deletions?
   ```scala
   -import org.apache.spark.sql.{AnalysisException, SparkSession}
   +import org.apache.spark.sql.SparkSession
    import org.apache.spark.sql.execution.PartitionedFileUtil
    import org.apache.spark.sql.execution.datasources._
    import org.apache.spark.sql.sources.v2.reader.{Batch, InputPartition, Scan}
   -import org.apache.spark.sql.types.{DataType, StructType}
   +import org.apache.spark.sql.types.StructType
    import org.apache.spark.sql.util.CaseInsensitiveStringMap
   ```

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