[
https://issues.apache.org/jira/browse/PHOENIX-953?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=14654772#comment-14654772
]
ramkrishna.s.vasudevan commented on PHOENIX-953:
------------------------------------------------
I think our initial scope is going to be UNNEST without FROM clause and a
simple 'SELECT UNNEST(ARRAY) from 'table''.
bq.We should be able to handle UNNEST purely at the compile layer.
Fine.
bq.The inner select will return one row per array element. We may have a
special QueryPlan derived from EmptyTableQueryPlan specific for this case (like
UnnestArrayQueryPlan) that'll simply project all the elements of the array
expression from the UNNEST call.
This would be for the UNNEST without FROM clause I think.
bq.Yes, the very fundamental thing we need for unnest is an
UnnestArrayResultIterator (maybe as an inner class of UnnestArrayQueryPlan),
True.
I think the basic thing is more or less what we were discussing. I could help
Dumindu in these patches. REviews and suggestions welcome.
Thanks for the comments James and Maryann. Anyway will come back here to
discuss once we do the code development.
[~Dumindux]
You have any comments or questions?
> Support UNNEST for ARRAY
> ------------------------
>
> Key: PHOENIX-953
> URL: https://issues.apache.org/jira/browse/PHOENIX-953
> Project: Phoenix
> Issue Type: Sub-task
> Reporter: James Taylor
> Assignee: Dumindu Buddhika
>
> The UNNEST built-in function converts an array into a set of rows. This is
> more than a built-in function, so should be considered an advanced project.
> For an example, see the following Postgres documentation:
> http://www.postgresql.org/docs/8.4/static/functions-array.html
> http://www.anicehumble.com/2011/07/postgresql-unnest-function-do-many.html
> http://tech.valgog.com/2010/05/merging-and-manipulating-arrays-in.html
> So the UNNEST is a way of converting an array to a flattened "table" which
> can then be filtered on, ordered, grouped, etc.
--
This message was sent by Atlassian JIRA
(v6.3.4#6332)