Skip to content

Commit

Permalink
sort by keys
Browse files Browse the repository at this point in the history
  • Loading branch information
imback82 committed Oct 31, 2021
1 parent 988187c commit 8da0022
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 7 deletions.
Expand Up @@ -191,7 +191,7 @@ case class DescribeDatabaseCommand(
if (properties.isEmpty) {
""
} else {
properties.toSeq.mkString("(", ", ", ")")
properties.toSeq.sortBy(_._1).mkString("(", ", ", ")")
}
result :+ Row("Properties", propertiesStr)
} else {
Expand Down
Expand Up @@ -44,12 +44,13 @@ case class DescribeNamespaceExec(
}

if (isExtended) {
val properties = metadata.asScala.toMap -- CatalogV2Util.NAMESPACE_RESERVED_PROPERTIES
val propertiesStr = if (properties.isEmpty) {
""
} else {
properties.toSeq.mkString("(", ", ", ")")
}
val properties = metadata.asScala -- CatalogV2Util.NAMESPACE_RESERVED_PROPERTIES
val propertiesStr =
if (properties.isEmpty) {
""
} else {
properties.toSeq.sortBy(_._1).mkString("(", ", ", ")")
}
rows += toCatalystRow("Properties", propertiesStr)
}
rows.toSeq
Expand Down

0 comments on commit 8da0022

Please sign in to comment.