phoenix-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Julian Hyde (JIRA)" <j...@apache.org>
Subject [jira] [Comment Edited] (PHOENIX-1505) Support defining a VIEW over multiple tables
Date Sat, 17 Jun 2017 18:11:00 GMT

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

Julian Hyde edited comment on PHOENIX-1505 at 6/17/17 6:10 PM:
---------------------------------------------------------------

The concept of a "view parents" can be simplified when we move to Calcite. A view either has
a base table (in which case, it is DML-capable) or it does not. The parent is never a view.

Indexes on views should be at most syntactic sugar for functional indexes. For example,

{code}
create table t (a, b, c, d);
create table v as select a, b + c as e from t where d = 5;
create index iv on v (a, e);
create index it on t (a, b + c);
{code}

I would expect v and iv to have identical contents, and either could be used to answer the
query {code}select a from t where b + c > 10{code}


was (Author: julianhyde):
The concept of a "view parents" can be simplified when we move to Calcite. A view either has
a base table (in which case, it is DML-capable) or it does not. The parent is never a view.

Indexes on views should be at most syntactic sugar for functional indexes. For example,

{code}
create table t (a, b, c);
create table v as select a, b + c as d from t where e = 5;
create index iv on v(a, d);
create index it on t(a, b + c);
{code}

I would expect v and iv to have identical contents, and either could be used to answer the
query {code}select a from t where b + c > 10{code}

> Support defining a VIEW over multiple tables
> --------------------------------------------
>
>                 Key: PHOENIX-1505
>                 URL: https://issues.apache.org/jira/browse/PHOENIX-1505
>             Project: Phoenix
>          Issue Type: Sub-task
>            Reporter: James Taylor
>              Labels: SFDC
>
> Our current view implementation only supports views over a single table. We should enhance
this to support creating a view over multiple tables. For example: CREATE VIEW v AS SELECT
* FROM DEPT d, EMPL e WHERE d.dept_id = e.dept_id



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

Mime
View raw message