aokolnychyi commented on code in PR #56619:
URL: https://github.com/apache/spark/pull/56619#discussion_r3464895582


##########
sql/catalyst/src/main/scala/org/apache/spark/sql/util/SchemaUtils.scala:
##########
@@ -522,6 +534,39 @@ private[spark] object SchemaUtils {
       fields.map(field => field.name.toLowerCase(Locale.ROOT) -> field).toMap
     }
   }
+
+  /**
+   * Recursively removes field IDs from a data type. Only allocates new 
objects when a field ID
+   * is actually present, returning the original instance unchanged when there 
is nothing to strip.
+   */
+  def removeFieldIds(dataType: DataType): DataType = dataType match {
+    case s: StructType =>
+      StructType(s.fields.map { field =>

Review Comment:
   I relaxed the comment.



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