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 BottomBulk Copy AttachmentsBulk Move AttachmentsVotersWatch issueWatchersCreate sub-taskConvert to sub-taskMoveLinkCloneLabelsUpdate Comment AuthorReplace String in CommentUpdate Comment VisibilityDelete Comments
    XMLWordPrintableJSON

Details

    • Bug
    • Status: Resolved
    • Major
    • Resolution: Duplicate
    • 2.1.1, 2.2.0, 2.3.6, 3.1.2
    • None
    • 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.patch
          8 kB
          Shohei Okumiya
        2. HIVE-22601.3.patch
          8 kB
          Shohei Okumiya
        3. HIVE-22601.2.patch
          8 kB
          Shohei Okumiya
        4. HIVE-22601.1.patch
          8 kB
          Shohei Okumiya

        Issue Links

        Activity

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

          People

            okumin Shohei Okumiya Assign to me
            okumin Shohei Okumiya
            Votes:
            2 Vote for this issue
            Watchers:
            5 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved:

              Time Tracking

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

              Slack

                Issue deployment