[
https://issues.apache.org/jira/browse/PHOENIX-978?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=14604414#comment-14604414
]
Eli Levine commented on PHOENIX-978:
------------------------------------
Ah, thanks for pointing out PHOENIX-2058. I'll close out this jira without the
extra check and we'll track that follow-up work in PHOENIX-2058, unless there
are objections.
Also, I already implemented support for ALTER VIEW ADD <pk_column> PRIMARY KEY.
See [this
test|https://github.com/apache/phoenix/pull/91/files#diff-948389f1e38c4a930643f478633aef95R517]
in the pull request for example usage. Seems like if we support PKs for CREATE
VIEW, we should do the same for ALTER VIEW.
> Allow views to extend base table's PK
> -------------------------------------
>
> Key: PHOENIX-978
> URL: https://issues.apache.org/jira/browse/PHOENIX-978
> Project: Phoenix
> Issue Type: Sub-task
> Affects Versions: 3.0.0, 4.0.0
> Reporter: Eli Levine
> Assignee: Eli Levine
> Fix For: 5.0.0, 4.5.0
>
> Attachments: PHOENIX-978.diff
>
>
> CREATE VIEW syntax currently disallows PK constraint to be defined. As a
> result views and tenant-specific tables created using CREATE VIEW
> automatically inherit their base table's PK with no way to extend it.
> Base tables should be allowed to be created with a minimum of PK columns to
> support views, and views to extend PKs as desired. This would allow a single
> base table to support a heterogeneous set of views on top of it.
--
This message was sent by Atlassian JIRA
(v6.3.4#6332)