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

STACK UDTF returns wrong results when # of argument is not a multiple of N

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Closed
    • Major
    • Resolution: Fixed
    • 4.0.0-beta-1
    • 4.0.0
    • None

    Description

      GenericUDTFStack nullifies a wrong cell when the number of values is indivisible. In the following case, the `col2` column of the last row should be `NULL`. But, `col1` is NULL somehow. 

      0: jdbc:hive2://hive-hiveserver2:10000/defaul> select stack(2, 'a', 'b', 'c', 'd', 'e');
      +-------+-------+-------+
      | col0  | col1  | col2  |
      +-------+-------+-------+
      | a     | b     | c     |
      | d     | NULL  | c     |
      +-------+-------+-------+

      Attachments

        Issue Links

          Activity

            People

              okumin Shohei Okumiya
              okumin Shohei Okumiya
              Votes:
              0 Vote for this issue
              Watchers:
              2 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved: