From issues-return-6740-archive-asf-public=cust-asf.ponee.io@phoenix.apache.org Thu May 9 22:12: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 C00E1180763 for ; Fri, 10 May 2019 00:12:02 +0200 (CEST) Received: (qmail 91540 invoked by uid 500); 9 May 2019 22:12:02 -0000 Mailing-List: contact issues-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 issues@phoenix.apache.org Received: (qmail 91430 invoked by uid 99); 9 May 2019 22:12: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; Thu, 09 May 2019 22:12: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 750B8E260C for ; Thu, 9 May 2019 22:12: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 D076125813 for ; Thu, 9 May 2019 22:12:00 +0000 (UTC) Date: Thu, 9 May 2019 22:12:00 +0000 (UTC) From: "Swaroopa Kadam (JIRA)" To: issues@phoenix.apache.org Message-ID: In-Reply-To: References: Subject: [jira] [Commented] (PHOENIX-5261) Implement ALTER TABLE ADD COLUMN CASCADE MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable X-JIRA-FingerPrint: 30527f35849b9dde25b450d4833f0394 [ https://issues.apache.org/jira/browse/PHOENIX-5261?page=3Dcom.atlassi= an.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=3D16= 836740#comment-16836740 ]=20 Swaroopa Kadam commented on PHOENIX-5261: ----------------------------------------- As of today =E2=80=93=C2=A0in splittable sys cat world, add column gets pro= pogated to all the child views without expecting CASCADE keyword.=C2=A0So, = CASCADE keyword is mainly=C2=A0for indexes only.=C2=A0 > Implement ALTER TABLE ADD COLUMN CASCADE > ---------------------------------------- > > Key: PHOENIX-5261 > URL: https://issues.apache.org/jira/browse/PHOENIX-5261 > Project: Phoenix > Issue Type: Improvement > Reporter: Geoffrey Jacoby > Assignee: Swaroopa Kadam > Priority: Major > > Phoenix currently gives no way to alter the columns in an index. This is = because adding a column to an index would require a full rebuild to cycle t= hrough the parent table and add the values to the index.=20 > There is a special case, however, when adding a column to an index would = be very useful and easy, and that is when adding a new nullable field to th= e index's parent table. In this case it is safe to just go ahead and add th= e column to the index, because at DDL time the field is known to be NULL on= each row.=20 > I propose adding an optional parameter CASCADE to ALTER TABLE ADD COLUMN,= which when used will do the following: > 1. The new column will be automatically added to any child views. > 2. The new column will be automatically added as an INCLUDED column in an= y secondary index belonging to the parent table.=20 > Outstanding questions: > 1. Does splittable system catalog already take care of Item 1? > 2. What about tenant-owned views? > 3. Should there be a way to exclude adding the column to a child index to= allow for uncovered usage? =20 -- This message was sent by Atlassian JIRA (v7.6.3#76005)