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

Incorrect results returned by STDDEV, STDDEV_SAMP, STDDEV_POP for floating point data types.

    XMLWordPrintableJSON

Details

    • Improvement
    • Status: Reopened
    • Major
    • Resolution: Unresolved
    • 3.1.0, 3.1.2
    • None
    • UDF

    Description

      Description

      Script-

      create table test ( col1 decimal );

      insert into values ('10230.72'),('10230.72'),('10230.72'),('10230.72'),('10230.72'),('10230.72'),('10230.72');

      select STDDEV_SAMP(col1) AS STDDEV_6M , STDDEV(col1) as STDDEV ,STDDEV_POP(col1) as STDDEV_POP from test;

      Result-

      STDDDEV_SAMP STDDEV STDDEV_POP

      5.940794514955821E-13 5.42317860890711E-13 5.42317860890711E-13

      Expected-

      STDDDEV_SAMP STDDEV STDDEV_POP
      0 0 0

      Attachments

        Issue Links

          Activity

            People

              ashish-kumar-sharma Ashish Sharma
              ashish-kumar-sharma Ashish Sharma
              Votes:
              0 Vote for this issue
              Watchers:
              4 Start watching this issue

              Dates

                Created:
                Updated:

                Time Tracking

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