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

James Taylor commented on PHOENIX-2156:
---------------------------------------

Thanks, [~tdsilva]. Couple of comments/questions:
- You'll need to collect up all the indexes being dropped (which are not 
shared, i.e. viewIndexId == null) and return those names in the 
MetaDataMutationResult so that the client drops the corresponding HBase 
metadata (as otherwise the data will remain with the standard client defaults 
of dropMetaData=true):
{code}
+    private void dropIndexes(PTable table, HRegion region, 
List<ImmutableBytesPtr> invalidateList,
{code}
- How much copy/paste is there between the new dropColumnsFromChildViews and 
the existing addRowsToChildViews in MetaDataEndPointImpl? Enough to warrant any 
refactoring?

> Support drop of column from table with views
> --------------------------------------------
>
>                 Key: PHOENIX-2156
>                 URL: https://issues.apache.org/jira/browse/PHOENIX-2156
>             Project: Phoenix
>          Issue Type: Sub-task
>            Reporter: James Taylor
>            Assignee: Thomas D'Silva
>             Fix For: 4.8.0
>
>         Attachments: PHOENIX-2156-v2.patch, PHOENIX-2156.patch
>
>
> Much like PHOENIX-1504 allows a column to be added to a base view, we should 
> support dropping a column from a table that has views as well. These seems 
> like a simpler problem: you just need to query for all views with a 
> BASE_COLUMN_COUNT < dropped_column_ordinal_pos, decrement the ordinal 
> positions of columns after that, and drop indexes that reference the column 
> being dropped.



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

Reply via email to