[
https://issues.apache.org/jira/browse/FLINK-6574?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=16013608#comment-16013608
]
ASF GitHub Bot commented on FLINK-6574:
---------------------------------------
Github user KurtYoung commented on a diff in the pull request:
https://github.com/apache/flink/pull/3913#discussion_r116919169
--- Diff:
flink-libraries/flink-table/src/main/scala/org/apache/flink/table/catalog/ExternalCatalogTable.scala
---
@@ -37,25 +36,10 @@ import org.apache.flink.table.plan.stats.TableStats
* @param lastAccessTime Timestamp of last access of the table
*/
case class ExternalCatalogTable(
- identifier: TableIdentifier,
--- End diff --
If we don't have table identifier or table name, the `TableSourceConverter`
will not work when trying to convert `ExternalCatalogTable` to a real
`TableSource`.
Even if we keep the table name, i'm not sure it will work for all
situations. For example, if we have an outside catalog which have the notion of
database, like MySQL. Table in that catalog will named as "db1.table1" or
"db2.table2". In the new design, normally we should add database as the sub
catalog of the root catalog. So we can create "table1" from sub-catalog named
"db1". The problem is the table name is assigned as "table1", we loose the
information that this table actually comes from "db1". This may cause some
problems when the TableSource trying to establish connection or trying to get
table information from outside catalog.
> 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)