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

In Windowing Streaming mode Avg and Sum give incorrect results when Wdw size is same as partition size

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Closed
    • Major
    • Resolution: Fixed
    • None
    • 0.14.0
    • Query Processor
    • None

    Description

      For e.g. following query:

      select p_retailprice, avg(p_retailprice) over (partition by p_mfgr order by p_name rows between current row and 6 following), 
      sum(p_retailprice) over (partition by p_mfgr order by p_name rows between current row and 6 following) 
      from part 
      where p_mfgr='Manufacturer#1'
      

      returns

      1173.15	1458.2883333333336	8749.730000000001
      1173.15	1458.2883333333336	8749.730000000001
      1753.76	1458.2883333333336	8749.730000000001
      1602.59	1458.2883333333336	8749.730000000001
      1414.42	1458.2883333333336	8749.730000000001
      1632.66	1458.2883333333336	8749.730000000001
      

      Attachments

        1. HIVE-7744.1.patch
          3 kB
          Harish Butani

        Activity

          People

            rhbutani Harish Butani
            rhbutani Harish Butani
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: