Uploaded image for project: 'Hive'
  1. Hive
  2. HIVE-22601

Some columns will be lost when a UDTF has multiple aliases in some cases

Log workAgile BoardRank to TopRank to BottomAdd voteVotersWatch issueWatchersCreate sub-taskConvert to sub-taskMoveLinkCloneLabelsUpdate Comment AuthorReplace String in CommentUpdate Comment VisibilityDelete Comments
    XMLWordPrintableJSON

    Details

    • Type: Bug
    • Status: Patch Available
    • Priority: Major
    • Resolution: Unresolved
    • Affects Version/s: 2.1.1, 2.2.0, 2.3.6, 3.1.2
    • Fix Version/s: None
    • Component/s: Query Processor

      Description

      Only one column will be retained when putting UDTFs with multiple aliases and a top-level UNION together.

      For example, the result of the following SQL should have three columns, c1, c2 and c3.

      SELECT stack(1, 'a', 'b', 'c') AS (c1, c2, c3)
      UNION ALL
      SELECT stack(1, 'd', 'e', 'f') AS (c1, c2, c3);
      

      However, It's only the c3 column which I can get.

      +---------+
      | _u1.c3  |
      +---------+
      | c       |
      | f       |
      +---------+
      

        Attachments

        1. HIVE-22601.1.patch
          8 kB
          okumin
        2. HIVE-22601.2.patch
          8 kB
          okumin
        3. HIVE-22601.3.patch
          8 kB
          okumin
        4. HIVE-22601.patch
          8 kB
          okumin

          Activity

          $i18n.getText('security.level.explanation', $currentSelection) Viewable by All Users
          Cancel

            People

              Dates

              • Created:
                Updated:

              Time Tracking

              Estimated:
              Original Estimate - Not Specified
              Not Specified
              Remaining:
              Remaining Estimate - 0h
              0h
              Logged:
              Time Spent - 40m
              40m

                Issue deployment