From dev-return-56844-archive-asf-public=cust-asf.ponee.io@phoenix.apache.org Mon Jun 3 00:58:03 2019 Return-Path: X-Original-To: archive-asf-public@cust-asf.ponee.io Delivered-To: archive-asf-public@cust-asf.ponee.io Received: from mail.apache.org (hermes.apache.org [207.244.88.153]) by mx-eu-01.ponee.io (Postfix) with SMTP id 50D1418064E for ; Mon, 3 Jun 2019 02:58:03 +0200 (CEST) Received: (qmail 77833 invoked by uid 500); 3 Jun 2019 00:58:02 -0000 Mailing-List: contact dev-help@phoenix.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: dev@phoenix.apache.org Delivered-To: mailing list dev@phoenix.apache.org Received: (qmail 77822 invoked by uid 99); 3 Jun 2019 00:58:02 -0000 Received: from mailrelay1-us-west.apache.org (HELO mailrelay1-us-west.apache.org) (209.188.14.139) by apache.org (qpsmtpd/0.29) with ESMTP; Mon, 03 Jun 2019 00:58:02 +0000 Received: from jira-lw-us.apache.org (unknown [207.244.88.139]) by mailrelay1-us-west.apache.org (ASF Mail Server at mailrelay1-us-west.apache.org) with ESMTP id BDBABE29B6 for ; Mon, 3 Jun 2019 00:58:01 +0000 (UTC) Received: from jira-lw-us.apache.org (localhost [127.0.0.1]) by jira-lw-us.apache.org (ASF Mail Server at jira-lw-us.apache.org) with ESMTP id D37082459C for ; Mon, 3 Jun 2019 00:58:00 +0000 (UTC) Date: Mon, 3 Jun 2019 00:58:00 +0000 (UTC) From: "Swaroopa Kadam (JIRA)" To: dev@phoenix.apache.org Message-ID: In-Reply-To: References: Subject: [jira] [Assigned] (PHOENIX-2340) Index creation on multi tenant table causes exception if tenant ID column referenced MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 7bit X-JIRA-FingerPrint: 30527f35849b9dde25b450d4833f0394 [ https://issues.apache.org/jira/browse/PHOENIX-2340?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ] Swaroopa Kadam reassigned PHOENIX-2340: --------------------------------------- Assignee: (was: Swaroopa Kadam) > 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 > Priority: Major > > 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 (v7.6.3#76005)