Randy Gelhausen created PHOENIX-3233:
----------------------------------------

             Summary: Support defining a VIEW over selects from subqueries
                 Key: PHOENIX-3233
                 URL: https://issues.apache.org/jira/browse/PHOENIX-3233
             Project: Phoenix
          Issue Type: Bug
            Reporter: Randy Gelhausen


It's common to make use of indexes in a sub-query for self-joining back to 
un-indexed columns on the same table. For example:

select * from leads
join (
  select id from lead where indexedCol1 = 'a', indexCol2 = 'b', etc.
) a
where leads.id = a.id

Instead of pushing this complex query logic out to app devs, as a cluster 
admin, I'd like to expose a predefined view to the devs instead:

create view leads_view as
select * from leads
join (
  select id from newlead where indexedCol1 = 'a', indexCol2 = 'b', etc.
) a
where leads.id = a.id

So that devs can "select * from leads_view" instead.



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

Reply via email to