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 "ASF subversion and git services (Jira)" <ji...@apache.org> on 2022/07/23 08:06:00 UTC

[jira] [Commented] (IMPALA-11452) Improve alias handling in CollectionTableRef

    [ https://issues.apache.org/jira/browse/IMPALA-11452?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=17570266#comment-17570266 ] 

ASF subversion and git services commented on IMPALA-11452:
----------------------------------------------------------

Commit efc303b71a35580069f59ab627c3ad9ae292945a in impala's branch refs/heads/master from Csaba Ringhofer
[ https://gitbox.apache.org/repos/asf?p=impala.git;h=efc303b71 ]

IMPALA-11434: Fix analysis of multiple more than 1d arrays in select list

More than 1d arrays in select list tried to register a
CollectionTableRef with name "item" for the inner arrays,
leading to name collision if there was more than one such array.

The logic is changed to always use the full path as implicit alias
in CollectionTableRefs backing arrays in select list.

As a side effect this leads to using the fully qualified names
in expressions in the explain plans of queries that use arrays
from views. This is not an intended change, but I don't consider
it to be critical. Created IMPALA-11452 to deal with more
sophisticated alias handling in collections.

Testing:
- added a new table to testdata and a regression test

Change-Id: I6f2b6cad51fa25a6f6932420eccf1b0a964d5e4e
Reviewed-on: http://gerrit.cloudera.org:8080/18734
Reviewed-by: Impala Public Jenkins <im...@cloudera.com>
Tested-by: Impala Public Jenkins <im...@cloudera.com>


> Improve alias handling in CollectionTableRef
> --------------------------------------------
>
>                 Key: IMPALA-11452
>                 URL: https://issues.apache.org/jira/browse/IMPALA-11452
>             Project: IMPALA
>          Issue Type: Improvement
>          Components: Frontend
>    Affects Versions: Impala 4.1.0
>            Reporter: Csaba Ringhofer
>            Priority: Major
>
> Currently a TableRef is expected to have 1 or 2 aliases:
> 1: it is an explicit alias, like "t" in "select * from db.tbl t"
> 2: the first is fully qualified name ("db.tbl"), the second is an implicit name ("tbl") in  "select * from db.tbl"
> https://github.com/apache/impala/blob/02043744beee8c57ee876cb8d94eba28660927cb/fe/src/main/java/org/apache/impala/analysis/TableRef.java#L83
> The case with 2 aliases is not enough to properly express naming of collection tables, e.g. "select item from db.tbl.arr_col".
> The issue is that while the fully qualified alias is always enough to point to the right collection, the second implicit alias is often not really usable, for example for the inner collection of a 2d table it will be always "item" (while the fully qualified alias will be "db.table.arr_col.item".  If there are two such collections in a query, only the fully qualified form becomes usable, which is a bit too verbose. It could be useful to add an alias that starts at the column name, e.g "arr_col.item"  it the 2d example above.



--
This message was sent by Atlassian Jira
(v8.20.10#820010)

---------------------------------------------------------------------
To unsubscribe, e-mail: issues-all-unsubscribe@impala.apache.org
For additional commands, e-mail: issues-all-help@impala.apache.org