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

ASF GitHub Bot commented on PHOENIX-4555:
-----------------------------------------

jinggou opened a new pull request, #1844:
URL: https://github.com/apache/phoenix/pull/1844

   Jira: [PHOENIX-4555](https://issues.apache.org/jira/browse/PHOENIX-4555)
   
   Restrict view to be UPDATABLE if the view specification:
   1. uses only the PK columns
   2. starts from the first PK column if the parent table is not multi tenant;

otherwise, starts from the second PK column (the first column will be TENANT_ID)
   3. PK columns should be in the order they are defined
   4. uses the same set of PK columns as its sibling views' specification
   
   Otherwise, mark the view as READ_ONLY.




> Only mark view as updatable if rows cannot overlap with other updatable views
> -----------------------------------------------------------------------------
>
>                 Key: PHOENIX-4555
>                 URL: https://issues.apache.org/jira/browse/PHOENIX-4555
>             Project: Phoenix
>          Issue Type: Sub-task
>            Reporter: James R. Taylor
>            Assignee: Jing Yu
>            Priority: Major
>
> We'll run into issues if updatable sibling views overlap with each other. For 
> example, say you have the following hierarchy:
> T (A, B, C)
> V1 (D, E) FROM T WHERE A = 1
> V2 (F, G) FROM T WHERE A = 1 and B = 2
> In this case, there's no way to update both V1 and v2 columns. Secondary 
> indexes wouldn't work either, if you had one on each V1 & V2. 
> We should restrict updatable views to
> - views that filter on PK column(s)
> - sibling views filter on same set of PK column(s)



--
This message was sent by Atlassian Jira
(v8.20.10#820010)

Reply via email to