You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@phoenix.apache.org by "Karan Mehta (JIRA)" <ji...@apache.org> on 2017/12/03 19:37:01 UTC

[jira] [Created] (PHOENIX-4431) Remove the need for users to have CREATE access on a namespace while creating view indexes

Karan Mehta created PHOENIX-4431:
------------------------------------

             Summary: Remove the need for users to have CREATE access on a namespace while creating view indexes
                 Key: PHOENIX-4431
                 URL: https://issues.apache.org/jira/browse/PHOENIX-4431
             Project: Phoenix
          Issue Type: Bug
            Reporter: Karan Mehta


Phoenix allows users to create views and view indexes on top of any table. View creation writes rows to SYSTEM.CATALOG and doesn't make changes at HBase level. Hence it is handled by PHOENIX-4198. Users can create many view indexes, however they all map to the same physical HBase table.

However, for view indexes, two cases come up.
1. Base table is multitenant --> This case is easy since physical view index table is automatically created along with base table. If the user has permission to create a table, then it automatically works for view index tables.
2. Base table is *not* multitenant --> In this case, the code tries to create the physical table whenever the first view index statement is encountered. If a user doesn't have CREATE permission on the namespace, the command fails and no data is added to index.

We need to intercept such requests (case 2) and allow user to automatically create the table even without CREATE permission. The solution for this can be similar to PHOENIX-4198.

FYI.
[~twdsilva@gmail.com] [~jamestaylor] [~ankit@apache.org]



--
This message was sent by Atlassian JIRA
(v6.4.14#64029)