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

Xuefu Zhang commented on FLINK-6574:
------------------------------------

I understand this is an old JIRA, but going retrospective, I think this has a 
big issue. Since TableEnvironment allows for multiple catalogs, each may have a 
number of databases. If any of the databases are named the same, say "test_db", 
then an ambiguity is created. That is, which "test_db" the following query is 
referring to:
{code}
select * from test_db.mytable;
{code}
I even believe that Calcite may not allow multiple subschemas with the same 
name.

In summary, I think the changes made here need to be revisited at least.

> 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, 1.4.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
(v7.6.3#76005)

Reply via email to