You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@hive.apache.org by px...@apache.org on 2015/08/12 08:25:03 UTC
hive git commit: HIVE-9507 : Make "LATERAL VIEW inline(expression)
mytable" tolerant to nulls (Navis reviewed by Ashutosh Chauhan)
Repository: hive
Updated Branches:
refs/heads/branch-1.0 842c527ae -> cafd55593
HIVE-9507 : Make "LATERAL VIEW inline(expression) mytable" tolerant to nulls (Navis reviewed by Ashutosh Chauhan)
git-svn-id: https://svn.apache.org/repos/asf/hive/trunk@1658625 13f79535-47bb-0310-9956-ffa450edef68
Project: http://git-wip-us.apache.org/repos/asf/hive/repo
Commit: http://git-wip-us.apache.org/repos/asf/hive/commit/cafd5559
Tree: http://git-wip-us.apache.org/repos/asf/hive/tree/cafd5559
Diff: http://git-wip-us.apache.org/repos/asf/hive/diff/cafd5559
Branch: refs/heads/branch-1.0
Commit: cafd555930dc1cc4edfb3ff1a7210d007092e842
Parents: 842c527
Author: Navis Ryu <na...@apache.org>
Authored: Tue Feb 10 06:47:09 2015 +0000
Committer: Pengcheng Xiong <px...@apache.org>
Committed: Tue Aug 11 23:24:50 2015 -0700
----------------------------------------------------------------------
.../apache/hadoop/hive/ql/udf/generic/GenericUDTFInline.java | 8 ++++++--
.../hadoop/hive/serde2/lazybinary/LazyBinaryArray.java | 2 +-
2 files changed, 7 insertions(+), 3 deletions(-)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/hive/blob/cafd5559/ql/src/java/org/apache/hadoop/hive/ql/udf/generic/GenericUDTFInline.java
----------------------------------------------------------------------
diff --git a/ql/src/java/org/apache/hadoop/hive/ql/udf/generic/GenericUDTFInline.java b/ql/src/java/org/apache/hadoop/hive/ql/udf/generic/GenericUDTFInline.java
index 2152d97..ab5a2bf 100644
--- a/ql/src/java/org/apache/hadoop/hive/ql/udf/generic/GenericUDTFInline.java
+++ b/ql/src/java/org/apache/hadoop/hive/ql/udf/generic/GenericUDTFInline.java
@@ -19,6 +19,7 @@
package org.apache.hadoop.hive.ql.udf.generic;
import java.util.ArrayList;
+import java.util.List;
import org.apache.hadoop.hive.ql.exec.Description;
import org.apache.hadoop.hive.ql.exec.UDFArgumentException;
@@ -57,8 +58,11 @@ public class GenericUDTFInline extends GenericUDTF {
@Override
public void process(Object[] os) throws HiveException {
- for (Object row : new ArrayList<Object>(li.getList(os[0]))) {
- forward(row);
+ List<?> list = li.getList(os[0]);
+ if (list != null && !list.isEmpty()) {
+ for (Object row : list.toArray()) {
+ forward(row);
+ }
}
}
http://git-wip-us.apache.org/repos/asf/hive/blob/cafd5559/serde/src/java/org/apache/hadoop/hive/serde2/lazybinary/LazyBinaryArray.java
----------------------------------------------------------------------
diff --git a/serde/src/java/org/apache/hadoop/hive/serde2/lazybinary/LazyBinaryArray.java b/serde/src/java/org/apache/hadoop/hive/serde2/lazybinary/LazyBinaryArray.java
index 4929f67..fee1472 100644
--- a/serde/src/java/org/apache/hadoop/hive/serde2/lazybinary/LazyBinaryArray.java
+++ b/serde/src/java/org/apache/hadoop/hive/serde2/lazybinary/LazyBinaryArray.java
@@ -214,7 +214,7 @@ public class LazyBinaryArray extends
/**
* cachedList is reused every time getList is called. Different
- * LazyBianryArray instances cannot share the same cachedList.
+ * LazyBinaryArray instances cannot share the same cachedList.
*/
ArrayList<Object> cachedList;