gengliangwang commented on code in PR #40776:
URL: https://github.com/apache/spark/pull/40776#discussion_r1166247807


##########
sql/catalyst/src/main/scala/org/apache/spark/sql/catalyst/util/package.scala:
##########
@@ -225,4 +226,20 @@ package object util extends Logging {
       }
     }
   }
+
+  val AUTO_GENERATED_ALIAS = "__autoGeneratedAlias"
+
+  def removeInternalMetadata(schema: StructType): StructType = {
+    StructType(schema.map { field =>
+      val newMetadata = new MetadataBuilder().withMetadata(field.metadata)
+        .remove(METADATA_COL_ATTR_KEY)

Review Comment:
   Nit: shalll we define an array for all the internal metadata
   E.g.
   ```
   val internalMetaData = Seq(
     METADATA_COL_ATTR_KEY,
     QUALIFIED_ACCESS_ONLY,
     ...
   ```



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