Return-Path: X-Original-To: apmail-phoenix-dev-archive@minotaur.apache.org Delivered-To: apmail-phoenix-dev-archive@minotaur.apache.org Received: from mail.apache.org (hermes.apache.org [140.211.11.3]) by minotaur.apache.org (Postfix) with SMTP id 1268D11BEC for ; Fri, 2 May 2014 05:22:41 +0000 (UTC) Received: (qmail 60848 invoked by uid 500); 2 May 2014 05:22:40 -0000 Delivered-To: apmail-phoenix-dev-archive@phoenix.apache.org Received: (qmail 60764 invoked by uid 500); 2 May 2014 05:22:39 -0000 Mailing-List: contact dev-help@phoenix.incubator.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: dev@phoenix.incubator.apache.org Delivered-To: mailing list dev@phoenix.incubator.apache.org Received: (qmail 60748 invoked by uid 99); 2 May 2014 05:22:38 -0000 Received: from nike.apache.org (HELO nike.apache.org) (192.87.106.230) by apache.org (qpsmtpd/0.29) with ESMTP; Fri, 02 May 2014 05:22:38 +0000 X-ASF-Spam-Status: No, hits=-2000.7 required=5.0 tests=ALL_TRUSTED,RP_MATCHES_RCVD X-Spam-Check-By: apache.org Received: from [140.211.11.3] (HELO mail.apache.org) (140.211.11.3) by apache.org (qpsmtpd/0.29) with SMTP; Fri, 02 May 2014 05:22:38 +0000 Received: (qmail 60218 invoked by uid 99); 2 May 2014 05:22:14 -0000 Received: from arcas.apache.org (HELO arcas.apache.org) (140.211.11.28) by apache.org (qpsmtpd/0.29) with ESMTP; Fri, 02 May 2014 05:22:14 +0000 Date: Fri, 2 May 2014 05:22:14 +0000 (UTC) From: "James Taylor (JIRA)" To: dev@phoenix.incubator.apache.org Message-ID: In-Reply-To: References: Subject: [jira] [Commented] (PHOENIX-940) Unique Constraint MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 7bit X-JIRA-FingerPrint: 30527f35849b9dde25b450d4833f0394 X-Virus-Checked: Checked by ClamAV on apache.org [ https://issues.apache.org/jira/browse/PHOENIX-940?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13987345#comment-13987345 ] James Taylor commented on PHOENIX-940: -------------------------------------- So you'd like to be able to add to the PK for a VIEW, right? The reason is that you don't want the row with the same entity_id to be updated again and again, but you'd rather maintain all of those versions as independent/separate rows. Is that correct, [~elilevine]? > Unique Constraint > ----------------- > > Key: PHOENIX-940 > URL: https://issues.apache.org/jira/browse/PHOENIX-940 > Project: Phoenix > Issue Type: New Feature > Reporter: Eli Levine > > Add support for UNIQUE constraint on one or more columns in CREATE and ALTER TABLE statements: > {code} > CONSTRAINT constraint_name UNIQUE (column1, column2, . column_n) > {code} > One possible way to implement this is by adding a secondary index on columns involved in the constraint and adding a check for column values before upsert. -- This message was sent by Atlassian JIRA (v6.2#6252)