Github user gatorsmile commented on a diff in the pull request:
https://github.com/apache/spark/pull/14883#discussion_r77113302
--- Diff:
sql/catalyst/src/main/scala/org/apache/spark/sql/catalyst/catalog/ExternalCatalog.scala
---
@@ -184,4 +184,9 @@ abstract class ExternalCatalog {
def listFunctions(db: String, pattern: String): Seq[String]
+ //
--------------------------------------------------------------------------
+ // Resources
+ //
--------------------------------------------------------------------------
+
+ def addJar(path: String): Unit
--- End diff --
Add a resource to the underlying Hive metastore for DDL operations
For example, if we do not use HiveClient to pass the `ADD JAR` command to
Hive metastore, we are unable to create the table. Thus, it sounds fine to put
`addJar` into `ExternalCatalog`.
```Scala
val testJar =
TestHive.getHiveFile("hive-hcatalog-core-0.13.1.jar").getCanonicalPath
sql(s"ADD JAR $testJar")
sql(
"""
|CREATE TABLE t1(a string, b string)
|ROW FORMAT SERDE 'org.apache.hive.hcatalog.data.JsonSerDe'
""".stripMargin)
```
---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at [email protected] or file a JIRA ticket
with INFRA.
---
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]