From issues-return-6843-archive-asf-public=cust-asf.ponee.io@phoenix.apache.org Thu May 16 05:22:02 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 CDC72180621 for ; Thu, 16 May 2019 07:22:01 +0200 (CEST) Received: (qmail 32461 invoked by uid 500); 16 May 2019 05:22:01 -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 32444 invoked by uid 99); 16 May 2019 05:22:01 -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, 16 May 2019 05:22:01 +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 5DEF7E050B for ; Thu, 16 May 2019 05:22:00 +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 162F824597 for ; Thu, 16 May 2019 05:22:00 +0000 (UTC) Date: Thu, 16 May 2019 05:22:00 +0000 (UTC) From: "Thomas D'Silva (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: 7bit X-JIRA-FingerPrint: 30527f35849b9dde25b450d4833f0394 [ https://issues.apache.org/jira/browse/PHOENIX-5261?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=16840990#comment-16840990 ] Thomas D'Silva commented on PHOENIX-5261: ----------------------------------------- For non diverged views (where you didn't drop a column inherited from the base table) adding a column to a parent will propagate to all child views (including tenant specific ones). Maybe the syntax should be CASCADE_INDEX to make clear that the column will be added to indexes. > 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 > Time Spent: 0.5h > Remaining Estimate: 0h > > 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 through the parent table and add the values to the index. > 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 the index's parent table. In this case it is safe to just go ahead and add the column to the index, because at DDL time the field is known to be NULL on each row. > 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 any secondary index belonging to the parent table. > 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? -- This message was sent by Atlassian JIRA (v7.6.3#76005)