[ 
https://issues.apache.org/jira/browse/FLINK-6574?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=16012228#comment-16012228
 ] 

ASF GitHub Bot commented on FLINK-6574:
---------------------------------------

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

    https://github.com/apache/flink/pull/3913#discussion_r116721391
  
    --- Diff: 
flink-libraries/flink-table/src/main/scala/org/apache/flink/table/catalog/ExternalCatalog.scala
 ---
    @@ -34,41 +34,33 @@ trait ExternalCatalog {
       /**
         * Get a table from the catalog
         *
    -    * @param dbName    The name of the table's database.
         * @param tableName The name of the table.
    -    * @throws DatabaseNotExistException thrown if the database does not 
exist in the catalog.
         * @throws TableNotExistException    thrown if the table does not exist 
in the catalog.
         * @return the requested table
         */
    -  @throws[DatabaseNotExistException]
       @throws[TableNotExistException]
    -  def getTable(dbName: String, tableName: String): ExternalCatalogTable
    +  def getTable(tableName: String): ExternalCatalogTable
     
       /**
         * Get a list of all table names of a database in the catalog.
         *
    -    * @param dbName The name of the database.
    -    * @throws DatabaseNotExistException thrown if the database does not 
exist in the catalog
         * @return The list of table names
         */
    -  @throws[DatabaseNotExistException]
    -  def listTables(dbName: String): JList[String]
    +  def listTables(): JList[String]
     
       /**
         * Gets a database from the catalog.
         *
    -    * @param dbName The name of the database.
    -    * @throws DatabaseNotExistException thrown if the database does not 
exist in the catalog
         * @return The requested database
         */
       @throws[DatabaseNotExistException]
    -  def getDatabase(dbName: String): ExternalCatalogDatabase
    +  def getSubCatalog(dbName: String): ExternalCatalog
     
       /**
         * Gets a list of all databases in the catalog.
         *
         * @return The list of database names
         */
    -  def listDatabases(): JList[String]
    +  def listSubCatalog(): JList[String]
    --- End diff --
    
    +s `listSubCatalogs()`


> Support nested catalogs in ExternalCatalog
> ------------------------------------------
>
>                 Key: FLINK-6574
>                 URL: https://issues.apache.org/jira/browse/FLINK-6574
>             Project: Flink
>          Issue Type: Bug
>          Components: Table API & SQL
>            Reporter: Haohui Mai
>            Assignee: Haohui Mai
>            Priority: Critical
>             Fix For: 1.3.0
>
>
> We found out that the current external catalog requires three layers of 
> references for any tables. For example, the SQL would look like the following 
> when referencing external table:
> {noformat}
> SELECT * FROM catalog.db.table
> {noformat}
> It would be great to support only two layers of indirections which is closer 
> to many of the deployment on Presto / Hive today.
> {noformat}
> SELECT * FROM db.table
> {noformat}



--
This message was sent by Atlassian JIRA
(v6.3.15#6346)

Reply via email to