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

Geoffrey Jacoby commented on PHOENIX-4195:
------------------------------------------

[~tdsilva] - Wouldn't the issue happen anytime you delete from a base table 
with a full base-table PK, but there are rows that have been inserted through a 
view that extended the primary key? Looking at the code you indicate, I'm not 
sure how single-tenant vs multi-tenant affects the outcome. Isn't a view a view?

I would think the test would be "use the optimization if I have the entire PK 
and I'm the leaf in the parent-child table hierarchy". However, I don't see an 
easy way to figure out from a PTable if there are child views, since the child 
links don't seem to get incorporated into the PTable. (You can see the indexes 
but not views.)

Of course, given the scalability challenges we've seen in the past when Phoenix 
has a huge number of views on the table, I'm not sure automatically calculating 
all the views at query-time would perform well in certain scenarios. 

> PHOENIX-4195 Deleting tenant rows using a tenant or global connection on the 
> base table fails
> ---------------------------------------------------------------------------------------------
>
>                 Key: PHOENIX-4195
>                 URL: https://issues.apache.org/jira/browse/PHOENIX-4195
>             Project: Phoenix
>          Issue Type: Bug
>            Reporter: Thomas D'Silva
>            Assignee: Geoffrey Jacoby
>            Priority: Major
>         Attachments: test.diff
>
>
> The attached test fails.



--
This message was sent by Atlassian JIRA
(v7.6.3#76005)

Reply via email to