You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@phoenix.apache.org by "James Taylor (JIRA)" <ji...@apache.org> on 2018/06/29 13:00:00 UTC

[jira] [Resolved] (PHOENIX-4801) Tables with dot in their names can not have indexes.

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

James Taylor resolved PHOENIX-4801.
-----------------------------------
    Resolution: Duplicate

Duplicate of PHOENIX-4800

> Tables with dot in their names can not have indexes.
> ----------------------------------------------------
>
>                 Key: PHOENIX-4801
>                 URL: https://issues.apache.org/jira/browse/PHOENIX-4801
>             Project: Phoenix
>          Issue Type: Bug
>            Reporter: Janos Gub
>            Priority: Major
>
> When creating a table like:
> CREATE TABLE "A.B" (x INTEGER PRIMARY KEY);
> When trying to create an index on this table with the following:
> CREATE VIEW myview AS SELECT * FROM "A.B";
> The following exception occures:
> {code}
> Error: ERROR 1012 (42M03): Table undefined. tableName=A.B (state=42M03,code=1012)
> org.apache.phoenix.schema.TableNotFoundException: ERROR 1012 (42M03): Table undefined. tableName=A.B
>  at org.apache.phoenix.schema.MetaDataClient.createTableInternal(MetaDataClient.java:2741)
>  at org.apache.phoenix.schema.MetaDataClient.createTable(MetaDataClient.java:1114)
>  at org.apache.phoenix.compile.CreateTableCompiler$1.execute(CreateTableCompiler.java:192)
>  at org.apache.phoenix.jdbc.PhoenixStatement$2.call(PhoenixStatement.java:408)
>  at org.apache.phoenix.jdbc.PhoenixStatement$2.call(PhoenixStatement.java:391)
>  at org.apache.phoenix.call.CallRunner.run(CallRunner.java:53)
>  at org.apache.phoenix.jdbc.PhoenixStatement.executeMutation(PhoenixStatement.java:390)
>  at org.apache.phoenix.jdbc.PhoenixStatement.executeMutation(PhoenixStatement.java:378)
>  at org.apache.phoenix.jdbc.PhoenixStatement.execute(PhoenixStatement.java:1825)
>  at sqlline.Commands.execute(Commands.java:822)
>  at sqlline.Commands.sql(Commands.java:732)
>  at sqlline.SqlLine.dispatch(SqlLine.java:813)
>  at sqlline.SqlLine.begin(SqlLine.java:686)
>  at sqlline.SqlLine.start(SqlLine.java:398)
>  at sqlline.SqlLine.main(SqlLine.java:291)
> {code}
>  The problem is, that MetadataEndpointImpl.getPhysicalTableRowForView will try to determine the schema from the full name of the table (there is no schema in this case!) and it will infer a bad schema. I think it can also hit namespace mapped usecases as the table in this example does not have schema at all.



--
This message was sent by Atlassian JIRA
(v7.6.3#76005)