Hive
  1. Hive
  2. HIVE-273

regression: avg always returns NULL

    Details

    • Type: Bug Bug
    • Status: Closed
    • Priority: Blocker Blocker
    • Resolution: Fixed
    • Affects Version/s: None
    • Fix Version/s: 0.3.0
    • Component/s: Query Processor
    • Labels:
      None
    • Hadoop Flags:
      Reviewed

      Description

      Due to recent checkin for implict type conversion, avg broke and it always returns NULLs.

      1. patch-273_2.txt
        67 kB
        Ashish Thusoo
      2. patch-273.txt
        29 kB
        Ashish Thusoo

        Activity

        Hide
        Ashish Thusoo added a comment -

        The following test case shows the error:

        Suppose table T(string c1) has 2 rows

        ''
        '1'

        then

        select avg(c1), sum(c1), count(c1) from T

        returns

        NULL 1.0 1

        Show
        Ashish Thusoo added a comment - The following test case shows the error: Suppose table T(string c1) has 2 rows '' '1' then select avg(c1), sum(c1), count(c1) from T returns NULL 1.0 1
        Hide
        Ashish Thusoo added a comment -

        Fixing the description and summary to reflect the seriousness of the bug.

        Show
        Ashish Thusoo added a comment - Fixing the description and summary to reflect the seriousness of the bug.
        Hide
        Ashish Thusoo added a comment -

        Patch attached.

        Show
        Ashish Thusoo added a comment - Patch attached.
        Hide
        Ashish Thusoo added a comment -

        submitted.

        Show
        Ashish Thusoo added a comment - submitted.
        Hide
        Ashish Thusoo added a comment -

        Fixed some test outputs.

        Show
        Ashish Thusoo added a comment - Fixed some test outputs.
        Hide
        Zheng Shao added a comment -

        +1.

        Show
        Zheng Shao added a comment - +1.
        Hide
        Ashish Thusoo added a comment -

        committed.

        Show
        Ashish Thusoo added a comment - committed.

          People

          • Assignee:
            Ashish Thusoo
            Reporter:
            Ashish Thusoo
          • Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

            Dates

            • Created:
              Updated:
              Resolved:

              Development