Ankit Singhal created PHOENIX-2972:
--------------------------------------

             Summary: Index creation failed when tried created without tenantId 
on multi-tenant table view.
                 Key: PHOENIX-2972
                 URL: https://issues.apache.org/jira/browse/PHOENIX-2972
             Project: Phoenix
          Issue Type: Bug
            Reporter: Ankit Singhal


PFB, reproduction steps
{code}
CREATE TABLE MT_BASE (PK1 VARCHAR not null, PK2 VARCHAR not null, MYCF1.COL1 
varchar,MYCF2.COL2 varchar CONSTRAINT pk PRIMARY KEY(PK1,PK2)) 
MULTI_TENANT=true;
UPSERT INTO MT_BASE values ('a','b','c','d');
CREATE VIEW acme AS SELECT * FROM MT_BASE;
0: jdbc:phoenix:localhost> create index idx_acme on acme (COL1);
java.lang.NullPointerException
        at 
org.apache.phoenix.util.StringUtil.escapeBackslash(StringUtil.java:392)
        at 
org.apache.phoenix.compile.PostIndexDDLCompiler.compile(PostIndexDDLCompiler.java:79)
        at 
org.apache.phoenix.schema.MetaDataClient.buildIndex(MetaDataClient.java:1164)
        at 
org.apache.phoenix.schema.MetaDataClient.createIndex(MetaDataClient.java:1488)
        at 
org.apache.phoenix.compile.CreateIndexCompiler$1.execute(CreateIndexCompiler.java:85)
        at 
org.apache.phoenix.jdbc.PhoenixStatement$3.call(PhoenixStatement.java:343)
        at 
org.apache.phoenix.jdbc.PhoenixStatement$3.call(PhoenixStatement.java:1)
        at org.apache.phoenix.call.CallRunner.run(CallRunner.java:53)
        at 
org.apache.phoenix.jdbc.PhoenixStatement.executeMutation(PhoenixStatement.java:330)
        at 
org.apache.phoenix.jdbc.PhoenixStatement.execute(PhoenixStatement.java:1440)
        at sqlline.Commands.execute(Commands.java:822)
        at sqlline.Commands.sql(Commands.java:732)
        at sqlline.SqlLine.dispatch(SqlLine.java:807)
        at sqlline.SqlLine.begin(SqlLine.java:681)
        at sqlline.SqlLine.start(SqlLine.java:398)
        at sqlline.SqlLine.main(SqlLine.java:292)

{code}



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)

Reply via email to