Uploaded image for project: 'Hive'
  1. Hive
  2. HIVE-10555 Improve windowing spec of range based windowing to support additional range formats
  3. HIVE-10702

COUNT(*) over windowing 'x preceding and y preceding' doesn't work properly

    XMLWordPrintableJSON

Details

    • Sub-task
    • Status: Closed
    • Major
    • Resolution: Fixed
    • None
    • 1.3.0, 2.0.0
    • PTF-Windowing
    • None

    Description

      Given the following query:

      select ts, f, count(*) over (partition by ts order by f rows between 2 preceding and 1 preceding) from over10k limit 100;
      

      It returns the result

      2013-03-01 09:11:58.70307       3.17    0
      2013-03-01 09:11:58.70307       10.89   0
      2013-03-01 09:11:58.70307       14.54   1
      2013-03-01 09:11:58.70307       14.78   1
      2013-03-01 09:11:58.70307       17.85   1
      2013-03-01 09:11:58.70307       20.61   1
      2013-03-01 09:11:58.70307       28.69   1
      2013-03-01 09:11:58.70307       29.22   1
      2013-03-01 09:11:58.70307       31.17   1
      2013-03-01 09:11:58.70307       38.35   1
      2013-03-01 09:11:58.70307       38.61   1
      

      Mostly it should return count 2 rather than 1.

      Attachments

        1. HIVE-10702.patch
          27 kB
          Aihua Xu

        Issue Links

          Activity

            People

              aihuaxu Aihua Xu
              aihuaxu Aihua Xu
              Votes:
              0 Vote for this issue
              Watchers:
              1 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved: