cloud-fan commented on code in PR #36649:
URL: https://github.com/apache/spark/pull/36649#discussion_r882320141
##########
sql/core/src/main/scala/org/apache/spark/sql/execution/datasources/v2/jdbc/JDBCTableCatalog.scala:
##########
@@ -297,4 +300,21 @@ class JDBCTableCatalog extends TableCatalog with
SupportsNamespaces with Logging
private def getTableName(ident: Identifier): String = {
(ident.namespace() :+
ident.name()).map(dialect.quoteIdentifier).mkString(".")
}
+
+ override def listFunctions(namespace: Array[String]): Array[Identifier] = {
+ if (namespace.isEmpty || namespaceExists(namespace)) {
Review Comment:
hmm, do we really need to allow dialect to register functions with different
namespaces? Maybe we can require the dialect to return `Seq[(String,
UnboundFunction)]`, which means the function are always in the empty namspace,
and end-users need to call functions with catalog name and function name, e.g.
`SELECT h2.func1(...)`
--
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]