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

James Taylor commented on PHOENIX-1504:
---------------------------------------

+1 to allowing nullable PK columns to be added to the base table.

The comment to to pass only List<Mutation>tableMetadata wasn't specific enough 
(and not super important either). I meant only pass tableMetadata instead of 
both tableMetaData and viewMetadata as in the end you're just combining them 
together. However, upon thinking about this more, it may be better to do this:
- initialize viewMetadata to Collection.emptyList() outside the if statement 
for the "adding a column to a base table".
- inside of that if statement (as you now know you'll be adding columns to all 
the views), size the list based on some rough estimate (maybe a multiple of the 
tableMetadata list, where the multiple is a guess at how many views there will 
be)?
At least that'll prevent what might end up being a pretty sizable list from 
being copied again and again as it grows.

> Support adding column to a table that has views
> -----------------------------------------------
>
>                 Key: PHOENIX-1504
>                 URL: https://issues.apache.org/jira/browse/PHOENIX-1504
>             Project: Phoenix
>          Issue Type: Sub-task
>            Reporter: James Taylor
>            Assignee: Samarth Jain
>             Fix For: 5.0.0, 4.5.0
>
>         Attachments: PHOENIX-1504-wip.patch, PHOENIX-1504.patch, 
> PHOENIX-1504_v2.patch
>
>
> We currently disallow any schema modifications to a table that has views. We 
> should relax that constraint and push the schema change as necessary out to 
> all views.



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)

Reply via email to