phoenix-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "ASF GitHub Bot (JIRA)" <j...@apache.org>
Subject [jira] [Commented] (PHOENIX-978) Allow views to extend base table's PK (only if last PK column is fixed length)
Date Thu, 09 Jul 2015 02:25:06 GMT

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

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

Github user elilevine commented on a diff in the pull request:

    https://github.com/apache/phoenix/pull/97#discussion_r34219051
  
    --- Diff: phoenix-core/src/it/java/org/apache/phoenix/end2end/AlterTableIT.java ---
    @@ -2132,15 +2131,13 @@ public void testAddExistingViewColumnToBaseTableWithViews() throws
Exception {
         }
         
         @Test
    -    @Ignore
    -    // enable this test after https://issues.apache.org/jira/browse/PHOENIX-978 is fixed

         public void testAddExistingViewPkColumnToBaseTableWithViews() throws Exception {
             Connection conn = DriverManager.getConnection(getUrl());
             try {       
                 conn.createStatement().execute("CREATE TABLE IF NOT EXISTS TABLEWITHVIEW
("
                         + " ID char(10) NOT NULL,"
                         + " COL1 integer NOT NULL,"
    -                    + " COL2 bigint NOT NULL,"
    +                    + " COL2 integer NOT NULL,"
    --- End diff --
    
    Parent's last PK column must be fixed-length now.


> 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.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)

Mime
View raw message