huaxingao commented on a change in pull request #33531:
URL: https://github.com/apache/spark/pull/33531#discussion_r677853345



##########
File path: 
sql/core/src/main/scala/org/apache/spark/sql/execution/datasources/parquet/ParquetWriteSupport.scala
##########
@@ -482,7 +482,7 @@ object ParquetWriteSupport {
   val SPARK_ROW_SCHEMA: String = "org.apache.spark.sql.parquet.row.attributes"
 
   def setSchema(schema: StructType, configuration: Configuration): Unit = {
-    schema.map(_.name).foreach(ParquetSchemaConverter.checkFieldName)
+    ParquetSchemaConverter.checkFieldNames(schema)

Review comment:
       The change looks good. I just have a quick question: I saw your other PR 
refactor the code to unify the schema check for avro/parquet/orc in DDL. Should 
this setSchema and inner field check code be refactored and unified too for 
avro and ocr?




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

Reply via email to