[
https://issues.apache.org/jira/browse/PHOENIX-978?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=14625458#comment-14625458
]
Samarth Jain commented on PHOENIX-978:
--------------------------------------
Thanks for the updated patch [~tdsilva]
Patch looks good.
It would be good to add a test that validates that creating a view with the PK
different from the base table is not allowed if the PK of the base table is of
variable length.
Minor nit:
I think you can use the Guava Objects.equal(@Nullable Object a, @Nullable
Object b)
{code}
+ private boolean isvalidAttribute(Object obj1, Object obj2) {
+ return (obj1!=null && obj1.equals(obj2)) || (obj1==null && obj2==null);
}
{code}
> Allow views to extend base table's PK (only if last PK column is fixed length)
> ------------------------------------------------------------------------------
>
> 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-v2.patch, PHOENIX-978.diff, PHOENIX-978.patch
>
>
> 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)