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

James Taylor commented on PHOENIX-2123:
---------------------------------------

So now wouldn't we allow a PK to be added to a base table with diverged views 
(and the PK wouldn't be added to the diverged views)? I think that'll lead to 
the problems I mentioned in the comment above. One good test would be to:
- add a PK column to a base table that has a diverged view
- upsert a new row with the new PK set in the base table.
- query the diverged view and you'd see the new row
- do a DELETE FROM <diverged view> and I don't think it'd be deleted

It'd be good if we fixed PHOENIX-2110 IMO so that all these scenarios work as 
expected.

> Diverged view prevents schema propagation to the entire view hierarchy
> ----------------------------------------------------------------------
>
>                 Key: PHOENIX-2123
>                 URL: https://issues.apache.org/jira/browse/PHOENIX-2123
>             Project: Phoenix
>          Issue Type: Test
>            Reporter: Samarth Jain
>            Assignee: Samarth Jain
>             Fix For: 4.5.0
>
>         Attachments: PHOENIX-2123.patch
>
>
> This code in MetadataEndPointImpl
> {code}
> if (view.getBaseColumnCount() == 
> QueryConstants.DIVERGED_VIEW_BASE_COLUMN_COUNT) {
>                 // if a view has divorced itself from the base table, we 
> don't allow schema changes
>                 // to be propagated to it.
>               return new 
> MetaDataMutationResult(MutationCode.UNALLOWED_TABLE_MUTATION, 
> EnvironmentEdgeManager.currentTimeMillis(), null);
>             }
> {code}
> ends up preventing metadata changes to be propagated to the entire hierarchy. 
> Because of this bug, some views might have the change and some may not which 
> is not good.



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

Reply via email to