cloud-fan commented on a change in pull request #34232:
URL: https://github.com/apache/spark/pull/34232#discussion_r728096644
##########
File path:
sql/catalyst/src/main/scala/org/apache/spark/sql/connector/catalog/CatalogManager.scala
##########
@@ -129,6 +131,14 @@ class CatalogManager(
}
}
+ def listCatalogs(pattern: Option[String]): Seq[String] = synchronized {
+ val result = new ArrayBuffer[String]
+ val allCatalogs = catalogs.keys.toSeq.sorted
+ val matched = pattern.map(StringUtils.filterPattern(allCatalogs,
_)).getOrElse(allCatalogs)
+ result ++= matched
+ result.toSeq
Review comment:
```suggestion
val allCatalogs = catalogs.keys.toSeq.sorted
pattern.map(StringUtils.filterPattern(allCatalogs,
_)).getOrElse(allCatalogs)
```
--
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]