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

Adding Tumbling Window UDF

    XMLWordPrintableJSON

Details

    • New Feature
    • Status: Closed
    • Major
    • Resolution: Fixed
    • None
    • 4.0.0-alpha-1
    • None

    Description

      Goal is to provide a UDF that truncates a timestamp to a beginning of a tumbling window interval.

      /**
       * Tumbling windows are a series of fixed-sized, non-overlapping and contiguous time intervals.
       * Tumbling windows are inclusive start exclusive end.
       * By default the beginning instant of fist window is Epoch 0 Thu Jan 01 00:00:00 1970 UTC.
       * Optionally users may provide a different origin as a timestamp arg3.
       *
       * This an example of series of window with an interval of 5 seconds and origin Epoch 0 Thu Jan 01 00:00:00 1970 UTC:
       *
       *
       *   interval 1           interval 2            interval 3
       *   Jan 01 00:00:00      Jan 01 00:00:05       Jan 01 00:00:10
       * 0 -------------- 4 : 5 --------------- 9: 10 --------------- 14
       *
       * This UDF rounds timestamp agr1 to the beginning of window interval where it belongs to.
       *
       */
      

      Attachments

        1. HIVE-20768.patch
          17 kB
          Slim Bouguerra
        2. HIVE-20768.patch
          17 kB
          Slim Bouguerra
        3. HIVE-20768.3.patch
          17 kB
          Slim Bouguerra
        4. HIVE-20768.2.patch
          2.91 MB
          Slim Bouguerra

        Activity

          People

            bslim Slim Bouguerra
            bslim Slim Bouguerra
            Votes:
            0 Vote for this issue
            Watchers:
            3 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: