Files
impala/testdata/workloads/functional-query/queries/QueryTest
Daniel Becker ed59690b44 IMPALA-11840: Error with joining unnest with views
Queries fail in the following situation involving collections and views:
 1. A view returns an array
 2. A second view unnests the array returned from the first view
 3. The unnested view is queried in an outer query

For example:
  use functional_parquet;
  with sub as (
    select id, arr1.item unnested_arr
    from complextypes_arrays_only_view,
    complextypes_arrays_only_view.int_array arr1)
  select id, unnested_arr from sub;
  ERROR: IllegalStateException: null

The problem is that in CollectionTableRef.analyze(), if
 - there is a source view and
 - the collection ref is within a WITH clause and
 - it is not in the select list
then 'desc_' is not set, but it has to be set in order for
TableRef.analyzeJoin() to succeed.

This commit solves the problem by assigning a value to 'desc_' also in
the above case.

Testing:
 - Added regression tests in nested-types-runtime.test.

Change-Id: Ic52655631944913553a7e7d9e9169b93da46dde3
Reviewed-on: http://gerrit.cloudera.org:8080/19426
Reviewed-by: Impala Public Jenkins <impala-public-jenkins@cloudera.com>
Tested-by: Impala Public Jenkins <impala-public-jenkins@cloudera.com>
2023-01-18 17:46:54 +00:00
..
2021-07-06 18:35:30 +00:00
2022-02-11 07:01:58 +00:00