imback82 commented on a change in pull request #34429:
URL: https://github.com/apache/spark/pull/34429#discussion_r739511298



##########
File path: 
sql/core/src/main/scala/org/apache/spark/sql/execution/datasources/v2/DescribeNamespaceExec.scala
##########
@@ -44,10 +44,13 @@ case class DescribeNamespaceExec(
     }
 
     if (isExtended) {
-      val properties = metadata.asScala -- 
CatalogV2Util.NAMESPACE_RESERVED_PROPERTIES
-      if (properties.nonEmpty) {
-        rows += toCatalystRow("Properties", properties.toSeq.mkString("(", 
",", ")"))
+      val properties = metadata.asScala.toMap -- 
CatalogV2Util.NAMESPACE_RESERVED_PROPERTIES

Review comment:
       Adding `toMap` similar to 
https://github.com/apache/spark/blob/8238cdd443d5bc8557f7e0e76f40c66bf8715c5a/sql/core/src/main/scala/org/apache/spark/sql/execution/datasources/v2/V2SessionCatalog.scala#L321.
   
   The Scala Map implementation uses a list underneath up to 4 elements and 
maintains it in the order it was inserted. So this make tests such as 
https://github.com/apache/spark/blob/8238cdd443d5bc8557f7e0e76f40c66bf8715c5a/sql/core/src/test/scala/org/apache/spark/sql/execution/command/DDLSuite.scala#L778
 pass.
   
   Maybe, just make the tests more robust?




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