phoenix-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "James Taylor (JIRA)" <j...@apache.org>
Subject [jira] [Updated] (PHOENIX-1160) Allow mix of immutable and mutable indexes on the same table
Date Fri, 13 Oct 2017 04:30:00 GMT

     [ https://issues.apache.org/jira/browse/PHOENIX-1160?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
]

James Taylor updated PHOENIX-1160:
----------------------------------
    Description: 
Currently, a table must be marked as immutable, through the IMMUTABLE_ROWS=true property specified
at creation time. In this case, all indexes added to the table are immutable, while without
this property, all indexes are mutable.

Instead, we should support a mix of immutable and mutable indexes. We already have an INDEX_TYPE
field on our metadata row. We can add a new IMMUTABLE keyword and specify an index is immutable
like this:
{code}
CREATE IMMUTABLE INDEX foo ON bar(c2, c1);
{code}
It would be up to the application developer to ensure that only columns that don't mutate
are part of an immutable index (we already rely on this anyway).


  was:
Currently, a table must be marked as immutable, through the IMMUTABLE_ROWS=true property specified
at creation time. In this case, all indexes added to the table are immutable, while without
this property, all indexes are mutable.

Instead, we should support a mix of immutable and mutable indexes. We already have an INDEX_TYPE
field on our metadata row. We can add a new IMMUTABLE keyword and specify an index is immutable
like this:
{code}
CREATE IMMUTABLE INDEX foo ON bar(c2, c1);
{code}
It would be up to the application developer to ensure that only columns that don't mutate
are part of an immutable index (we already rely on this anyway).

Related to this is support for deletion of rows when a table has an immutable index (PHOENIX-619).
In this JIRA, we'd throw an exception if a DELETE statement filters on any columns that aren't
contained in *all* immutable indexes for that table. We currently disallow *any* DELETE on
a table that's marked as immutable.


> Allow mix of immutable and mutable indexes on the same table
> ------------------------------------------------------------
>
>                 Key: PHOENIX-1160
>                 URL: https://issues.apache.org/jira/browse/PHOENIX-1160
>             Project: Phoenix
>          Issue Type: Improvement
>            Reporter: James Taylor
>
> Currently, a table must be marked as immutable, through the IMMUTABLE_ROWS=true property
specified at creation time. In this case, all indexes added to the table are immutable, while
without this property, all indexes are mutable.
> Instead, we should support a mix of immutable and mutable indexes. We already have an
INDEX_TYPE field on our metadata row. We can add a new IMMUTABLE keyword and specify an index
is immutable like this:
> {code}
> CREATE IMMUTABLE INDEX foo ON bar(c2, c1);
> {code}
> It would be up to the application developer to ensure that only columns that don't mutate
are part of an immutable index (we already rely on this anyway).



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

Mime
View raw message