phoenix-issues mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "James Taylor (JIRA)" <j...@apache.org>
Subject [jira] [Commented] (PHOENIX-5261) Implement ALTER TABLE ADD COLUMN CASCADE
Date Thu, 16 May 2019 17:23:00 GMT

    [ https://issues.apache.org/jira/browse/PHOENIX-5261?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=16841557#comment-16841557
] 

James Taylor commented on PHOENIX-5261:
---------------------------------------

How about two words instead: CASCADE INDEX?

> 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)

Mime
View raw message