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

Support min()/max() functions over x preceding and y preceding windowing

Log workAgile BoardRank to TopRank to BottomVotersWatch issueWatchersConvert to IssueMoveLinkCloneLabelsUpdate Comment AuthorReplace String in CommentUpdate Comment VisibilityDelete Comments
    XMLWordPrintableJSON

Details

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

    Description

      Currently the query

      select key, value, min(value) over (partition by key order by value rows between 1 preceding and 1 preceding) from small;
      

      doesn't work. It failed with

      java.lang.RuntimeException: org.apache.hadoop.hive.ql.metadata.HiveException: Hive Runtime Error while processing row (tag=0) {"key":{"reducesinkkey0":"2"},"value":{"_col0":"500"}}
              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":"2"},"value":{"_col0":"500"}}
              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:520)
              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-10826.patch
          43 kB
          Aihua Xu

        Activity

          This comment will be Viewable by All Users Viewable by All Users
          Cancel

          People

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

            Dates

              Created:
              Updated:
              Resolved:

              Issue deployment