hive-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From br...@apache.org
Subject svn commit: r1650841 - in /hive/trunk/serde/src/java/org/apache/hadoop/hive/serde2/objectinspector/primitive: WritableByteObjectInspector.java WritableDoubleObjectInspector.java
Date Sun, 11 Jan 2015 01:00:08 GMT
Author: brock
Date: Sun Jan 11 01:00:07 2015
New Revision: 1650841

URL: http://svn.apache.org/r1650841
Log:
HIVE-9314 - Writable object inspector should use Writable classes from Hadoop for get (Jimmy
Xiang via Brock)

Modified:
    hive/trunk/serde/src/java/org/apache/hadoop/hive/serde2/objectinspector/primitive/WritableByteObjectInspector.java
    hive/trunk/serde/src/java/org/apache/hadoop/hive/serde2/objectinspector/primitive/WritableDoubleObjectInspector.java

Modified: hive/trunk/serde/src/java/org/apache/hadoop/hive/serde2/objectinspector/primitive/WritableByteObjectInspector.java
URL: http://svn.apache.org/viewvc/hive/trunk/serde/src/java/org/apache/hadoop/hive/serde2/objectinspector/primitive/WritableByteObjectInspector.java?rev=1650841&r1=1650840&r2=1650841&view=diff
==============================================================================
--- hive/trunk/serde/src/java/org/apache/hadoop/hive/serde2/objectinspector/primitive/WritableByteObjectInspector.java
(original)
+++ hive/trunk/serde/src/java/org/apache/hadoop/hive/serde2/objectinspector/primitive/WritableByteObjectInspector.java
Sun Jan 11 01:00:07 2015
@@ -33,17 +33,17 @@ public class WritableByteObjectInspector
 
   @Override
   public byte get(Object o) {
-    return ((ByteWritable) o).get();
+    return ((org.apache.hadoop.io.ByteWritable) o).get();
   }
 
   @Override
   public Object copyObject(Object o) {
-    return o == null ? null : new ByteWritable(((ByteWritable) o).get());
+    return o == null ? null : new ByteWritable(get(o));
   }
 
   @Override
   public Object getPrimitiveJavaObject(Object o) {
-    return o == null ? null : Byte.valueOf(((ByteWritable) o).get());
+    return o == null ? null : Byte.valueOf(get(o));
   }
 
   @Override
@@ -53,7 +53,7 @@ public class WritableByteObjectInspector
 
   @Override
   public Object set(Object o, byte value) {
-    ((ByteWritable) o).set(value);
+    ((org.apache.hadoop.io.ByteWritable) o).set(value);
     return o;
   }
 }

Modified: hive/trunk/serde/src/java/org/apache/hadoop/hive/serde2/objectinspector/primitive/WritableDoubleObjectInspector.java
URL: http://svn.apache.org/viewvc/hive/trunk/serde/src/java/org/apache/hadoop/hive/serde2/objectinspector/primitive/WritableDoubleObjectInspector.java?rev=1650841&r1=1650840&r2=1650841&view=diff
==============================================================================
--- hive/trunk/serde/src/java/org/apache/hadoop/hive/serde2/objectinspector/primitive/WritableDoubleObjectInspector.java
(original)
+++ hive/trunk/serde/src/java/org/apache/hadoop/hive/serde2/objectinspector/primitive/WritableDoubleObjectInspector.java
Sun Jan 11 01:00:07 2015
@@ -33,17 +33,17 @@ public class WritableDoubleObjectInspect
 
   @Override
   public double get(Object o) {
-    return ((DoubleWritable) o).get();
+    return ((org.apache.hadoop.io.DoubleWritable) o).get();
   }
 
   @Override
   public Object copyObject(Object o) {
-    return o == null ? null : new DoubleWritable(((DoubleWritable) o).get());
+    return o == null ? null : new DoubleWritable(get(o));
   }
 
   @Override
   public Object getPrimitiveJavaObject(Object o) {
-    return o == null ? null : Double.valueOf(((DoubleWritable) o).get());
+    return o == null ? null : Double.valueOf(get(o));
   }
 
   @Override
@@ -53,7 +53,7 @@ public class WritableDoubleObjectInspect
 
   @Override
   public Object set(Object o, double value) {
-    ((DoubleWritable) o).set(value);
+    ((org.apache.hadoop.io.DoubleWritable) o).set(value);
     return o;
   }
 



Mime
View raw message