You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues-all@impala.apache.org by "Gabor Kaszab (Jira)" <ji...@apache.org> on 2022/02/22 16:15:00 UTC
[jira] [Created] (IMPALA-11148) Unnesting from views work only when alias is provided
Gabor Kaszab created IMPALA-11148:
-------------------------------------
Summary: Unnesting from views work only when alias is provided
Key: IMPALA-11148
URL: https://issues.apache.org/jira/browse/IMPALA-11148
Project: IMPALA
Issue Type: Bug
Components: Frontend
Affects Versions: Impala 4.1.0
Reporter: Gabor Kaszab
With [IMPALA-9498|https://issues.apache.org/jira/browse/IMPALA-9498] it is now possible to provide arrays in the select list. However, with that change some existing functionality seems broken. When doing a regular (joining) unnest from views we get an error:
{code:java}
> select id, arr1.item from view_arrays va, va.arr1;
ERROR: AnalysisException: Illegal column/field reference 'arr1.item' with intermediate collection 'arr1' of type 'ARRAY<INT>'{code}
Meanwhile when doing the same with regular tables it works:
{code:java}
> select id, arr1.item from functional_orc_def.complextypes_arrays va, va.arr1;
+----+------+
| id | item |
+----+------+
| 1 | 1 |
| 1 | 2 |
| 1 | 3 |
| 1 | 4 |
| 1 | 5 |
| 2 | 1 |
| 2 | NULL |
| 2 | 3 |
| 2 | 4 |
| 2 | 5 |
| 3 | 10 |
| 3 | 9 |
| 3 | 8 |
| 4 | 10 |
| 5 | 10 |
| 5 | NULL |
| 5 | 12 |
| 7 | 1 |
| 7 | 2 |
| 10 | 1 |
| 10 | 2 |
| 10 | 3 |
+----+------+
Fetched 22 row(s) in 3.70s
{code}
Also, with the "query from view approach" it works if we provide an alias explicitly for the array:
{code:java}
select id, arr1.item from view_arrays va, va.arr1 arr1; {code}
--
This message was sent by Atlassian Jira
(v8.20.1#820001)
---------------------------------------------------------------------
To unsubscribe, e-mail: issues-all-unsubscribe@impala.apache.org
For additional commands, e-mail: issues-all-help@impala.apache.org