Github user beyond1920 commented on a diff in the pull request:

    https://github.com/apache/flink/pull/3409#discussion_r106368614
  
    --- Diff: 
flink-libraries/flink-table/src/main/scala/org/apache/flink/table/api/TableEnvironment.scala
 ---
    @@ -246,6 +251,36 @@ abstract class TableEnvironment(val config: 
TableConfig) {
       }
     
       /**
    +    * Registers a [[ExternalCatalog]] under a unique name in the 
TableEnvironment's catalog.
    +    * The databases and tables in the registered external catalog can be 
referenced in SQL queries.
    +    *
    +    * @param name            The name under which the externalCatalog will 
be registered.
    +    * @param externalCatalog The externalCatalog to register.
    +    */
    +  def registerExternalCatalog(name: String, externalCatalog: 
ExternalCatalog): Unit = {
    +    if (this.externalCatalogs.contains(name)) {
    +      throw new ExternalCatalogAlreadyExistException(name)
    +    }
    +    this.externalCatalogs.put(name, externalCatalog)
    +    // create an external catalog calicte schema, register it on the root 
schema
    +    ExternalCatalogSchema.create(rootSchema, name, externalCatalog)
    +  }
    +
    +  /**
    +    * Gets a registered [[ExternalCatalog]] by name
    +    *
    +    * @param name The name under which the externalCatalog was previous 
registered.
    +    * @return the externalCatalog found by name
    +    */
    +  def getRegisteredExternalCatalog(name: String): ExternalCatalog = {
    --- End diff --
    
    We may need to look up the registered catalog to call create/update/delete 
table or database method.


---
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 infrastruct...@apache.org or file a JIRA ticket
with INFRA.
---

Reply via email to