You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@calcite.apache.org by "itxiangkui (Jira)" <ji...@apache.org> on 2022/03/30 04:12:00 UTC

[jira] [Updated] (CALCITE-5071) Schema.getTableMap cannot handle tables with the same name in "Schema->SubSchema->Table" mode

     [ https://issues.apache.org/jira/browse/CALCITE-5071?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

itxiangkui updated CALCITE-5071:
--------------------------------
    Description: 
When I define catalog(schema)->database(subschema)->table three-level warehouse management mode, RootSchema is defined as Catalog, the example is as follows:
- es
    --db1
       ---table1
- mysql
    --db2
       ---table1
When I use the !tables command under Sqlline, that will trigger the call
getTableMap()
RootSchema.getTableNames()
RootSchema.getTable(String name)
three methods,
I extended RootSchema.getTableMap() and found that table1 with the same name will appear, then the !tables result set can only display one of the table items


Can we consider getTableMap() to return Guava Multimap and similar data structures....

  was:
When I define catalog(schema)->database(subschema)->table three-level warehouse management mode, RootSchema is defined as Catalog, the example is as follows:
- es
    --db1
       --- table1
- mysql
    --db2
       ---table1
When I use the !tables command under Sqlline, that will trigger the call
getTableMap()
RootSchema.getTableNames()
RootSchema.getTable(String name)
three methods,
I extended RootSchema.getTableMap() and found that table1 with the same name will appear, then the !tables result set can only display one of the table items


Can we consider getTableMap() to return Guava Multimap and similar data structures....


> Schema.getTableMap cannot handle tables with the same name in "Schema->SubSchema->Table" mode
> ---------------------------------------------------------------------------------------------
>
>                 Key: CALCITE-5071
>                 URL: https://issues.apache.org/jira/browse/CALCITE-5071
>             Project: Calcite
>          Issue Type: Improvement
>            Reporter: itxiangkui
>            Priority: Major
>
> When I define catalog(schema)->database(subschema)->table three-level warehouse management mode, RootSchema is defined as Catalog, the example is as follows:
> - es
>     --db1
>        ---table1
> - mysql
>     --db2
>        ---table1
> When I use the !tables command under Sqlline, that will trigger the call
> getTableMap()
> RootSchema.getTableNames()
> RootSchema.getTable(String name)
> three methods,
> I extended RootSchema.getTableMap() and found that table1 with the same name will appear, then the !tables result set can only display one of the table items
> Can we consider getTableMap() to return Guava Multimap and similar data structures....



--
This message was sent by Atlassian Jira
(v8.20.1#820001)