You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@hive.apache.org by ha...@apache.org on 2012/04/20 02:50:31 UTC

svn commit: r1328160 - in /hive/branches/branch-0.9: ./ hbase-handler/src/test/queries/ hbase-handler/src/test/results/ serde/src/java/org/apache/hadoop/hive/serde2/lazydio/

Author: hashutosh
Date: Fri Apr 20 00:50:30 2012
New Revision: 1328160

URL: http://svn.apache.org/viewvc?rev=1328160&view=rev
Log:
Merged in HIVE-2958 : GROUP BY causing ClassCastException [LazyDioInteger cannot be cast LazyInteger] (navis via hashutosh)

Modified:
    hive/branches/branch-0.9/   (props changed)
    hive/branches/branch-0.9/hbase-handler/src/test/queries/hbase_binary_external_table_queries.q
    hive/branches/branch-0.9/hbase-handler/src/test/results/hbase_binary_external_table_queries.q.out
    hive/branches/branch-0.9/serde/src/java/org/apache/hadoop/hive/serde2/lazydio/LazyDioBoolean.java
    hive/branches/branch-0.9/serde/src/java/org/apache/hadoop/hive/serde2/lazydio/LazyDioByte.java
    hive/branches/branch-0.9/serde/src/java/org/apache/hadoop/hive/serde2/lazydio/LazyDioDouble.java
    hive/branches/branch-0.9/serde/src/java/org/apache/hadoop/hive/serde2/lazydio/LazyDioFloat.java
    hive/branches/branch-0.9/serde/src/java/org/apache/hadoop/hive/serde2/lazydio/LazyDioInteger.java
    hive/branches/branch-0.9/serde/src/java/org/apache/hadoop/hive/serde2/lazydio/LazyDioLong.java
    hive/branches/branch-0.9/serde/src/java/org/apache/hadoop/hive/serde2/lazydio/LazyDioShort.java

Propchange: hive/branches/branch-0.9/
------------------------------------------------------------------------------
  Merged /hive/trunk:r1328157

Modified: hive/branches/branch-0.9/hbase-handler/src/test/queries/hbase_binary_external_table_queries.q
URL: http://svn.apache.org/viewvc/hive/branches/branch-0.9/hbase-handler/src/test/queries/hbase_binary_external_table_queries.q?rev=1328160&r1=1328159&r2=1328160&view=diff
==============================================================================
--- hive/branches/branch-0.9/hbase-handler/src/test/queries/hbase_binary_external_table_queries.q (original)
+++ hive/branches/branch-0.9/hbase-handler/src/test/queries/hbase_binary_external_table_queries.q Fri Apr 20 00:50:30 2012
@@ -35,4 +35,7 @@ TBLPROPERTIES (
 
 SELECT * from t_ext_hbase_3;
 
+--HIVE-2958
+SELECT c_int, count(*) FROM t_ext_hbase_3 GROUP BY c_int;
+
 DROP table t_ext_hbase_3;

Modified: hive/branches/branch-0.9/hbase-handler/src/test/results/hbase_binary_external_table_queries.q.out
URL: http://svn.apache.org/viewvc/hive/branches/branch-0.9/hbase-handler/src/test/results/hbase_binary_external_table_queries.q.out?rev=1328160&r1=1328159&r2=1328160&view=diff
==============================================================================
--- hive/branches/branch-0.9/hbase-handler/src/test/results/hbase_binary_external_table_queries.q.out (original)
+++ hive/branches/branch-0.9/hbase-handler/src/test/results/hbase_binary_external_table_queries.q.out Fri Apr 20 00:50:30 2012
@@ -108,6 +108,19 @@ POSTHOOK: Input: default@t_ext_hbase_3
 key-1	true	-128	-32768	-2147483648	-9223372036854775808	Hadoop, HBase,	1.4E-45	4.9E-324
 key-2	false	-1	-1	-1	-1	Hive	-1.0	-1.0
 key-3	true	127	32767	2147483647	9223372036854775807	Test Strings	3.4028235E38	1.7976931348623157E308
+PREHOOK: query: --HIVE-2958
+SELECT c_int, count(*) FROM t_ext_hbase_3 GROUP BY c_int
+PREHOOK: type: QUERY
+PREHOOK: Input: default@t_ext_hbase_3
+#### A masked pattern was here ####
+POSTHOOK: query: --HIVE-2958
+SELECT c_int, count(*) FROM t_ext_hbase_3 GROUP BY c_int
+POSTHOOK: type: QUERY
+POSTHOOK: Input: default@t_ext_hbase_3
+#### A masked pattern was here ####
+-2147483648	1
+-1	1
+2147483647	1
 PREHOOK: query: DROP table t_ext_hbase_3
 PREHOOK: type: DROPTABLE
 PREHOOK: Input: default@t_ext_hbase_3

Modified: hive/branches/branch-0.9/serde/src/java/org/apache/hadoop/hive/serde2/lazydio/LazyDioBoolean.java
URL: http://svn.apache.org/viewvc/hive/branches/branch-0.9/serde/src/java/org/apache/hadoop/hive/serde2/lazydio/LazyDioBoolean.java?rev=1328160&r1=1328159&r2=1328160&view=diff
==============================================================================
--- hive/branches/branch-0.9/serde/src/java/org/apache/hadoop/hive/serde2/lazydio/LazyDioBoolean.java (original)
+++ hive/branches/branch-0.9/serde/src/java/org/apache/hadoop/hive/serde2/lazydio/LazyDioBoolean.java Fri Apr 20 00:50:30 2012
@@ -23,28 +23,25 @@ import java.io.IOException;
 
 import org.apache.hadoop.hive.serde2.ByteStream;
 import org.apache.hadoop.hive.serde2.lazy.ByteArrayRef;
-import org.apache.hadoop.hive.serde2.lazy.LazyPrimitive;
+import org.apache.hadoop.hive.serde2.lazy.LazyBoolean;
 import org.apache.hadoop.hive.serde2.lazy.objectinspector.primitive.LazyBooleanObjectInspector;
-import org.apache.hadoop.io.BooleanWritable;
 
 /**
  * LazyBooleanBinary for storing a boolean value as an BooleanWritable. This class complements class
  * LazyBoolean. It's primary difference is the {@link #init(ByteArrayRef, int, int)} method, which
  * reads the boolean value stored from the default binary format.
  */
-public class LazyDioBoolean extends LazyPrimitive<LazyBooleanObjectInspector, BooleanWritable> {
+public class LazyDioBoolean extends LazyBoolean {
 
   private ByteStream.Input in;
   private DataInputStream din;
 
   public LazyDioBoolean(LazyBooleanObjectInspector oi) {
     super(oi);
-    data = new BooleanWritable();
   }
 
   public LazyDioBoolean(LazyDioBoolean copy) {
     super(copy);
-    data = new BooleanWritable(copy.data.get());
   }
 
   /* (non-Javadoc)

Modified: hive/branches/branch-0.9/serde/src/java/org/apache/hadoop/hive/serde2/lazydio/LazyDioByte.java
URL: http://svn.apache.org/viewvc/hive/branches/branch-0.9/serde/src/java/org/apache/hadoop/hive/serde2/lazydio/LazyDioByte.java?rev=1328160&r1=1328159&r2=1328160&view=diff
==============================================================================
--- hive/branches/branch-0.9/serde/src/java/org/apache/hadoop/hive/serde2/lazydio/LazyDioByte.java (original)
+++ hive/branches/branch-0.9/serde/src/java/org/apache/hadoop/hive/serde2/lazydio/LazyDioByte.java Fri Apr 20 00:50:30 2012
@@ -22,9 +22,8 @@ import java.io.DataInputStream;
 import java.io.IOException;
 
 import org.apache.hadoop.hive.serde2.ByteStream;
-import org.apache.hadoop.hive.serde2.io.ByteWritable;
 import org.apache.hadoop.hive.serde2.lazy.ByteArrayRef;
-import org.apache.hadoop.hive.serde2.lazy.LazyPrimitive;
+import org.apache.hadoop.hive.serde2.lazy.LazyByte;
 import org.apache.hadoop.hive.serde2.lazy.objectinspector.primitive.LazyByteObjectInspector;
 
 /**
@@ -32,19 +31,17 @@ import org.apache.hadoop.hive.serde2.laz
  * LazyByte. It's primary difference is the {@link #init(ByteArrayRef, int, int)} method, which
  * reads the raw byte value stored.
  */
-public class LazyDioByte extends LazyPrimitive<LazyByteObjectInspector, ByteWritable> {
+public class LazyDioByte extends LazyByte {
 
   private ByteStream.Input in;
   private DataInputStream din;
 
   public LazyDioByte(LazyByteObjectInspector oi) {
     super(oi);
-    data = new ByteWritable();
   }
 
   public LazyDioByte(LazyDioByte copy) {
     super(copy);
-    data = new ByteWritable(copy.data.get());
   }
 
   @Override

Modified: hive/branches/branch-0.9/serde/src/java/org/apache/hadoop/hive/serde2/lazydio/LazyDioDouble.java
URL: http://svn.apache.org/viewvc/hive/branches/branch-0.9/serde/src/java/org/apache/hadoop/hive/serde2/lazydio/LazyDioDouble.java?rev=1328160&r1=1328159&r2=1328160&view=diff
==============================================================================
--- hive/branches/branch-0.9/serde/src/java/org/apache/hadoop/hive/serde2/lazydio/LazyDioDouble.java (original)
+++ hive/branches/branch-0.9/serde/src/java/org/apache/hadoop/hive/serde2/lazydio/LazyDioDouble.java Fri Apr 20 00:50:30 2012
@@ -22,9 +22,8 @@ import java.io.DataInputStream;
 import java.io.IOException;
 
 import org.apache.hadoop.hive.serde2.ByteStream;
-import org.apache.hadoop.hive.serde2.io.DoubleWritable;
 import org.apache.hadoop.hive.serde2.lazy.ByteArrayRef;
-import org.apache.hadoop.hive.serde2.lazy.LazyPrimitive;
+import org.apache.hadoop.hive.serde2.lazy.LazyDouble;
 import org.apache.hadoop.hive.serde2.lazy.objectinspector.primitive.LazyDoubleObjectInspector;
 
 /**
@@ -32,19 +31,17 @@ import org.apache.hadoop.hive.serde2.laz
  * LazyDouble. It's primary difference is the {@link #init(ByteArrayRef, int, int)} method, which
  * reads the double value stored from the default binary format.
  */
-public class LazyDioDouble extends LazyPrimitive<LazyDoubleObjectInspector, DoubleWritable> {
+public class LazyDioDouble extends LazyDouble {
 
   private ByteStream.Input in;
   private DataInputStream din;
 
   public LazyDioDouble(LazyDoubleObjectInspector oi) {
     super(oi);
-    data = new DoubleWritable();
   }
 
   LazyDioDouble(LazyDioDouble copy) {
     super(copy);
-    data = new DoubleWritable(copy.data.get());
   }
 
   /* (non-Javadoc)

Modified: hive/branches/branch-0.9/serde/src/java/org/apache/hadoop/hive/serde2/lazydio/LazyDioFloat.java
URL: http://svn.apache.org/viewvc/hive/branches/branch-0.9/serde/src/java/org/apache/hadoop/hive/serde2/lazydio/LazyDioFloat.java?rev=1328160&r1=1328159&r2=1328160&view=diff
==============================================================================
--- hive/branches/branch-0.9/serde/src/java/org/apache/hadoop/hive/serde2/lazydio/LazyDioFloat.java (original)
+++ hive/branches/branch-0.9/serde/src/java/org/apache/hadoop/hive/serde2/lazydio/LazyDioFloat.java Fri Apr 20 00:50:30 2012
@@ -23,28 +23,25 @@ import java.io.IOException;
 
 import org.apache.hadoop.hive.serde2.ByteStream;
 import org.apache.hadoop.hive.serde2.lazy.ByteArrayRef;
-import org.apache.hadoop.hive.serde2.lazy.LazyPrimitive;
+import org.apache.hadoop.hive.serde2.lazy.LazyFloat;
 import org.apache.hadoop.hive.serde2.lazy.objectinspector.primitive.LazyFloatObjectInspector;
-import org.apache.hadoop.io.FloatWritable;
 
 /**
  * LazyFloatBinary for storing a float value as a FloatWritable. This class complements class
  * LazyFloat. It's primary difference is the {@link #init(ByteArrayRef, int, int)} method, which
  * reads the float value stored from the default binary format.
  */
-public class LazyDioFloat extends LazyPrimitive<LazyFloatObjectInspector, FloatWritable> {
+public class LazyDioFloat extends LazyFloat {
 
   private ByteStream.Input in;
   private DataInputStream din;
 
   public LazyDioFloat(LazyFloatObjectInspector oi) {
     super(oi);
-    data = new FloatWritable();
   }
 
   public LazyDioFloat(LazyDioFloat copy) {
     super(copy);
-    data = new FloatWritable(copy.data.get());
   }
 
   /* (non-Javadoc)

Modified: hive/branches/branch-0.9/serde/src/java/org/apache/hadoop/hive/serde2/lazydio/LazyDioInteger.java
URL: http://svn.apache.org/viewvc/hive/branches/branch-0.9/serde/src/java/org/apache/hadoop/hive/serde2/lazydio/LazyDioInteger.java?rev=1328160&r1=1328159&r2=1328160&view=diff
==============================================================================
--- hive/branches/branch-0.9/serde/src/java/org/apache/hadoop/hive/serde2/lazydio/LazyDioInteger.java (original)
+++ hive/branches/branch-0.9/serde/src/java/org/apache/hadoop/hive/serde2/lazydio/LazyDioInteger.java Fri Apr 20 00:50:30 2012
@@ -23,28 +23,25 @@ import java.io.IOException;
 
 import org.apache.hadoop.hive.serde2.ByteStream;
 import org.apache.hadoop.hive.serde2.lazy.ByteArrayRef;
-import org.apache.hadoop.hive.serde2.lazy.LazyPrimitive;
+import org.apache.hadoop.hive.serde2.lazy.LazyInteger;
 import org.apache.hadoop.hive.serde2.lazy.objectinspector.primitive.LazyIntObjectInspector;
-import org.apache.hadoop.io.IntWritable;
 
 /**
  * LazyIntegerBinary for storing an int value as an IntWritable. This class complements class
  * LazyInteger. It's primary difference is the {@link #init(ByteArrayRef, int, int)} method, which
  * reads the integer value stored from the default binary format.
  */
-public class LazyDioInteger extends LazyPrimitive<LazyIntObjectInspector, IntWritable> {
+public class LazyDioInteger extends LazyInteger {
 
   private ByteStream.Input in;
   private DataInputStream din;
 
   public LazyDioInteger(LazyIntObjectInspector oi) {
     super(oi);
-    data = new IntWritable();
   }
 
   public LazyDioInteger(LazyDioInteger copy) {
     super(copy);
-    data = new IntWritable(copy.data.get());
   }
 
   /* (non-Javadoc)

Modified: hive/branches/branch-0.9/serde/src/java/org/apache/hadoop/hive/serde2/lazydio/LazyDioLong.java
URL: http://svn.apache.org/viewvc/hive/branches/branch-0.9/serde/src/java/org/apache/hadoop/hive/serde2/lazydio/LazyDioLong.java?rev=1328160&r1=1328159&r2=1328160&view=diff
==============================================================================
--- hive/branches/branch-0.9/serde/src/java/org/apache/hadoop/hive/serde2/lazydio/LazyDioLong.java (original)
+++ hive/branches/branch-0.9/serde/src/java/org/apache/hadoop/hive/serde2/lazydio/LazyDioLong.java Fri Apr 20 00:50:30 2012
@@ -23,28 +23,25 @@ import java.io.IOException;
 
 import org.apache.hadoop.hive.serde2.ByteStream;
 import org.apache.hadoop.hive.serde2.lazy.ByteArrayRef;
-import org.apache.hadoop.hive.serde2.lazy.LazyPrimitive;
+import org.apache.hadoop.hive.serde2.lazy.LazyLong;
 import org.apache.hadoop.hive.serde2.lazy.objectinspector.primitive.LazyLongObjectInspector;
-import org.apache.hadoop.io.LongWritable;
 
 /**
  * LazyLongBinary for storing a long value as a LongWritable. This class complements class
  * LazyLong. It's primary difference is the {@link #init(ByteArrayRef, int, int)} method, which
  * reads the long value stored in the default binary format.
  */
-public class LazyDioLong extends LazyPrimitive<LazyLongObjectInspector, LongWritable> {
+public class LazyDioLong extends LazyLong {
 
   private ByteStream.Input in;
   private DataInputStream din;
 
   public LazyDioLong(LazyLongObjectInspector oi) {
     super(oi);
-    data = new LongWritable();
   }
 
   public LazyDioLong(LazyDioLong copy) {
     super(copy);
-    data = new LongWritable(copy.data.get());
   }
 
   /* (non-Javadoc)

Modified: hive/branches/branch-0.9/serde/src/java/org/apache/hadoop/hive/serde2/lazydio/LazyDioShort.java
URL: http://svn.apache.org/viewvc/hive/branches/branch-0.9/serde/src/java/org/apache/hadoop/hive/serde2/lazydio/LazyDioShort.java?rev=1328160&r1=1328159&r2=1328160&view=diff
==============================================================================
--- hive/branches/branch-0.9/serde/src/java/org/apache/hadoop/hive/serde2/lazydio/LazyDioShort.java (original)
+++ hive/branches/branch-0.9/serde/src/java/org/apache/hadoop/hive/serde2/lazydio/LazyDioShort.java Fri Apr 20 00:50:30 2012
@@ -22,9 +22,8 @@ import java.io.DataInputStream;
 import java.io.IOException;
 
 import org.apache.hadoop.hive.serde2.ByteStream;
-import org.apache.hadoop.hive.serde2.io.ShortWritable;
 import org.apache.hadoop.hive.serde2.lazy.ByteArrayRef;
-import org.apache.hadoop.hive.serde2.lazy.LazyPrimitive;
+import org.apache.hadoop.hive.serde2.lazy.LazyShort;
 import org.apache.hadoop.hive.serde2.lazy.objectinspector.primitive.LazyShortObjectInspector;
 
 /**
@@ -32,19 +31,17 @@ import org.apache.hadoop.hive.serde2.laz
  * LazyShort. It's primary difference is the {@link #init(ByteArrayRef, int, int)} method, which
  * reads the short value stored from the default binary format.
  */
-public class LazyDioShort extends LazyPrimitive<LazyShortObjectInspector, ShortWritable> {
+public class LazyDioShort extends LazyShort {
 
   private ByteStream.Input in;
   private DataInputStream din;
 
   public LazyDioShort(LazyShortObjectInspector oi) {
     super(oi);
-    data = new ShortWritable();
   }
 
   public LazyDioShort(LazyDioShort copy) {
     super(copy);
-    data = new ShortWritable(copy.data.get());
   }
 
   /* (non-Javadoc)