phoenix-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Janos Gub (JIRA)" <j...@apache.org>
Subject [jira] [Created] (PHOENIX-4801) Tables with dot in their names can not have indexes.
Date Fri, 29 Jun 2018 12:44:00 GMT
Janos Gub created PHOENIX-4801:
----------------------------------

             Summary: 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


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=U.I (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)

Mime
View raw message