You are viewing a plain text version of this content. The canonical link for it is here.
Posted to reviews@spark.apache.org by GitBox <gi...@apache.org> on 2021/07/20 08:00:43 UTC
[GitHub] [spark] AngersZhuuuu commented on a change in pull request #33409: [SPARK-36201][SQL][FOLLOWUP] Schema check should check inner field too
AngersZhuuuu commented on a change in pull request #33409:
URL: https://github.com/apache/spark/pull/33409#discussion_r672896677
##########
File path: sql/core/src/main/scala/org/apache/spark/sql/execution/datasources/orc/OrcFileFormat.scala
##########
@@ -52,8 +52,13 @@ private[sql] object OrcFileFormat {
}
}
- def checkFieldNames(names: Seq[String]): Unit = {
- names.foreach(checkFieldName)
+ def checkFieldNames(schema: StructType): Unit = {
+ schema.foreach {
Review comment:
Done
##########
File path: sql/core/src/main/scala/org/apache/spark/sql/execution/datasources/parquet/ParquetSchemaConverter.scala
##########
@@ -593,8 +593,13 @@ private[sql] object ParquetSchemaConverter {
""".stripMargin.split("\n").mkString(" ").trim)
}
- def checkFieldNames(names: Seq[String]): Unit = {
- names.foreach(checkFieldName)
+ def checkFieldNames(schema: StructType): Unit = {
+ schema.foreach {
+ case field if field.dataType.isInstanceOf[StructType] =>
+ checkFieldName(field.name)
+ checkFieldNames(field.dataType.asInstanceOf[StructType])
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: reviews-unsubscribe@spark.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: reviews-unsubscribe@spark.apache.org
For additional commands, e-mail: reviews-help@spark.apache.org