You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@hive.apache.org by we...@apache.org on 2016/07/31 22:07:11 UTC
hive git commit: HIVE-14381 : Handle null value in
WindowingTableFunction.WindowingIterator.next() (Wei Zheng,
reviewed by Jesus Camacho Rodriguez)
Repository: hive
Updated Branches:
refs/heads/master 4f1cd26ce -> 4e850c753
HIVE-14381 : Handle null value in WindowingTableFunction.WindowingIterator.next() (Wei Zheng, reviewed by Jesus Camacho Rodriguez)
Project: http://git-wip-us.apache.org/repos/asf/hive/repo
Commit: http://git-wip-us.apache.org/repos/asf/hive/commit/4e850c75
Tree: http://git-wip-us.apache.org/repos/asf/hive/tree/4e850c75
Diff: http://git-wip-us.apache.org/repos/asf/hive/diff/4e850c75
Branch: refs/heads/master
Commit: 4e850c753a31c542bac0ce83877b802131e09c72
Parents: 4f1cd26
Author: Wei Zheng <we...@apache.org>
Authored: Sun Jul 31 15:08:58 2016 -0700
Committer: Wei Zheng <we...@apache.org>
Committed: Sun Jul 31 15:08:58 2016 -0700
----------------------------------------------------------------------
.../hadoop/hive/ql/udf/ptf/WindowingTableFunction.java | 8 +++++++-
1 file changed, 7 insertions(+), 1 deletion(-)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/hive/blob/4e850c75/ql/src/java/org/apache/hadoop/hive/ql/udf/ptf/WindowingTableFunction.java
----------------------------------------------------------------------
diff --git a/ql/src/java/org/apache/hadoop/hive/ql/udf/ptf/WindowingTableFunction.java b/ql/src/java/org/apache/hadoop/hive/ql/udf/ptf/WindowingTableFunction.java
index 3a2bc4f..e9f8ff9 100644
--- a/ql/src/java/org/apache/hadoop/hive/ql/udf/ptf/WindowingTableFunction.java
+++ b/ql/src/java/org/apache/hadoop/hive/ql/udf/ptf/WindowingTableFunction.java
@@ -1567,7 +1567,13 @@ public class WindowingTableFunction extends TableFunctionEvaluator {
wFn.getWFnEval().aggregate(aggBuffers[j], args[j]);
Object out = ((ISupportStreamingModeForWindowing) wFn.getWFnEval())
.getNextResult(aggBuffers[j]);
- out = ObjectInspectorUtils.copyToStandardObject(out, wFn.getOI());
+ if (out != null) {
+ if (out == ISupportStreamingModeForWindowing.NULL_RESULT) {
+ out = null;
+ } else {
+ out = ObjectInspectorUtils.copyToStandardObject(out, wFn.getOI());
+ }
+ }
output.set(j, out);
} else {
Range rng = getRange(wFn, currIdx, iPart);