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

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

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Patch Available
    • Major
    • Resolution: Unresolved
    • 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
          okumin
        2. HIVE-22601.1.patch
          8 kB
          okumin
        3. HIVE-22601.2.patch
          8 kB
          okumin
        4. HIVE-22601.3.patch
          8 kB
          okumin

        Activity

          People

            okumin okumin
            okumin okumin
            Votes:
            2 Vote for this issue
            Watchers:
            5 Start watching this issue

            Dates

              Created:
              Updated:

              Time Tracking

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