Peng-Lei commented on a change in pull request #35131:
URL: https://github.com/apache/spark/pull/35131#discussion_r780871992



##########
File path: 
sql/catalyst/src/main/scala/org/apache/spark/sql/catalyst/catalog/interface.scala
##########
@@ -384,9 +384,12 @@ case class CatalogTable(
   def toLinkedHashMap: mutable.LinkedHashMap[String, String] = {
     val map = new mutable.LinkedHashMap[String, String]()
     val tableProperties = properties
-      .filterKeys(!_.startsWith(VIEW_PREFIX))
+      .filter(!_._1.startsWith(VIEW_PREFIX))
+      .filter(kv => !CatalogV2Util.TABLE_RESERVED_PROPERTIES.contains(kv._1))
+      .filter(!_._1.startsWith(TableCatalog.OPTION_PREFIX))
+      .filter(_._1 != TableCatalog.PROP_EXTERNAL)
       .toSeq.sortBy(_._1)
-      .map(p => p._1 + "=" + p._2).mkString("[", ", ", "]")

Review comment:
       original code
   ```scala
   val tableProperties = properties
         .filterKeys(!_.startsWith(VIEW_PREFIX))
         .toSeq.sortBy(_._1)
         .map(p => p._1 + "=" + p._2).mkString("[", ", ", "]")
   ...
   if (properties.nonEmpty) map.put("Table Properties", tableProperties) // 
Here I think it is more reasonable to judge the empty of tablePropertie, but it 
is string "[]", not empty.
   ```




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