hive-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From ser...@apache.org
Subject [43/50] [abbrv] hive git commit: HIVE-11176 : Caused by: java.lang.ClassCastException: org.apache.hadoop.hive.serde2.lazybinary.LazyBinaryStruct cannot be cast to [Ljava.lang.Object; (Navis via Ashutosh Chauhan)
Date Tue, 25 Aug 2015 21:29:13 GMT
HIVE-11176 : Caused by: java.lang.ClassCastException: org.apache.hadoop.hive.serde2.lazybinary.LazyBinaryStruct
cannot be cast to [Ljava.lang.Object; (Navis via Ashutosh Chauhan)


Project: http://git-wip-us.apache.org/repos/asf/hive/repo
Commit: http://git-wip-us.apache.org/repos/asf/hive/commit/a16bbd48
Tree: http://git-wip-us.apache.org/repos/asf/hive/tree/a16bbd48
Diff: http://git-wip-us.apache.org/repos/asf/hive/diff/a16bbd48

Branch: refs/heads/llap
Commit: a16bbd4877da11871656ed082a84d6809139740f
Parents: f7ebff0
Author: Navis Ryu <navis@apache.org>
Authored: Tue Aug 11 17:34:00 2015 -0800
Committer: Ashutosh Chauhan <hashutosh@apache.org>
Committed: Mon Aug 24 00:30:11 2015 -0700

----------------------------------------------------------------------
 .../serde2/objectinspector/StandardStructObjectInspector.java | 7 ++++++-
 1 file changed, 6 insertions(+), 1 deletion(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/hive/blob/a16bbd48/serde/src/java/org/apache/hadoop/hive/serde2/objectinspector/StandardStructObjectInspector.java
----------------------------------------------------------------------
diff --git a/serde/src/java/org/apache/hadoop/hive/serde2/objectinspector/StandardStructObjectInspector.java
b/serde/src/java/org/apache/hadoop/hive/serde2/objectinspector/StandardStructObjectInspector.java
index c96fc2d..87a072c 100644
--- a/serde/src/java/org/apache/hadoop/hive/serde2/objectinspector/StandardStructObjectInspector.java
+++ b/serde/src/java/org/apache/hadoop/hive/serde2/objectinspector/StandardStructObjectInspector.java
@@ -163,8 +163,13 @@ public class StandardStructObjectInspector extends
     }
     // We support both List<Object> and Object[]
     // so we have to do differently.
-    boolean isArray = ! (data instanceof List);
+    boolean isArray = data.getClass().isArray();
     if (!isArray && !(data instanceof List)) {
+      if (!warned) {
+        LOG.warn("Invalid type for struct " + data.getClass());
+        LOG.warn("ignoring similar errors.");
+        warned = true;
+      }
       return data;
     }
     int listSize = (isArray ? ((Object[]) data).length : ((List<Object>) data)


Mime
View raw message