[
https://issues.apache.org/jira/browse/IMPALA-10920?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=17517321#comment-17517321
]
ASF subversion and git services commented on IMPALA-10920:
----------------------------------------------------------
Commit 32e2ace38df03b6a760d636154c0ca78304568de in impala's branch
refs/heads/master from Gabor Kaszab
[ https://gitbox.apache.org/repos/asf?p=impala.git;h=32e2ace38 ]
IMPALA-11038: Zipping unnest from view
IMPALA-10920 introduced zipping unnest functionality for arrays that
are in a table. This patch improves that support further by accepting
inputs from views as well.
Testing:
- Added planner tests to verify which execution node handles the
predicates on unnested items.
- E2E tests for both unnesting syntaxes (select list and from clause)
to cover when the source of the unnested arrays is not a table but a
view. Also tested multi-level views and filtering the unnested items
on different levels.
Change-Id: I68f649dda9e41f257e7f6596193d07b24049f92a
Reviewed-on: http://gerrit.cloudera.org:8080/18094
Tested-by: Impala Public Jenkins <[email protected]>
Reviewed-by: Gabor Kaszab <[email protected]>
> UNNEST function for arrays in the select list
> ---------------------------------------------
>
> Key: IMPALA-10920
> URL: https://issues.apache.org/jira/browse/IMPALA-10920
> Project: IMPALA
> Issue Type: Sub-task
> Components: Backend, Frontend
> Reporter: Gabor Kaszab
> Assignee: Gabor Kaszab
> Priority: Major
> Labels: complextype
> Fix For: Impala 4.1.0
>
>
> There is a need for implementing an UNNEST(array) function that could be
> given in the select list so that we can replicate Postgres functionality that
> has the very same.
> Considering the following table:
> {code:java}
> CREATE TABLE tbl (
> id int,
> arr1 array<int>,
> arr2 array<int>)
> STORED AS PARQUET;
> {code}
> with this data:
> {code:java}
> 1, {1,2}, {11,22,33}
> {code}
> A sample query would look like this:
> {code:java}
> SELECT id, UNNEST(arr1), UNNEST(arr2) FROM tbl;
> {code}
> ||id||unnest(arr1)||unnest(arr2)||
> |1|1|11|
> |1|2|22|
> |1|null|33|
> Not that the expected is to 'zip' the arrays instead of joining their values
> to have the same behaviour as Postgres 10+.
--
This message was sent by Atlassian Jira
(v8.20.1#820001)
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]