Uploaded image for project: 'Phoenix'
  1. Phoenix
  2. PHOENIX-2972

Index creation failed when tried created without tenantId on multi-tenant table view.

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Resolved
    • Major
    • Resolution: Duplicate
    • None
    • None
    • None
    • None

    Description

      PFB, reproduction steps

      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)
      
      

      Attachments

        Issue Links

          Activity

            People

              Unassigned Unassigned
              ankit.singhal Ankit Singhal
              Votes:
              0 Vote for this issue
              Watchers:
              1 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved: