hive-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From hashut...@apache.org
Subject svn commit: r1526117 - in /hive/trunk/ql/src: java/org/apache/hadoop/hive/ql/exec/ java/org/apache/hadoop/hive/ql/plan/ java/org/apache/hadoop/hive/ql/udf/generic/ test/org/apache/hadoop/hive/ql/udf/generic/ test/queries/clientpositive/ test/results/cl...
Date Wed, 25 Sep 2013 06:43:15 GMT
Author: hashutosh
Date: Wed Sep 25 06:43:14 2013
New Revision: 1526117

URL: http://svn.apache.org/r1526117
Log:
HIVE-5279 : Kryo cannot instantiate GenericUDAFEvaluator in GroupByDesc (Navis via Ashutosh
Chauhan)

Added:
    hive/trunk/ql/src/test/org/apache/hadoop/hive/ql/udf/generic/GenericUDAFSumList.java
    hive/trunk/ql/src/test/queries/clientpositive/udaf_sum_list.q
    hive/trunk/ql/src/test/results/clientpositive/udaf_sum_list.q.out
Modified:
    hive/trunk/ql/src/java/org/apache/hadoop/hive/ql/exec/UDAF.java
    hive/trunk/ql/src/java/org/apache/hadoop/hive/ql/plan/AggregationDesc.java
    hive/trunk/ql/src/java/org/apache/hadoop/hive/ql/udf/generic/GenericUDAFCollectList.java
    hive/trunk/ql/src/java/org/apache/hadoop/hive/ql/udf/generic/GenericUDAFMkCollectionEvaluator.java
    hive/trunk/ql/src/test/results/compiler/plan/groupby1.q.xml
    hive/trunk/ql/src/test/results/compiler/plan/groupby2.q.xml
    hive/trunk/ql/src/test/results/compiler/plan/groupby3.q.xml
    hive/trunk/ql/src/test/results/compiler/plan/groupby5.q.xml

Modified: hive/trunk/ql/src/java/org/apache/hadoop/hive/ql/exec/UDAF.java
URL: http://svn.apache.org/viewvc/hive/trunk/ql/src/java/org/apache/hadoop/hive/ql/exec/UDAF.java?rev=1526117&r1=1526116&r2=1526117&view=diff
==============================================================================
--- hive/trunk/ql/src/java/org/apache/hadoop/hive/ql/exec/UDAF.java (original)
+++ hive/trunk/ql/src/java/org/apache/hadoop/hive/ql/exec/UDAF.java Wed Sep 25 06:43:14 2013
@@ -49,6 +49,7 @@ package org.apache.hadoop.hive.ql.exec;
  * partial);
  * 
  */
+@Deprecated
 public class UDAF {
 
   /**

Modified: hive/trunk/ql/src/java/org/apache/hadoop/hive/ql/plan/AggregationDesc.java
URL: http://svn.apache.org/viewvc/hive/trunk/ql/src/java/org/apache/hadoop/hive/ql/plan/AggregationDesc.java?rev=1526117&r1=1526116&r2=1526117&view=diff
==============================================================================
--- hive/trunk/ql/src/java/org/apache/hadoop/hive/ql/plan/AggregationDesc.java (original)
+++ hive/trunk/ql/src/java/org/apache/hadoop/hive/ql/plan/AggregationDesc.java Wed Sep 25
06:43:14 2013
@@ -18,28 +18,38 @@
 
 package org.apache.hadoop.hive.ql.plan;
 
+import java.io.Externalizable;
+import java.io.Serializable;
+
+import org.apache.hadoop.hive.common.JavaUtils;
+import org.apache.hadoop.hive.ql.exec.PTFUtils;
 import org.apache.hadoop.hive.ql.udf.generic.GenericUDAFEvaluator;
+import org.apache.hadoop.util.ReflectionUtils;
 
 /**
  * AggregationDesc.
  *
  */
 public class AggregationDesc implements java.io.Serializable {
+
+  static {
+    PTFUtils.makeTransient(AggregationDesc.class, "genericUDAFEvaluator");
+  }
+
   private static final long serialVersionUID = 1L;
   private String genericUDAFName;
 
-  /**
-   * In case genericUDAFEvaluator is Serializable, we will serialize the object.
-   * 
-   * In case genericUDAFEvaluator does not implement Serializable, Java will
-   * remember the class of genericUDAFEvaluator and creates a new instance when
-   * deserialized. This is exactly what we want.
-   */
-  private GenericUDAFEvaluator genericUDAFEvaluator;
   private java.util.ArrayList<ExprNodeDesc> parameters;
   private boolean distinct;
   private GenericUDAFEvaluator.Mode mode;
 
+  // used for GenericUDAFEvaluator
+  private String genericUDAFEvaluatorClassName;
+  // used for GenericUDAFBridgeEvaluator
+  private GenericUDAFEvaluator genericUDAFWritableEvaluator;
+
+  private transient GenericUDAFEvaluator genericUDAFEvaluator;
+
   public AggregationDesc() {
   }
 
@@ -48,10 +58,10 @@ public class AggregationDesc implements 
       final java.util.ArrayList<ExprNodeDesc> parameters,
       final boolean distinct, final GenericUDAFEvaluator.Mode mode) {
     this.genericUDAFName = genericUDAFName;
-    this.genericUDAFEvaluator = genericUDAFEvaluator;
     this.parameters = parameters;
     this.distinct = distinct;
     this.mode = mode;
+    setGenericUDAFEvaluator(genericUDAFEvaluator);
   }
 
   public void setGenericUDAFName(final String genericUDAFName) {
@@ -65,10 +75,44 @@ public class AggregationDesc implements 
   public void setGenericUDAFEvaluator(
       final GenericUDAFEvaluator genericUDAFEvaluator) {
     this.genericUDAFEvaluator = genericUDAFEvaluator;
+    if (genericUDAFEvaluator instanceof Serializable ||
+        genericUDAFEvaluator instanceof Externalizable) {
+      this.genericUDAFWritableEvaluator = genericUDAFEvaluator;
+    } else {
+      this.genericUDAFEvaluatorClassName = genericUDAFEvaluator.getClass().getName();
+    }
   }
 
   public GenericUDAFEvaluator getGenericUDAFEvaluator() {
-    return genericUDAFEvaluator;
+    if (genericUDAFEvaluator != null) {
+      return genericUDAFEvaluator;
+    }
+    if (genericUDAFWritableEvaluator != null) {
+      return genericUDAFEvaluator = genericUDAFWritableEvaluator;
+    }
+    try {
+      return genericUDAFEvaluator =
+          ReflectionUtils.newInstance(Class.forName(genericUDAFEvaluatorClassName, true,
+          JavaUtils.getClassLoader()).asSubclass(GenericUDAFEvaluator.class), null);
+    } catch (ClassNotFoundException e) {
+      throw new RuntimeException(e);
+    }
+  }
+
+  public String getGenericUDAFEvaluatorClassName() {
+    return genericUDAFEvaluatorClassName;
+  }
+
+  public void setGenericUDAFEvaluatorClassName(String genericUDAFEvaluatorClassName) {
+    this.genericUDAFEvaluatorClassName = genericUDAFEvaluatorClassName;
+  }
+
+  public GenericUDAFEvaluator getGenericUDAFWritableEvaluator() {
+    return genericUDAFWritableEvaluator;
+  }
+
+  public void setGenericUDAFWritableEvaluator(GenericUDAFEvaluator genericUDAFWritableEvaluator)
{
+    this.genericUDAFWritableEvaluator = genericUDAFWritableEvaluator;
   }
 
   public java.util.ArrayList<ExprNodeDesc> getParameters() {

Modified: hive/trunk/ql/src/java/org/apache/hadoop/hive/ql/udf/generic/GenericUDAFCollectList.java
URL: http://svn.apache.org/viewvc/hive/trunk/ql/src/java/org/apache/hadoop/hive/ql/udf/generic/GenericUDAFCollectList.java?rev=1526117&r1=1526116&r2=1526117&view=diff
==============================================================================
--- hive/trunk/ql/src/java/org/apache/hadoop/hive/ql/udf/generic/GenericUDAFCollectList.java
(original)
+++ hive/trunk/ql/src/java/org/apache/hadoop/hive/ql/udf/generic/GenericUDAFCollectList.java
Wed Sep 25 06:43:14 2013
@@ -1,3 +1,21 @@
+/**
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
+ *
+ *     http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
 package org.apache.hadoop.hive.ql.udf.generic;
 
 import org.apache.commons.logging.Log;

Modified: hive/trunk/ql/src/java/org/apache/hadoop/hive/ql/udf/generic/GenericUDAFMkCollectionEvaluator.java
URL: http://svn.apache.org/viewvc/hive/trunk/ql/src/java/org/apache/hadoop/hive/ql/udf/generic/GenericUDAFMkCollectionEvaluator.java?rev=1526117&r1=1526116&r2=1526117&view=diff
==============================================================================
--- hive/trunk/ql/src/java/org/apache/hadoop/hive/ql/udf/generic/GenericUDAFMkCollectionEvaluator.java
(original)
+++ hive/trunk/ql/src/java/org/apache/hadoop/hive/ql/udf/generic/GenericUDAFMkCollectionEvaluator.java
Wed Sep 25 06:43:14 2013
@@ -1,5 +1,24 @@
+/**
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
+ *
+ *     http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
 package org.apache.hadoop.hive.ql.udf.generic;
 
+import java.io.Serializable;
 import java.util.ArrayList;
 import java.util.Collection;
 import java.util.HashSet;
@@ -12,14 +31,15 @@ import org.apache.hadoop.hive.serde2.obj
 import org.apache.hadoop.hive.serde2.objectinspector.PrimitiveObjectInspector;
 import org.apache.hadoop.hive.serde2.objectinspector.StandardListObjectInspector;
 
-import com.esotericsoftware.minlog.Log;
+public class GenericUDAFMkCollectionEvaluator extends GenericUDAFEvaluator
+    implements Serializable {
 
-public class GenericUDAFMkCollectionEvaluator extends GenericUDAFEvaluator {
+  private static final long serialVersionUID = 1l;
 
   enum BufferType { SET, LIST }
 
   // For PARTIAL1 and COMPLETE: ObjectInspectors for original data
-  private PrimitiveObjectInspector inputOI;
+  private transient PrimitiveObjectInspector inputOI;
   // For PARTIAL2 and FINAL: ObjectInspectors for partial aggregations (list
   // of objs)
   private transient StandardListObjectInspector loi;
@@ -29,8 +49,7 @@ public class GenericUDAFMkCollectionEval
   private BufferType bufferType;
 
   //needed by kyro
-  public GenericUDAFMkCollectionEvaluator(){
-
+  public GenericUDAFMkCollectionEvaluator() {
   }
 
   public GenericUDAFMkCollectionEvaluator(BufferType bufferType){

Added: hive/trunk/ql/src/test/org/apache/hadoop/hive/ql/udf/generic/GenericUDAFSumList.java
URL: http://svn.apache.org/viewvc/hive/trunk/ql/src/test/org/apache/hadoop/hive/ql/udf/generic/GenericUDAFSumList.java?rev=1526117&view=auto
==============================================================================
--- hive/trunk/ql/src/test/org/apache/hadoop/hive/ql/udf/generic/GenericUDAFSumList.java (added)
+++ hive/trunk/ql/src/test/org/apache/hadoop/hive/ql/udf/generic/GenericUDAFSumList.java Wed
Sep 25 06:43:14 2013
@@ -0,0 +1,160 @@
+/**
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
+ *
+ *     http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+package org.apache.hadoop.hive.ql.udf.generic;
+
+import org.apache.commons.logging.Log;
+import org.apache.commons.logging.LogFactory;
+import org.apache.hadoop.hive.ql.exec.Description;
+import org.apache.hadoop.hive.ql.exec.UDFArgumentTypeException;
+import org.apache.hadoop.hive.ql.metadata.HiveException;
+import org.apache.hadoop.hive.ql.parse.SemanticException;
+import org.apache.hadoop.hive.ql.util.JavaDataModel;
+import org.apache.hadoop.hive.serde2.objectinspector.ListObjectInspector;
+import org.apache.hadoop.hive.serde2.objectinspector.ObjectInspector;
+import org.apache.hadoop.hive.serde2.objectinspector.ObjectInspectorConverters;
+import org.apache.hadoop.hive.serde2.objectinspector.PrimitiveObjectInspector;
+import org.apache.hadoop.hive.serde2.objectinspector.primitive.PrimitiveObjectInspectorFactory;
+import org.apache.hadoop.hive.serde2.objectinspector.primitive.PrimitiveObjectInspectorUtils;
+import org.apache.hadoop.io.LongWritable;
+
+/**
+ * GenericUDAFSum.
+ *
+ */
+@Description(name = "sum_list", value = "_FUNC_(x) - Returns the sum of a set of numbers")
+public class GenericUDAFSumList extends AbstractGenericUDAFResolver {
+
+  static final Log LOG = LogFactory.getLog(GenericUDAFSumList.class.getName());
+
+  @Override
+  public GenericUDAFEvaluator getEvaluator(GenericUDAFParameterInfo info)
+    throws SemanticException {
+    ObjectInspector[] inspectors = info.getParameterObjectInspectors();
+    if (inspectors.length != 1) {
+      throw new UDFArgumentTypeException(inspectors.length - 1,
+          "Exactly one argument is expected.");
+    }
+
+    if (inspectors[0].getCategory() != ObjectInspector.Category.LIST) {
+      throw new UDFArgumentTypeException(0, "Argument should be a list type");
+    }
+
+    ListObjectInspector listOI = (ListObjectInspector) inspectors[0];
+    ObjectInspector elementOI = listOI.getListElementObjectInspector();
+
+    if (elementOI.getCategory() != ObjectInspector.Category.PRIMITIVE) {
+      throw new UDFArgumentTypeException(0,
+          "Only primitive type arguments are accepted but "
+          + elementOI.getTypeName() + " is passed.");
+    }
+    PrimitiveObjectInspector.PrimitiveCategory pcat =
+        ((PrimitiveObjectInspector)elementOI).getPrimitiveCategory();
+    return new GenericUDAFSumLong();
+  }
+
+  /**
+   * GenericUDAFSumLong.
+   *
+   */
+  public static class GenericUDAFSumLong extends GenericUDAFEvaluator {
+    private ListObjectInspector listOI;
+    private PrimitiveObjectInspector elementOI;
+    private ObjectInspectorConverters.Converter toLong;
+    private PrimitiveObjectInspector inputOI;
+    private LongWritable result;
+
+    @Override
+    public ObjectInspector init(Mode m, ObjectInspector[] parameters) throws HiveException
{
+      assert (parameters.length == 1);
+      super.init(m, parameters);
+      result = new LongWritable(0);
+      if (m == Mode.PARTIAL1 || m == Mode.COMPLETE) {
+        listOI = (ListObjectInspector) parameters[0];
+        elementOI = (PrimitiveObjectInspector) listOI.getListElementObjectInspector();
+        toLong = ObjectInspectorConverters.getConverter(elementOI,
+            PrimitiveObjectInspectorFactory.javaLongObjectInspector);
+      } else {
+        inputOI = (PrimitiveObjectInspector) parameters[0];
+      }
+      return PrimitiveObjectInspectorFactory.writableLongObjectInspector;
+    }
+
+    /** class for storing double sum value. */
+    @AggregationType(estimable = true)
+    static class SumLongAgg extends AbstractAggregationBuffer {
+      boolean empty;
+      long sum;
+      @Override
+      public int estimate() { return JavaDataModel.PRIMITIVES1 + JavaDataModel.PRIMITIVES2;
}
+    }
+
+    @Override
+    public AggregationBuffer getNewAggregationBuffer() throws HiveException {
+      SumLongAgg result = new SumLongAgg();
+      reset(result);
+      return result;
+    }
+
+    @Override
+    public void reset(AggregationBuffer agg) throws HiveException {
+      SumLongAgg myagg = (SumLongAgg) agg;
+      myagg.empty = true;
+      myagg.sum = 0;
+    }
+
+    @Override
+    public void iterate(AggregationBuffer agg, Object[] parameters) throws HiveException
{
+      assert (parameters.length == 1);
+      SumLongAgg myagg = (SumLongAgg) agg;
+      int length = listOI.getListLength(parameters[0]);
+      for (int i = 0; i < length; i++) {
+        Object element = listOI.getListElement(parameters[0], i);
+        if (element != null) {
+          myagg.sum += (Long)toLong.convert(element);
+          myagg.empty = false;
+        }
+      }
+    }
+
+    @Override
+    public Object terminatePartial(AggregationBuffer agg) throws HiveException {
+      return terminate(agg);
+    }
+
+    @Override
+    public void merge(AggregationBuffer agg, Object partial) throws HiveException {
+      if (partial != null) {
+        SumLongAgg myagg = (SumLongAgg) agg;
+        myagg.sum += PrimitiveObjectInspectorUtils.getLong(partial, inputOI);
+        myagg.empty = false;
+      }
+    }
+
+    @Override
+    public Object terminate(AggregationBuffer agg) throws HiveException {
+      SumLongAgg myagg = (SumLongAgg) agg;
+      if (myagg.empty) {
+        return null;
+      }
+      result.set(myagg.sum);
+      return result;
+    }
+
+  }
+
+}

Added: hive/trunk/ql/src/test/queries/clientpositive/udaf_sum_list.q
URL: http://svn.apache.org/viewvc/hive/trunk/ql/src/test/queries/clientpositive/udaf_sum_list.q?rev=1526117&view=auto
==============================================================================
--- hive/trunk/ql/src/test/queries/clientpositive/udaf_sum_list.q (added)
+++ hive/trunk/ql/src/test/queries/clientpositive/udaf_sum_list.q Wed Sep 25 06:43:14 2013
@@ -0,0 +1,6 @@
+-- HIVE-5279
+-- GenericUDAFSumList has Converter which does not have default constructor
+-- After
+create temporary function sum_list as 'org.apache.hadoop.hive.ql.udf.generic.GenericUDAFSumList';
+
+select sum_list(array(key, key)) from src;

Added: hive/trunk/ql/src/test/results/clientpositive/udaf_sum_list.q.out
URL: http://svn.apache.org/viewvc/hive/trunk/ql/src/test/results/clientpositive/udaf_sum_list.q.out?rev=1526117&view=auto
==============================================================================
--- hive/trunk/ql/src/test/results/clientpositive/udaf_sum_list.q.out (added)
+++ hive/trunk/ql/src/test/results/clientpositive/udaf_sum_list.q.out Wed Sep 25 06:43:14
2013
@@ -0,0 +1,19 @@
+PREHOOK: query: -- HIVE-5279
+-- GenericUDAFSumList has Converter which does not have default constructor
+-- After
+create temporary function sum_list as 'org.apache.hadoop.hive.ql.udf.generic.GenericUDAFSumList'
+PREHOOK: type: CREATEFUNCTION
+POSTHOOK: query: -- HIVE-5279
+-- GenericUDAFSumList has Converter which does not have default constructor
+-- After
+create temporary function sum_list as 'org.apache.hadoop.hive.ql.udf.generic.GenericUDAFSumList'
+POSTHOOK: type: CREATEFUNCTION
+PREHOOK: query: select sum_list(array(key, key)) from src
+PREHOOK: type: QUERY
+PREHOOK: Input: default@src
+#### A masked pattern was here ####
+POSTHOOK: query: select sum_list(array(key, key)) from src
+POSTHOOK: type: QUERY
+POSTHOOK: Input: default@src
+#### A masked pattern was here ####
+260182

Modified: hive/trunk/ql/src/test/results/compiler/plan/groupby1.q.xml
URL: http://svn.apache.org/viewvc/hive/trunk/ql/src/test/results/compiler/plan/groupby1.q.xml?rev=1526117&r1=1526116&r2=1526117&view=diff
==============================================================================
--- hive/trunk/ql/src/test/results/compiler/plan/groupby1.q.xml (original)
+++ hive/trunk/ql/src/test/results/compiler/plan/groupby1.q.xml Wed Sep 25 06:43:14 2013
@@ -546,8 +546,8 @@
                    <object class="java.util.ArrayList"> 
                     <void method="add"> 
                      <object class="org.apache.hadoop.hive.ql.plan.AggregationDesc">

-                      <void property="genericUDAFEvaluator"> 
-                       <object id="GenericUDAFSum$GenericUDAFSumDouble0" class="org.apache.hadoop.hive.ql.udf.generic.GenericUDAFSum$GenericUDAFSumDouble"/>

+                      <void property="genericUDAFEvaluatorClassName"> 
+                       <string>org.apache.hadoop.hive.ql.udf.generic.GenericUDAFSum$GenericUDAFSumDouble</string>

                       </void> 
                       <void property="genericUDAFName"> 
                        <string>sum</string> 
@@ -1458,8 +1458,8 @@
            <object class="java.util.ArrayList"> 
             <void method="add"> 
              <object class="org.apache.hadoop.hive.ql.plan.AggregationDesc"> 
-              <void property="genericUDAFEvaluator"> 
-               <object idref="GenericUDAFSum$GenericUDAFSumDouble0"/> 
+              <void property="genericUDAFEvaluatorClassName"> 
+               <string>org.apache.hadoop.hive.ql.udf.generic.GenericUDAFSum$GenericUDAFSumDouble</string>

               </void> 
               <void property="genericUDAFName"> 
                <string>sum</string> 

Modified: hive/trunk/ql/src/test/results/compiler/plan/groupby2.q.xml
URL: http://svn.apache.org/viewvc/hive/trunk/ql/src/test/results/compiler/plan/groupby2.q.xml?rev=1526117&r1=1526116&r2=1526117&view=diff
==============================================================================
--- hive/trunk/ql/src/test/results/compiler/plan/groupby2.q.xml (original)
+++ hive/trunk/ql/src/test/results/compiler/plan/groupby2.q.xml Wed Sep 25 06:43:14 2013
@@ -574,8 +574,8 @@
                       <void property="distinct"> 
                        <boolean>true</boolean> 
                       </void> 
-                      <void property="genericUDAFEvaluator"> 
-                       <object id="GenericUDAFCount$GenericUDAFCountEvaluator0" class="org.apache.hadoop.hive.ql.udf.generic.GenericUDAFCount$GenericUDAFCountEvaluator"/>

+                      <void property="genericUDAFEvaluatorClassName"> 
+                       <string>org.apache.hadoop.hive.ql.udf.generic.GenericUDAFCount$GenericUDAFCountEvaluator</string>

                       </void> 
                       <void property="genericUDAFName"> 
                        <string>count</string> 
@@ -637,8 +637,8 @@
                     </void> 
                     <void method="add"> 
                      <object class="org.apache.hadoop.hive.ql.plan.AggregationDesc">

-                      <void property="genericUDAFEvaluator"> 
-                       <object id="GenericUDAFSum$GenericUDAFSumDouble0" class="org.apache.hadoop.hive.ql.udf.generic.GenericUDAFSum$GenericUDAFSumDouble"/>

+                      <void property="genericUDAFEvaluatorClassName"> 
+                       <string>org.apache.hadoop.hive.ql.udf.generic.GenericUDAFSum$GenericUDAFSumDouble</string>

                       </void> 
                       <void property="genericUDAFName"> 
                        <string>sum</string> 
@@ -1688,8 +1688,8 @@
               <void property="distinct"> 
                <boolean>true</boolean> 
               </void> 
-              <void property="genericUDAFEvaluator"> 
-               <object idref="GenericUDAFCount$GenericUDAFCountEvaluator0"/> 
+              <void property="genericUDAFEvaluatorClassName"> 
+               <string>org.apache.hadoop.hive.ql.udf.generic.GenericUDAFCount$GenericUDAFCountEvaluator</string>

               </void> 
               <void property="genericUDAFName"> 
                <string>count</string> 
@@ -1717,8 +1717,8 @@
             </void> 
             <void method="add"> 
              <object class="org.apache.hadoop.hive.ql.plan.AggregationDesc"> 
-              <void property="genericUDAFEvaluator"> 
-               <object idref="GenericUDAFSum$GenericUDAFSumDouble0"/> 
+              <void property="genericUDAFEvaluatorClassName"> 
+               <string>org.apache.hadoop.hive.ql.udf.generic.GenericUDAFSum$GenericUDAFSumDouble</string>

               </void> 
               <void property="genericUDAFName"> 
                <string>sum</string> 

Modified: hive/trunk/ql/src/test/results/compiler/plan/groupby3.q.xml
URL: http://svn.apache.org/viewvc/hive/trunk/ql/src/test/results/compiler/plan/groupby3.q.xml?rev=1526117&r1=1526116&r2=1526117&view=diff
==============================================================================
--- hive/trunk/ql/src/test/results/compiler/plan/groupby3.q.xml (original)
+++ hive/trunk/ql/src/test/results/compiler/plan/groupby3.q.xml Wed Sep 25 06:43:14 2013
@@ -596,8 +596,8 @@
                    <object class="java.util.ArrayList"> 
                     <void method="add"> 
                      <object class="org.apache.hadoop.hive.ql.plan.AggregationDesc">

-                      <void property="genericUDAFEvaluator"> 
-                       <object id="GenericUDAFSum$GenericUDAFSumDouble0" class="org.apache.hadoop.hive.ql.udf.generic.GenericUDAFSum$GenericUDAFSumDouble"/>

+                      <void property="genericUDAFEvaluatorClassName"> 
+                       <string>org.apache.hadoop.hive.ql.udf.generic.GenericUDAFSum$GenericUDAFSumDouble</string>

                       </void> 
                       <void property="genericUDAFName"> 
                        <string>sum</string> 
@@ -659,8 +659,8 @@
                     </void> 
                     <void method="add"> 
                      <object class="org.apache.hadoop.hive.ql.plan.AggregationDesc">

-                      <void property="genericUDAFEvaluator"> 
-                       <object id="GenericUDAFAverage$GenericUDAFAverageEvaluatorDouble0"
class="org.apache.hadoop.hive.ql.udf.generic.GenericUDAFAverage$GenericUDAFAverageEvaluatorDouble"/>

+                      <void property="genericUDAFEvaluatorClassName"> 
+                       <string>org.apache.hadoop.hive.ql.udf.generic.GenericUDAFAverage$GenericUDAFAverageEvaluatorDouble</string>

                       </void> 
                       <void property="genericUDAFName"> 
                        <string>avg</string> 
@@ -723,8 +723,8 @@
                       <void property="distinct"> 
                        <boolean>true</boolean> 
                       </void> 
-                      <void property="genericUDAFEvaluator"> 
-                       <object id="GenericUDAFAverage$GenericUDAFAverageEvaluatorDouble1"
class="org.apache.hadoop.hive.ql.udf.generic.GenericUDAFAverage$GenericUDAFAverageEvaluatorDouble"/>

+                      <void property="genericUDAFEvaluatorClassName"> 
+                       <string>org.apache.hadoop.hive.ql.udf.generic.GenericUDAFAverage$GenericUDAFAverageEvaluatorDouble</string>

                       </void> 
                       <void property="genericUDAFName"> 
                        <string>avg</string> 
@@ -784,8 +784,8 @@
                     </void> 
                     <void method="add"> 
                      <object class="org.apache.hadoop.hive.ql.plan.AggregationDesc">

-                      <void property="genericUDAFEvaluator"> 
-                       <object id="GenericUDAFMax$GenericUDAFMaxEvaluator0" class="org.apache.hadoop.hive.ql.udf.generic.GenericUDAFMax$GenericUDAFMaxEvaluator"/>

+                      <void property="genericUDAFEvaluatorClassName"> 
+                       <string>org.apache.hadoop.hive.ql.udf.generic.GenericUDAFMax$GenericUDAFMaxEvaluator</string>

                       </void> 
                       <void property="genericUDAFName"> 
                        <string>max</string> 
@@ -845,8 +845,8 @@
                     </void> 
                     <void method="add"> 
                      <object class="org.apache.hadoop.hive.ql.plan.AggregationDesc">

-                      <void property="genericUDAFEvaluator"> 
-                       <object id="GenericUDAFMin$GenericUDAFMinEvaluator0" class="org.apache.hadoop.hive.ql.udf.generic.GenericUDAFMin$GenericUDAFMinEvaluator"/>

+                      <void property="genericUDAFEvaluatorClassName"> 
+                       <string>org.apache.hadoop.hive.ql.udf.generic.GenericUDAFMin$GenericUDAFMinEvaluator</string>

                       </void> 
                       <void property="genericUDAFName"> 
                        <string>min</string> 
@@ -1965,8 +1965,8 @@
            <object class="java.util.ArrayList"> 
             <void method="add"> 
              <object class="org.apache.hadoop.hive.ql.plan.AggregationDesc"> 
-              <void property="genericUDAFEvaluator"> 
-               <object idref="GenericUDAFSum$GenericUDAFSumDouble0"/> 
+              <void property="genericUDAFEvaluatorClassName"> 
+               <string>org.apache.hadoop.hive.ql.udf.generic.GenericUDAFSum$GenericUDAFSumDouble</string>

               </void> 
               <void property="genericUDAFName"> 
                <string>sum</string> 
@@ -1994,8 +1994,8 @@
             </void> 
             <void method="add"> 
              <object class="org.apache.hadoop.hive.ql.plan.AggregationDesc"> 
-              <void property="genericUDAFEvaluator"> 
-               <object idref="GenericUDAFAverage$GenericUDAFAverageEvaluatorDouble0"/>

+              <void property="genericUDAFEvaluatorClassName"> 
+               <string>org.apache.hadoop.hive.ql.udf.generic.GenericUDAFAverage$GenericUDAFAverageEvaluatorDouble</string>

               </void> 
               <void property="genericUDAFName"> 
                <string>avg</string> 
@@ -2024,8 +2024,8 @@
               <void property="distinct"> 
                <boolean>true</boolean> 
               </void> 
-              <void property="genericUDAFEvaluator"> 
-               <object idref="GenericUDAFAverage$GenericUDAFAverageEvaluatorDouble1"/>

+              <void property="genericUDAFEvaluatorClassName"> 
+               <string>org.apache.hadoop.hive.ql.udf.generic.GenericUDAFAverage$GenericUDAFAverageEvaluatorDouble</string>

               </void> 
               <void property="genericUDAFName"> 
                <string>avg</string> 
@@ -2053,8 +2053,8 @@
             </void> 
             <void method="add"> 
              <object class="org.apache.hadoop.hive.ql.plan.AggregationDesc"> 
-              <void property="genericUDAFEvaluator"> 
-               <object idref="GenericUDAFMax$GenericUDAFMaxEvaluator0"/> 
+              <void property="genericUDAFEvaluatorClassName"> 
+               <string>org.apache.hadoop.hive.ql.udf.generic.GenericUDAFMax$GenericUDAFMaxEvaluator</string>

               </void> 
               <void property="genericUDAFName"> 
                <string>max</string> 
@@ -2080,8 +2080,8 @@
             </void> 
             <void method="add"> 
              <object class="org.apache.hadoop.hive.ql.plan.AggregationDesc"> 
-              <void property="genericUDAFEvaluator"> 
-               <object idref="GenericUDAFMin$GenericUDAFMinEvaluator0"/> 
+              <void property="genericUDAFEvaluatorClassName"> 
+               <string>org.apache.hadoop.hive.ql.udf.generic.GenericUDAFMin$GenericUDAFMinEvaluator</string>

               </void> 
               <void property="genericUDAFName"> 
                <string>min</string> 

Modified: hive/trunk/ql/src/test/results/compiler/plan/groupby5.q.xml
URL: http://svn.apache.org/viewvc/hive/trunk/ql/src/test/results/compiler/plan/groupby5.q.xml?rev=1526117&r1=1526116&r2=1526117&view=diff
==============================================================================
--- hive/trunk/ql/src/test/results/compiler/plan/groupby5.q.xml (original)
+++ hive/trunk/ql/src/test/results/compiler/plan/groupby5.q.xml Wed Sep 25 06:43:14 2013
@@ -399,8 +399,8 @@
                    <object class="java.util.ArrayList"> 
                     <void method="add"> 
                      <object class="org.apache.hadoop.hive.ql.plan.AggregationDesc">

-                      <void property="genericUDAFEvaluator"> 
-                       <object id="GenericUDAFSum$GenericUDAFSumDouble0" class="org.apache.hadoop.hive.ql.udf.generic.GenericUDAFSum$GenericUDAFSumDouble"/>

+                      <void property="genericUDAFEvaluatorClassName"> 
+                       <string>org.apache.hadoop.hive.ql.udf.generic.GenericUDAFSum$GenericUDAFSumDouble</string>

                       </void> 
                       <void property="genericUDAFName"> 
                        <string>sum</string> 
@@ -1334,8 +1334,8 @@
            <object class="java.util.ArrayList"> 
             <void method="add"> 
              <object class="org.apache.hadoop.hive.ql.plan.AggregationDesc"> 
-              <void property="genericUDAFEvaluator"> 
-               <object idref="GenericUDAFSum$GenericUDAFSumDouble0"/> 
+              <void property="genericUDAFEvaluatorClassName"> 
+               <string>org.apache.hadoop.hive.ql.udf.generic.GenericUDAFSum$GenericUDAFSumDouble</string>

               </void> 
               <void property="genericUDAFName"> 
                <string>sum</string> 



Mime
View raw message