[
https://issues.apache.org/jira/browse/PHOENIX-978?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=14604386#comment-14604386
]
Eli Levine commented on PHOENIX-978:
------------------------------------
[~jamestaylor], mind taking a look at the pull request? At this point I have
the code and associated tests to allow views to extend parent's PK.
What is missing is the extra check that you mention above: during column
creation on a parent table make sure no child views contain clashing columns.
My take on the definition of such clashing is that we don't want to allow
parents to create a column if (1) it's a PK column and a child view has
extended its PK (meaning the view has a PK column in the same slot as the new
parent column being added), or (2) it's a non-PK column and a child view has a
column with the same name already. Anything else?
> 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
>
>
> 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)