AngersZhuuuu commented on a change in pull request #33441:
URL: https://github.com/apache/spark/pull/33441#discussion_r677387147
##########
File path:
sql/core/src/main/scala/org/apache/spark/sql/execution/datasources/DataSourceUtils.scala
##########
@@ -58,6 +58,22 @@ object DataSourceUtils {
Serialization.read[Seq[String]](str)
}
+ /**
+ * Verify if the field name is supported in datasource. This verification
should be done
+ * in a drover side.
Review comment:
DOne
##########
File path:
sql/core/src/main/scala/org/apache/spark/sql/execution/datasources/FileFormat.scala
##########
@@ -163,6 +163,14 @@ trait FileFormat {
* By default all data types are supported.
*/
def supportDataType(dataType: DataType): Boolean = true
+
+
+ /**
+ * Check whether target schema field name is valid.
+ *
+ * @throws AnalysisException If field name is invalid
Review comment:
Done
##########
File path:
external/avro/src/main/scala/org/apache/spark/sql/avro/AvroFileFormat.scala
##########
@@ -51,9 +51,9 @@ private[sql] class AvroFileFormat extends FileFormat
override def hashCode(): Int = super.hashCode()
override def inferSchema(
- spark: SparkSession,
- options: Map[String, String],
- files: Seq[FileStatus]): Option[StructType] = {
+ spark: SparkSession,
Review comment:
Done
--
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]