Uploaded image for project: 'Hive'
  1. Hive
  2. HIVE-13554 [Umbrella] SQL:2011 compliance
  3. HIVE-16178

corr/covar_samp UDAF standard compliance

    XMLWordPrintableJSON

Details

    • Sub-task
    • Status: Resolved
    • Minor
    • Resolution: Fixed
    • None
    • 2.3.0
    • SQL

    Description

      corr

      the standard defines corner cases when it should return null - but the current result is NaN.

      If N * SUMX2 equals SUMX * SUMX , then the result is the null value.
      and
      If N * SUMY2 equals SUMY * SUMY , then the result is the null value.

      covar_samp

      returns 0 instead 1

      `If N is 1 (one), then the result is the null value.`

      check (x,y) vs (y,x) args in docs

      the standard uses (y,x) order; and some of the function names are also contain X and Y...so the order does matter..currently at least corr uses (x,y) order which is okay - because its symmetric; but it would be great to have the same order everywhere (check others)

      Attachments

        1. HIVE-16178.1.patch
          12 kB
          Zoltan Haindrich
        2. HIVE-16178.2.patch
          45 kB
          Zoltan Haindrich

        Issue Links

          Activity

            People

              kgyrtkirk Zoltan Haindrich
              kgyrtkirk Zoltan Haindrich
              Votes:
              0 Vote for this issue
              Watchers:
              3 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved: