hive-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From xu...@apache.org
Subject svn commit: r1644765 - in /hive/branches/spark: ./ hbase-handler/pom.xml serde/src/java/org/apache/hadoop/hive/serde2/objectinspector/ObjectInspectorFactory.java serde/src/java/org/apache/hadoop/hive/serde2/objectinspector/UnionStructObjectInspector.java
Date Thu, 11 Dec 2014 20:57:28 GMT
Author: xuefu
Date: Thu Dec 11 20:57:27 2014
New Revision: 1644765

URL: http://svn.apache.org/r1644765
Log:
HIVE-9043: HiveException: Conflict on row inspector for {table} (Szehon via Xuefu)
merged from trunk, r1644764

Modified:
    hive/branches/spark/   (props changed)
    hive/branches/spark/hbase-handler/pom.xml   (props changed)
    hive/branches/spark/serde/src/java/org/apache/hadoop/hive/serde2/objectinspector/ObjectInspectorFactory.java
    hive/branches/spark/serde/src/java/org/apache/hadoop/hive/serde2/objectinspector/UnionStructObjectInspector.java

Propchange: hive/branches/spark/
------------------------------------------------------------------------------
--- svn:mergeinfo (original)
+++ svn:mergeinfo Thu Dec 11 20:57:27 2014
@@ -2,4 +2,4 @@
 /hive/branches/cbo:1605012-1627125
 /hive/branches/tez:1494760-1622766
 /hive/branches/vectorization:1466908-1527856
-/hive/trunk:1608589-1642369,1643125,1644171,1644717
+/hive/trunk:1608589-1642369,1643125,1644171,1644717,1644764

Propchange: hive/branches/spark/hbase-handler/pom.xml
------------------------------------------------------------------------------
--- svn:mergeinfo (original)
+++ svn:mergeinfo Thu Dec 11 20:57:27 2014
@@ -2,4 +2,4 @@
 /hive/branches/cbo/hbase-handler/pom.xml:1605012-1627125
 /hive/branches/tez/hbase-handler/pom.xml:1494760-1622766
 /hive/branches/vectorization/hbase-handler/pom.xml:1466908-1527856
-/hive/trunk/hbase-handler/pom.xml:1494760-1537575,1608589-1633422,1633911,1634262,1634442,1634636,1634946,1636885,1636888,1637521,1641875,1642127,1642148,1643125,1644171,1644717
+/hive/trunk/hbase-handler/pom.xml:1494760-1537575,1608589-1633422,1633911,1634262,1634442,1634636,1634946,1636885,1636888,1637521,1641875,1642127,1642148,1643125,1644171,1644717,1644764

Modified: hive/branches/spark/serde/src/java/org/apache/hadoop/hive/serde2/objectinspector/ObjectInspectorFactory.java
URL: http://svn.apache.org/viewvc/hive/branches/spark/serde/src/java/org/apache/hadoop/hive/serde2/objectinspector/ObjectInspectorFactory.java?rev=1644765&r1=1644764&r2=1644765&view=diff
==============================================================================
--- hive/branches/spark/serde/src/java/org/apache/hadoop/hive/serde2/objectinspector/ObjectInspectorFactory.java
(original)
+++ hive/branches/spark/serde/src/java/org/apache/hadoop/hive/serde2/objectinspector/ObjectInspectorFactory.java
Thu Dec 11 20:57:27 2014
@@ -18,7 +18,6 @@
 
 package org.apache.hadoop.hive.serde2.objectinspector;
 
-import java.lang.reflect.Field;
 import java.lang.reflect.GenericArrayType;
 import java.lang.reflect.ParameterizedType;
 import java.lang.reflect.Type;
@@ -202,7 +201,11 @@ public final class ObjectInspectorFactor
         .get(listElementObjectInspector);
     if (result == null) {
       result = new StandardListObjectInspector(listElementObjectInspector);
-      cachedStandardListObjectInspector.put(listElementObjectInspector, result);
+      StandardListObjectInspector prev =
+        cachedStandardListObjectInspector.putIfAbsent(listElementObjectInspector, result);
+      if (prev != null) {
+        result = prev;
+      }
     }
     return result;
   }
@@ -227,7 +230,11 @@ public final class ObjectInspectorFactor
     if (result == null) {
       result = new StandardMapObjectInspector(mapKeyObjectInspector,
           mapValueObjectInspector);
-      cachedStandardMapObjectInspector.put(signature, result);
+      StandardMapObjectInspector prev =
+        cachedStandardMapObjectInspector.putIfAbsent(signature, result);
+      if (prev != null) {
+        result = prev;
+      }
     }
     return result;
   }
@@ -250,7 +257,11 @@ public final class ObjectInspectorFactor
         .get(unionObjectInspectors);
     if (result == null) {
       result = new StandardUnionObjectInspector(unionObjectInspectors);
-      cachedStandardUnionObjectInspector.put(unionObjectInspectors, result);
+      StandardUnionObjectInspector prev =
+        cachedStandardUnionObjectInspector.putIfAbsent(unionObjectInspectors, result);
+      if (prev != null) {
+        result = prev;
+      }
     }
     return result;
   }
@@ -277,7 +288,11 @@ public final class ObjectInspectorFactor
     StandardStructObjectInspector result = cachedStandardStructObjectInspector.get(signature);
     if(result == null) {
       result = new StandardStructObjectInspector(structFieldNames, structFieldObjectInspectors,
structComments);
-      cachedStandardStructObjectInspector.put(signature, result);
+      StandardStructObjectInspector prev =
+        cachedStandardStructObjectInspector.putIfAbsent(signature, result);
+      if (prev != null) {
+        result = prev;
+      }
     }
     return result;
   }
@@ -291,7 +306,11 @@ public final class ObjectInspectorFactor
         .get(structObjectInspectors);
     if (result == null) {
       result = new UnionStructObjectInspector(structObjectInspectors);
-      cachedUnionStructObjectInspector.put(structObjectInspectors, result);
+      UnionStructObjectInspector prev =
+        cachedUnionStructObjectInspector.putIfAbsent(structObjectInspectors, result);
+      if (prev != null) {
+        result = prev;
+      }
     }
     return result;
   }
@@ -319,7 +338,11 @@ public final class ObjectInspectorFactor
     if (result == null) {
       result = new ColumnarStructObjectInspector(structFieldNames,
           structFieldObjectInspectors, structFieldComments);
-      cachedColumnarStructObjectInspector.put(signature, result);
+      ColumnarStructObjectInspector prev =
+        cachedColumnarStructObjectInspector.putIfAbsent(signature, result);
+      if (prev != null) {
+        result = prev;
+      }
     }
     return result;
   }

Modified: hive/branches/spark/serde/src/java/org/apache/hadoop/hive/serde2/objectinspector/UnionStructObjectInspector.java
URL: http://svn.apache.org/viewvc/hive/branches/spark/serde/src/java/org/apache/hadoop/hive/serde2/objectinspector/UnionStructObjectInspector.java?rev=1644765&r1=1644764&r2=1644765&view=diff
==============================================================================
--- hive/branches/spark/serde/src/java/org/apache/hadoop/hive/serde2/objectinspector/UnionStructObjectInspector.java
(original)
+++ hive/branches/spark/serde/src/java/org/apache/hadoop/hive/serde2/objectinspector/UnionStructObjectInspector.java
Thu Dec 11 20:57:27 2014
@@ -98,6 +98,23 @@ public class UnionStructObjectInspector
     }
   }
 
+  @Override
+  public boolean equals(Object o) {
+    if (o == this) {
+      return true;
+    }
+    if (!(o instanceof UnionStructObjectInspector)) {
+      return false;
+    }
+    return unionObjectInspectors.equals(
+      ((UnionStructObjectInspector)o).unionObjectInspectors);
+  }
+
+  @Override
+  public int hashCode() {
+    return unionObjectInspectors.hashCode();
+  }
+
   public final Category getCategory() {
     return Category.STRUCT;
   }



Mime
View raw message