hive-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From jxi...@apache.org
Subject hive git commit: HIVE-13237: Select parquet struct field with upper case throws NPE (Jimmy, reviewed by Xuefu)
Date Fri, 11 Mar 2016 15:45:38 GMT
Repository: hive
Updated Branches:
  refs/heads/master 62bae5e1a -> b6502b5ea


HIVE-13237: Select parquet struct field with upper case throws NPE (Jimmy, reviewed by Xuefu)


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

Branch: refs/heads/master
Commit: b6502b5ea35f316ed10e71d845a7b5c6ab4ad151
Parents: 62bae5e
Author: Jimmy Xiang <jxiang@apache.org>
Authored: Tue Mar 8 17:47:38 2016 -0800
Committer: Jimmy Xiang <jxiang@apache.org>
Committed: Fri Mar 11 07:33:56 2016 -0800

----------------------------------------------------------------------
 .../hive/ql/io/parquet/serde/ArrayWritableObjectInspector.java   | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/hive/blob/b6502b5e/ql/src/java/org/apache/hadoop/hive/ql/io/parquet/serde/ArrayWritableObjectInspector.java
----------------------------------------------------------------------
diff --git a/ql/src/java/org/apache/hadoop/hive/ql/io/parquet/serde/ArrayWritableObjectInspector.java
b/ql/src/java/org/apache/hadoop/hive/ql/io/parquet/serde/ArrayWritableObjectInspector.java
index 7873c99..5f852d0 100644
--- a/ql/src/java/org/apache/hadoop/hive/ql/io/parquet/serde/ArrayWritableObjectInspector.java
+++ b/ql/src/java/org/apache/hadoop/hive/ql/io/parquet/serde/ArrayWritableObjectInspector.java
@@ -63,7 +63,7 @@ public class ArrayWritableObjectInspector extends SettableStructObjectInspector
 
       final StructFieldImpl field = new StructFieldImpl(name, getObjectInspector(fieldInfo),
i);
       fields.add(field);
-      fieldsByName.put(name, field);
+      fieldsByName.put(name.toLowerCase(), field);
     }
   }
 
@@ -158,7 +158,7 @@ public class ArrayWritableObjectInspector extends SettableStructObjectInspector
 
   @Override
   public StructField getStructFieldRef(final String name) {
-    return fieldsByName.get(name);
+    return fieldsByName.get(name.toLowerCase());
   }
 
   @Override


Mime
View raw message