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

Improve alias handling in CollectionTableRef

Attach filesAttach ScreenshotAdd voteVotersWatch issueWatchersCreate sub-taskLinkCloneUpdate Comment AuthorReplace String in CommentUpdate Comment VisibilityDelete Comments
    XMLWordPrintableJSON

Details

    • Improvement
    • Status: Open
    • Major
    • Resolution: Unresolved
    • Impala 4.1.0
    • None
    • Frontend
    • None
    • ghx-label-5

    Description

      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.

      Attachments

        Issue Links

        Activity

          This comment will be Viewable by All Users Viewable by All Users
          Cancel

          People

            Unassigned Unassigned
            csringhofer Csaba Ringhofer

            Dates

              Created:
              Updated:

              Slack

                Issue deployment