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

Support First_value()/last_value() over x preceding and y preceding windowing

    XMLWordPrintableJSON

Details

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

    Description

      Currently the following query

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

      throws exception:

      java.lang.RuntimeException: org.apache.hadoop.hive.ql.metadata.HiveException: Hive Runtime Error while processing row (tag=0) {"key":{"reducesinkkey0":"2013-03-01 09:11:58.703071","reducesinkkey1":-3},"value":{"_col3":0.83}}
              at org.apache.hadoop.hive.ql.exec.mr.ExecReducer.reduce(ExecReducer.java:256)
              at org.apache.hadoop.mapred.ReduceTask.runOldReducer(ReduceTask.java:506)
              at org.apache.hadoop.mapred.ReduceTask.run(ReduceTask.java:447)
              at org.apache.hadoop.mapred.LocalJobRunner$Job.run(LocalJobRunner.java:449)
      Caused by: org.apache.hadoop.hive.ql.metadata.HiveException: Hive Runtime Error while processing row (tag=0) {"key":{"reducesinkkey0":"2013-03-01 09:11:58.703071","reducesinkkey1":-3},"value":{"_col3":0.83}}
              at org.apache.hadoop.hive.ql.exec.mr.ExecReducer.reduce(ExecReducer.java:244)
              ... 3 more
      Caused by: org.apache.hadoop.hive.ql.metadata.HiveException: Internal Error: cannot generate all output rows for a Partition
              at org.apache.hadoop.hive.ql.udf.ptf.WindowingTableFunction.finishPartition(WindowingTableFunction.java:519)
              at org.apache.hadoop.hive.ql.exec.PTFOperator$PTFInvocation.finishPartition(PTFOperator.java:337)
              at org.apache.hadoop.hive.ql.exec.PTFOperator.process(PTFOperator.java:114)
              at org.apache.hadoop.hive.ql.exec.Operator.forward(Operator.java:837)
              at org.apache.hadoop.hive.ql.exec.SelectOperator.process(SelectOperator.java:88)
              at org.apache.hadoop.hive.ql.exec.mr.ExecReducer.reduce(ExecReducer.java:235)
      

      Attachments

        1. HIVE-10834.patch
          47 kB
          Aihua Xu

        Issue Links

          Activity

            People

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

              Dates

                Created:
                Updated:
                Resolved: