You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@phoenix.apache.org by "James Taylor (JIRA)" <ji...@apache.org> on 2016/04/06 03:04:25 UTC

[jira] [Updated] (PHOENIX-2795) Support auto partition for views

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

James Taylor updated PHOENIX-2795:
----------------------------------
    Fix Version/s: 4.8.0

> Support auto partition for views
> --------------------------------
>
>                 Key: PHOENIX-2795
>                 URL: https://issues.apache.org/jira/browse/PHOENIX-2795
>             Project: Phoenix
>          Issue Type: Sub-task
>            Reporter: James Taylor
>            Assignee: Thomas D'Silva
>              Labels: argus
>             Fix For: 4.8.0
>
>
> When a view or base table is created, we should have an string AUTO_PARTITION_SEQ parameter on CREATE TABLE which uses a sequence based on the argument on the server side to generate a WHERE clause with the first PK column and the unique identifier from the sequence.
> For example:
> {code}
> CREATE SEQUENCE metric_id_seq;
> CREATE TABLE metric_table (metric_id INTEGER, val DOUBLE) AUTO_PARTITION_SEQ=metric_id_seq;
> CREATE VIEW my_view1 AS SELECT * FROM base_table;
> {code}
> would tack on a WHERE clause base on the next value in a sequence, logically like this:
> {code}
> WHERE partition_id =  NEXT VALUE FROM metric_id_seq
> {code}
> It's important that the sequence be generated *after* the check for the existence of the view so that we don't burn sequence values needlessly if the view already exists.



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)