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 2016/01/23 03:47:39 UTC

[jira] [Updated] (PHOENIX-2340) Index creation on multi tenant table causes exception if tenant ID column referenced

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

James Taylor updated PHOENIX-2340:
----------------------------------
    Fix Version/s: 4.8.0

> Index creation on multi tenant table causes exception if tenant ID column referenced
> ------------------------------------------------------------------------------------
>
>                 Key: PHOENIX-2340
>                 URL: https://issues.apache.org/jira/browse/PHOENIX-2340
>             Project: Phoenix
>          Issue Type: Bug
>            Reporter: James Taylor
>             Fix For: 4.8.0
>
>
> If an index is attempted to be created on a multi-tenant table, an error occurs if the tenant ID column is referenced in the indexed columns. This is because it's already automatically included. However, it should not be an error if the user references it (as long as it's the first indexed column).
> To repro:
> {code}
> CREATE TABLE IF NOT EXISTS T (
>     ORGANIZATION_ID CHAR(15) NOT NULL,
>     NETWORK_ID CHAR(15) NOT NULL,
>     SUBJECT_ID CHAR(15) NOT NULL,
>     RUN_ID CHAR(15) NOT NULL,
>     SCORE DOUBLE,
>     TOPIC_ID CHAR(15) NOT NULL
>     CONSTRAINT PK PRIMARY KEY (
>         ORGANIZATION_ID,
>         NETWORK_ID,
>         SUBJECT_ID,
>         RUN_ID,
>         TOPIC_ID
>     )
> ) MULTI_TENANT=TRUE;
> CREATE INDEX IDX ON T (
>     ORGANIZATION_ID,
>     NETWORK_ID,
>     TOPIC_ID,
>     RUN_ID,
>     SCORE
> ) INCLUDE (
>     SUBJECT_ID
> );
> {code}



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