Uploaded image for project: 'IMPALA'
  1. IMPALA
  2. IMPALA-11148

Unnesting from views work only when alias is provided

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Open
    • Major
    • Resolution: Unresolved
    • Impala 4.1.0
    • None
    • Frontend

    Description

      With 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:

      > 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>'

      Meanwhile when doing the same with regular tables it works:

      > 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
      

      Also, with the "query from view approach" it works if we provide an alias explicitly for the array:

      select id, arr1.item from view_arrays va, va.arr1 arr1; 

      Attachments

        Issue Links

          Activity

            People

              Unassigned Unassigned
              gaborkaszab Gabor Kaszab
              Votes:
              0 Vote for this issue
              Watchers:
              3 Start watching this issue

              Dates

                Created:
                Updated: