title: When are custom TableCatalogs loaded?
body: <p>I've created a custom Catalog in Spark 3.0.0:<br />
  <code>class ExCatalogPlugin extends SupportsNamespaces with TableCatalog</code></p>
  <p>I've provided the configuration asking Spark to load the Catalog:<br />
  <code>.config(&quot;spark.sql.catalog.ex&quot;, &quot;com.test.ExCatalogPlugin&quot;)</code></p>
  <p>But Spark never loads the plugin, during debug no breakpoints are ever hit inside the <code>initialize</code> method, and none of the namespaces it exposes are recognized.  There are also no error messages logged.  If I change the class name to an invalid class name no errors are thrown either.</p>
  <p>I wrote a small TEST case similar to the test cases in the Spark code, and I am able to load the plugin if I call:</p>
  <pre class="lang-scala prettyprint-override"><code>package org.apache.spark.sql.connector.catalog
  ....
  class CatalogsTest extends FunSuite {
      test(&quot;EX&quot;) {
          val conf = new SQLConf()
          conf.setConfString(&quot;spark.sql.catalog.ex&quot;, &quot;com.test.ExCatalogPlugin&quot;)
          val plugin:CatalogPlugin = Catalogs.load(&quot;ex&quot;, conf)
      }
  }
  </code></pre>