[
https://issues.apache.org/jira/browse/PHOENIX-1505?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=16052992#comment-16052992
]
James Taylor commented on PHOENIX-1505:
---------------------------------------
I'm sure that Calcite can handle lots of interesting view definitions at
compile time, but Phoenix still needs to manage the metadata. That doesn't
change when we move to Calcite. Either with or without Calcite, Phoenix still
needs to manage the metadata and the hierarchy of tables/views, which columns
they define, etc. For example, if you have a table and view like this:
{code}
create table t (a, b, c, d);
create view v1(e varchar, f varchar) as select * from t where d = 5;
{code}
Then you drop column b from t, then we have to track that in our system catalog
(and that the projection of the view doesn't include that column either).
Just out of curiosity, can't a view be derived from another view? Isn't this ok?
{code}
create view v2 as select * from v1 where e = 'foo';
{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)