hive-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From hashut...@apache.org
Subject svn commit: r1514554 [8/18] - in /hive/branches/vectorization: ./ beeline/src/java/org/apache/hive/beeline/ cli/src/java/org/apache/hadoop/hive/cli/ cli/src/test/org/apache/hadoop/hive/cli/ common/src/java/org/apache/hadoop/hive/conf/ conf/ contrib/src...
Date Fri, 16 Aug 2013 01:22:02 GMT
Modified: hive/branches/vectorization/ql/src/java/org/apache/hadoop/hive/ql/session/SessionState.java
URL: http://svn.apache.org/viewvc/hive/branches/vectorization/ql/src/java/org/apache/hadoop/hive/ql/session/SessionState.java?rev=1514554&r1=1514553&r2=1514554&view=diff
==============================================================================
--- hive/branches/vectorization/ql/src/java/org/apache/hadoop/hive/ql/session/SessionState.java (original)
+++ hive/branches/vectorization/ql/src/java/org/apache/hadoop/hive/ql/session/SessionState.java Fri Aug 16 01:21:54 2013
@@ -40,15 +40,20 @@ import org.apache.hadoop.conf.Configurat
 import org.apache.hadoop.fs.FileSystem;
 import org.apache.hadoop.fs.Path;
 import org.apache.hadoop.hive.conf.HiveConf;
+import org.apache.hadoop.hive.conf.HiveConf.ConfVars;
 import org.apache.hadoop.hive.ql.MapRedStats;
 import org.apache.hadoop.hive.ql.exec.Utilities;
 import org.apache.hadoop.hive.ql.history.HiveHistory;
+import org.apache.hadoop.hive.ql.history.HiveHistoryImpl;
+import org.apache.hadoop.hive.ql.history.HiveHistoryProxyHandler;
+import org.apache.hadoop.hive.ql.log.PerfLogger;
 import org.apache.hadoop.hive.ql.metadata.HiveException;
 import org.apache.hadoop.hive.ql.metadata.HiveUtils;
 import org.apache.hadoop.hive.ql.plan.HiveOperation;
 import org.apache.hadoop.hive.ql.security.HiveAuthenticationProvider;
 import org.apache.hadoop.hive.ql.security.authorization.HiveAuthorizationProvider;
 import org.apache.hadoop.hive.ql.util.DosToUnix;
+import org.apache.hadoop.util.ReflectionUtils;
 
 /**
  * SessionState encapsulates common data associated with a session.
@@ -133,6 +138,7 @@ public class SessionState {
    */
   LineageState ls;
 
+  private PerfLogger perfLogger;
   /**
    * Get the lineage state stored in this session.
    *
@@ -247,19 +253,19 @@ public class SessionState {
 
     tss.set(startSs);
 
-    if (startSs.hiveHist == null) {
-      startSs.hiveHist = new HiveHistory(startSs);
+    if(startSs.hiveHist == null){
+      if (startSs.getConf().getBoolVar(HiveConf.ConfVars.HIVE_SESSION_HISTORY_ENABLED)) {
+        startSs.hiveHist = new HiveHistoryImpl(startSs);
+      }else {
+        //Hive history is disabled, create a no-op proxy
+        startSs.hiveHist = HiveHistoryProxyHandler.getNoOpHiveHistoryProxy();
+      }
     }
 
     if (startSs.getTmpOutputFile() == null) {
-      // per-session temp file containing results to be sent from HiveServer to HiveClient
-      File tmpDir = new File(
-          HiveConf.getVar(startSs.getConf(), HiveConf.ConfVars.HIVEHISTORYFILELOC));
-      String sessionID = startSs.getConf().getVar(HiveConf.ConfVars.HIVESESSIONID);
+      // set temp file containing results to be sent to HiveClient
       try {
-        File tmpFile = File.createTempFile(sessionID, ".pipeout", tmpDir);
-        tmpFile.deleteOnExit();
-        startSs.setTmpOutputFile(tmpFile);
+        startSs.setTmpOutputFile(createTempFile(startSs.getConf()));
       } catch (IOException e) {
         throw new RuntimeException(e);
       }
@@ -281,6 +287,33 @@ public class SessionState {
   }
 
   /**
+   * @param conf
+   * @return per-session temp file
+   * @throws IOException
+   */
+  private static File createTempFile(HiveConf conf) throws IOException {
+    String hHistDir =
+        HiveConf.getVar(conf, HiveConf.ConfVars.HIVEHISTORYFILELOC);
+
+    File tmpDir = new File(hHistDir);
+    String sessionID = conf.getVar(HiveConf.ConfVars.HIVESESSIONID);
+    if (!tmpDir.exists()) {
+      if (!tmpDir.mkdirs()) {
+        //Do another exists to check to handle possible race condition
+        // Another thread might have created the dir, if that is why
+        // mkdirs returned false, that is fine
+        if(!tmpDir.exists()){
+          throw new RuntimeException("Unable to create log directory "
+              + hHistDir);
+        }
+      }
+    }
+    File tmpFile = File.createTempFile(sessionID, ".pipeout", tmpDir);
+    tmpFile.deleteOnExit();
+    return tmpFile;
+  }
+
+  /**
    * get the current session.
    */
   public static SessionState get() {
@@ -746,4 +779,25 @@ public class SessionState {
       LOG.info("Error removing session resource dir " + resourceDir, e);
     }
   }
+
+  /**
+   * @param resetPerfLogger
+   * @return  Tries to return an instance of the class whose name is configured in
+   *          hive.exec.perf.logger, but if it can't it just returns an instance of
+   *          the base PerfLogger class
+
+   */
+  public PerfLogger getPerfLogger(boolean resetPerfLogger) {
+    if ((perfLogger == null) || resetPerfLogger) {
+      try {
+        perfLogger = (PerfLogger) ReflectionUtils.newInstance(conf.getClassByName(
+            conf.getVar(ConfVars.HIVE_PERF_LOGGER)), conf);
+      } catch (ClassNotFoundException e) {
+        LOG.error("Performance Logger Class not found:" + e.getMessage());
+        perfLogger = new PerfLogger();
+      }
+    }
+    return perfLogger;
+  }
+
 }

Modified: hive/branches/vectorization/ql/src/java/org/apache/hadoop/hive/ql/udf/UDFHex.java
URL: http://svn.apache.org/viewvc/hive/branches/vectorization/ql/src/java/org/apache/hadoop/hive/ql/udf/UDFHex.java?rev=1514554&r1=1514553&r2=1514554&view=diff
==============================================================================
--- hive/branches/vectorization/ql/src/java/org/apache/hadoop/hive/ql/udf/UDFHex.java (original)
+++ hive/branches/vectorization/ql/src/java/org/apache/hadoop/hive/ql/udf/UDFHex.java Fri Aug 16 01:21:54 2013
@@ -20,6 +20,7 @@ package org.apache.hadoop.hive.ql.udf;
 
 import org.apache.hadoop.hive.ql.exec.Description;
 import org.apache.hadoop.hive.ql.exec.UDF;
+import org.apache.hadoop.io.BytesWritable;
 import org.apache.hadoop.io.IntWritable;
 import org.apache.hadoop.io.LongWritable;
 import org.apache.hadoop.io.Text;
@@ -29,10 +30,10 @@ import org.apache.hadoop.io.Text;
  *
  */
 @Description(name = "hex",
-    value = "_FUNC_(n or str) - Convert the argument to hexadecimal ",
+    value = "_FUNC_(n, bin, or str) - Convert the argument to hexadecimal ",
     extended = "If the argument is a string, returns two hex digits for each "
     + "character in the string.\n"
-    + "If the argument is a number, returns the hexadecimal representation.\n"
+    + "If the argument is a number or binary, returns the hexadecimal representation.\n"
     + "Example:\n"
     + "  > SELECT _FUNC_(17) FROM src LIMIT 1;\n"
     + "  'H1'\n"
@@ -44,7 +45,7 @@ public class UDFHex extends UDF {
 
   /**
    * Convert num to hex.
-   * 
+   *
    */
   private Text evaluate(long num) {
     // Extract the hex digits of num into value[] from right to left
@@ -76,26 +77,41 @@ public class UDFHex extends UDF {
 
   /**
    * Convert every character in s to two hex digits.
-   * 
+   *
    */
   public Text evaluate(Text s) {
     if (s == null) {
       return null;
     }
 
-    if (value.length < s.getLength() * 2) {
-      value = new byte[s.getLength() * 2];
+    byte[] str = s.getBytes();
+    return evaluate(str, s.getLength());
+  }
+
+  /**
+   * Convert bytes to a hex string
+   */
+  public Text evaluate(BytesWritable b){
+    if (b == null) {
+      return null;
     }
 
-    byte[] str = s.getBytes();
-    for (int i = 0; i < s.getLength(); i++) {
+    byte[] bytes = b.getBytes();
+    return evaluate(bytes, b.getLength());
+  }
+
+  private Text evaluate(byte[] bytes, int length){
+    if (value.length < length * 2) {
+      value = new byte[length * 2];
+    }
+
+    for (int i = 0; i < length; i++) {
       value[i * 2] = (byte) Character.toUpperCase(Character.forDigit(
-          (str[i] & 0xF0) >>> 4, 16));
+          (bytes[i] & 0xF0) >>> 4, 16));
       value[i * 2 + 1] = (byte) Character.toUpperCase(Character.forDigit(
-          str[i] & 0x0F, 16));
+          bytes[i] & 0x0F, 16));
     }
-
-    result.set(value, 0, s.getLength() * 2);
+    result.set(value, 0, length*2);
     return result;
   }
 }

Modified: hive/branches/vectorization/ql/src/java/org/apache/hadoop/hive/ql/udf/UDFType.java
URL: http://svn.apache.org/viewvc/hive/branches/vectorization/ql/src/java/org/apache/hadoop/hive/ql/udf/UDFType.java?rev=1514554&r1=1514553&r2=1514554&view=diff
==============================================================================
--- hive/branches/vectorization/ql/src/java/org/apache/hadoop/hive/ql/udf/UDFType.java (original)
+++ hive/branches/vectorization/ql/src/java/org/apache/hadoop/hive/ql/udf/UDFType.java Fri Aug 16 01:21:54 2013
@@ -34,4 +34,11 @@ public @interface UDFType {
   boolean deterministic() default true;
   boolean stateful() default false;
   boolean distinctLike() default false;
+
+  /**
+   * Using in analytical functions to specify that UDF implies an ordering
+   *
+   * @return true if the function implies order
+   */
+  boolean impliesOrder() default false;
 }

Modified: hive/branches/vectorization/ql/src/java/org/apache/hadoop/hive/ql/udf/UDFUnhex.java
URL: http://svn.apache.org/viewvc/hive/branches/vectorization/ql/src/java/org/apache/hadoop/hive/ql/udf/UDFUnhex.java?rev=1514554&r1=1514553&r2=1514554&view=diff
==============================================================================
--- hive/branches/vectorization/ql/src/java/org/apache/hadoop/hive/ql/udf/UDFUnhex.java (original)
+++ hive/branches/vectorization/ql/src/java/org/apache/hadoop/hive/ql/udf/UDFUnhex.java Fri Aug 16 01:21:54 2013
@@ -27,18 +27,14 @@ import org.apache.hadoop.io.Text;
  *
  */
 @Description(name = "unhex",
-    value = "_FUNC_(str) - Converts hexadecimal argument to string",
+    value = "_FUNC_(str) - Converts hexadecimal argument to binary",
     extended = "Performs the inverse operation of HEX(str). That is, it interprets\n"
     + "each pair of hexadecimal digits in the argument as a number and\n"
-    + "converts it to the character represented by the number. The\n"
+    + "converts it to the byte representation of the number. The\n"
     + "resulting characters are returned as a binary string.\n\n"
     + "Example:\n"
-    + "> SELECT UNHEX('4D7953514C') from src limit 1;\n"
-    + "'MySQL'\n"
-    + "> SELECT UNHEX(HEX('string')) from src limit 1;\n"
-    + "'string'\n"
-    + "> SELECT HEX(UNHEX('1267')) from src limit 1;\n"
-    + "'1267'\n\n"
+    + "> SELECT DECODE(UNHEX('4D7953514C'), 'UTF-8') from src limit 1;\n"
+    + "'MySQL'\n\n"
     + "The characters in the argument string must be legal hexadecimal\n"
     + "digits: '0' .. '9', 'A' .. 'F', 'a' .. 'f'. If UNHEX() encounters\n"
     + "any nonhexadecimal digits in the argument, it returns NULL. Also,\n"
@@ -47,9 +43,9 @@ public class UDFUnhex extends UDF {
 
   /**
    * Convert every two hex digits in s into.
-   * 
+   *
    */
-  public Text evaluate(Text s) {
+  public byte[] evaluate(Text s) {
     if (s == null) {
       return null;
     }
@@ -72,6 +68,6 @@ public class UDFUnhex extends UDF {
       }
     }
 
-    return new Text(result);
+    return result;
   }
 }

Modified: hive/branches/vectorization/ql/src/java/org/apache/hadoop/hive/ql/udf/generic/AbstractGenericUDFEWAHBitmapBop.java
URL: http://svn.apache.org/viewvc/hive/branches/vectorization/ql/src/java/org/apache/hadoop/hive/ql/udf/generic/AbstractGenericUDFEWAHBitmapBop.java?rev=1514554&r1=1514553&r2=1514554&view=diff
==============================================================================
--- hive/branches/vectorization/ql/src/java/org/apache/hadoop/hive/ql/udf/generic/AbstractGenericUDFEWAHBitmapBop.java (original)
+++ hive/branches/vectorization/ql/src/java/org/apache/hadoop/hive/ql/udf/generic/AbstractGenericUDFEWAHBitmapBop.java Fri Aug 16 01:21:54 2013
@@ -30,14 +30,13 @@ import org.apache.hadoop.hive.ql.exec.UD
 import org.apache.hadoop.hive.ql.index.bitmap.BitmapObjectInput;
 import org.apache.hadoop.hive.ql.index.bitmap.BitmapObjectOutput;
 import org.apache.hadoop.hive.ql.metadata.HiveException;
+import org.apache.hadoop.hive.serde2.objectinspector.ListObjectInspector;
 import org.apache.hadoop.hive.serde2.objectinspector.ObjectInspector;
+import org.apache.hadoop.hive.serde2.objectinspector.ObjectInspector.Category;
 import org.apache.hadoop.hive.serde2.objectinspector.ObjectInspectorFactory;
 import org.apache.hadoop.hive.serde2.objectinspector.PrimitiveObjectInspector;
-import org.apache.hadoop.hive.serde2.objectinspector.ListObjectInspector;
-import org.apache.hadoop.hive.serde2.objectinspector.ObjectInspector.Category;
 import org.apache.hadoop.hive.serde2.objectinspector.primitive.PrimitiveObjectInspectorFactory;
 import org.apache.hadoop.hive.serde2.objectinspector.primitive.PrimitiveObjectInspectorUtils;
-import org.apache.hadoop.hive.serde2.objectinspector.primitive.WritableVoidObjectInspector;
 import org.apache.hadoop.io.LongWritable;
 
 /**
@@ -46,8 +45,7 @@ import org.apache.hadoop.io.LongWritable
  */
 abstract public class AbstractGenericUDFEWAHBitmapBop extends GenericUDF {
   protected final ArrayList<Object> ret = new ArrayList<Object>();
-  private ObjectInspector b1OI;
-  private ObjectInspector b2OI;
+  private transient ObjectInspector b1OI;
   private final String name;
 
   AbstractGenericUDFEWAHBitmapBop(String name) {
@@ -70,15 +68,13 @@ abstract public class AbstractGenericUDF
           + arguments[0].getTypeName() + "\" is found");
     }
 
-    if (arguments[1].getCategory().equals(Category.LIST)) {
-      b2OI = (ListObjectInspector) arguments[1];
-    } else {
+    if (!arguments[1].getCategory().equals(Category.LIST)) {
         throw new UDFArgumentTypeException(1, "\""
           + Category.LIST.toString().toLowerCase()
           + "\" is expected at function " + name + ", but \""
           + arguments[1].getTypeName() + "\" is found");
-    }
 
+    }
     return ObjectInspectorFactory
         .getStandardListObjectInspector(PrimitiveObjectInspectorFactory
             .writableLongObjectInspector);

Modified: hive/branches/vectorization/ql/src/java/org/apache/hadoop/hive/ql/udf/generic/AbstractGenericUDFReflect.java
URL: http://svn.apache.org/viewvc/hive/branches/vectorization/ql/src/java/org/apache/hadoop/hive/ql/udf/generic/AbstractGenericUDFReflect.java?rev=1514554&r1=1514553&r2=1514554&view=diff
==============================================================================
--- hive/branches/vectorization/ql/src/java/org/apache/hadoop/hive/ql/udf/generic/AbstractGenericUDFReflect.java (original)
+++ hive/branches/vectorization/ql/src/java/org/apache/hadoop/hive/ql/udf/generic/AbstractGenericUDFReflect.java Fri Aug 16 01:21:54 2013
@@ -26,18 +26,18 @@ import org.apache.hadoop.hive.ql.metadat
 import org.apache.hadoop.hive.serde2.objectinspector.ObjectInspector;
 import org.apache.hadoop.hive.serde2.objectinspector.PrimitiveObjectInspector;
 import org.apache.hadoop.hive.serde2.objectinspector.primitive.PrimitiveObjectInspectorUtils;
-import org.apache.hadoop.hive.serde2.objectinspector.primitive.PrimitiveObjectInspectorUtils.*;
+import org.apache.hadoop.hive.serde2.objectinspector.primitive.PrimitiveObjectInspectorUtils.PrimitiveTypeEntry;
 
 /**
  * common class for reflective UDFs
  */
 public abstract class AbstractGenericUDFReflect extends GenericUDF {
 
-  private PrimitiveObjectInspector[] parameterOIs;
-  private PrimitiveTypeEntry[] parameterTypes;
-  private Class[] parameterClasses;
+  private transient PrimitiveObjectInspector[] parameterOIs;
+  private transient PrimitiveTypeEntry[] parameterTypes;
+  private transient Class[] parameterClasses;
 
-  private Object[] parameterJavaValues;
+  private transient Object[] parameterJavaValues;
 
   void setupParameterOIs(ObjectInspector[] arguments, int start) throws UDFArgumentTypeException {
     int length = arguments.length - start;

Modified: hive/branches/vectorization/ql/src/java/org/apache/hadoop/hive/ql/udf/generic/GenericUDAFAverage.java
URL: http://svn.apache.org/viewvc/hive/branches/vectorization/ql/src/java/org/apache/hadoop/hive/ql/udf/generic/GenericUDAFAverage.java?rev=1514554&r1=1514553&r2=1514554&view=diff
==============================================================================
--- hive/branches/vectorization/ql/src/java/org/apache/hadoop/hive/ql/udf/generic/GenericUDAFAverage.java (original)
+++ hive/branches/vectorization/ql/src/java/org/apache/hadoop/hive/ql/udf/generic/GenericUDAFAverage.java Fri Aug 16 01:21:54 2013
@@ -243,15 +243,15 @@ public class GenericUDAFAverage extends 
   public static abstract class AbstractGenericUDAFAverageEvaluator<TYPE> extends GenericUDAFEvaluator {
 
     // For PARTIAL1 and COMPLETE
-    private PrimitiveObjectInspector inputOI;
+    private transient PrimitiveObjectInspector inputOI;
     // For PARTIAL2 and FINAL
-    private StructObjectInspector soi;
-    private StructField countField;
-    private StructField sumField;
+    private transient StructObjectInspector soi;
+    private transient StructField countField;
+    private transient StructField sumField;
     private LongObjectInspector countFieldOI;
     private ObjectInspector sumFieldOI;
     // For PARTIAL1 and PARTIAL2
-    protected Object[] partialResult;
+    protected transient Object[] partialResult;
 
     private boolean warned = false;
 

Modified: hive/branches/vectorization/ql/src/java/org/apache/hadoop/hive/ql/udf/generic/GenericUDAFCollectSet.java
URL: http://svn.apache.org/viewvc/hive/branches/vectorization/ql/src/java/org/apache/hadoop/hive/ql/udf/generic/GenericUDAFCollectSet.java?rev=1514554&r1=1514553&r2=1514554&view=diff
==============================================================================
--- hive/branches/vectorization/ql/src/java/org/apache/hadoop/hive/ql/udf/generic/GenericUDAFCollectSet.java (original)
+++ hive/branches/vectorization/ql/src/java/org/apache/hadoop/hive/ql/udf/generic/GenericUDAFCollectSet.java Fri Aug 16 01:21:54 2013
@@ -69,10 +69,11 @@ public class GenericUDAFCollectSet exten
     private PrimitiveObjectInspector inputOI;
     // For PARTIAL2 and FINAL: ObjectInspectors for partial aggregations (list
     // of objs)
-    private StandardListObjectInspector loi;
+    private transient StandardListObjectInspector loi;
     
-    private StandardListObjectInspector internalMergeOI;
+    private transient StandardListObjectInspector internalMergeOI;
     
+    @Override
     public ObjectInspector init(Mode m, ObjectInspector[] parameters)
         throws HiveException {
       super.init(m, parameters);

Modified: hive/branches/vectorization/ql/src/java/org/apache/hadoop/hive/ql/udf/generic/GenericUDAFComputeStats.java
URL: http://svn.apache.org/viewvc/hive/branches/vectorization/ql/src/java/org/apache/hadoop/hive/ql/udf/generic/GenericUDAFComputeStats.java?rev=1514554&r1=1514553&r2=1514554&view=diff
==============================================================================
--- hive/branches/vectorization/ql/src/java/org/apache/hadoop/hive/ql/udf/generic/GenericUDAFComputeStats.java (original)
+++ hive/branches/vectorization/ql/src/java/org/apache/hadoop/hive/ql/udf/generic/GenericUDAFComputeStats.java Fri Aug 16 01:21:54 2013
@@ -112,18 +112,15 @@ public class GenericUDAFComputeStats ext
     /* Object Inspectors corresponding to the struct returned by TerminatePartial and the long
      * field within the struct - "count"
      */
-    private StructObjectInspector soi;
+    private transient StructObjectInspector soi;
 
-    private StructField columnTypeField;
-    private WritableStringObjectInspector columnTypeFieldOI;
-
-    private StructField countTruesField;
+    private transient StructField countTruesField;
     private WritableLongObjectInspector countTruesFieldOI;
 
-    private StructField countFalsesField;
+    private transient StructField countFalsesField;
     private WritableLongObjectInspector countFalsesFieldOI;
 
-    private StructField countNullsField;
+    private transient StructField countNullsField;
     private WritableLongObjectInspector countNullsFieldOI;
 
     /* Output of final result of the aggregation
@@ -141,10 +138,6 @@ public class GenericUDAFComputeStats ext
       } else {
         soi = (StructObjectInspector) parameters[0];
 
-        columnTypeField = soi.getStructFieldRef("ColumnType");
-        columnTypeFieldOI = (WritableStringObjectInspector)
-                              columnTypeField.getFieldObjectInspector();
-
         countTruesField = soi.getStructFieldRef("CountTrues");
         countTruesFieldOI = (WritableLongObjectInspector)
                                countTruesField.getFieldObjectInspector();
@@ -313,7 +306,7 @@ public class GenericUDAFComputeStats ext
     /* Object Inspector corresponding to the input parameter.
      */
     private PrimitiveObjectInspector inputOI;
-    private PrimitiveObjectInspector numVectorsOI;
+    private transient PrimitiveObjectInspector numVectorsOI;
 
     /* Partial aggregation result returned by TerminatePartial. Partial result is a struct
      * containing a long field named "count".
@@ -323,24 +316,21 @@ public class GenericUDAFComputeStats ext
     /* Object Inspectors corresponding to the struct returned by TerminatePartial and the long
      * field within the struct - "count"
      */
-    private StructObjectInspector soi;
+    private transient StructObjectInspector soi;
 
-    private StructField columnType;
-    private WritableStringObjectInspector columnTypeFieldOI;
-
-    private StructField minField;
+    private transient StructField minField;
     private WritableLongObjectInspector minFieldOI;
 
-    private StructField maxField;
+    private transient StructField maxField;
     private WritableLongObjectInspector maxFieldOI;
 
-    private StructField countNullsField;
+    private transient StructField countNullsField;
     private WritableLongObjectInspector countNullsFieldOI;
 
-    private StructField ndvField;
+    private transient StructField ndvField;
     private WritableStringObjectInspector ndvFieldOI;
 
-    private StructField numBitVectorsField;
+    private transient StructField numBitVectorsField;
     private WritableIntObjectInspector numBitVectorsFieldOI;
 
     /* Output of final result of the aggregation
@@ -358,9 +348,6 @@ public class GenericUDAFComputeStats ext
       } else {
         soi = (StructObjectInspector) parameters[0];
 
-        columnType = soi.getStructFieldRef("ColumnType");
-        columnTypeFieldOI = (WritableStringObjectInspector) columnType.getFieldObjectInspector();
-
         minField = soi.getStructFieldRef("Min");
         minFieldOI = (WritableLongObjectInspector) minField.getFieldObjectInspector();
 
@@ -474,23 +461,6 @@ public class GenericUDAFComputeStats ext
 
     boolean warned = false;
 
-    private void printDebugOutput(String functionName, AggregationBuffer agg) {
-      LongStatsAgg myagg = (LongStatsAgg) agg;
-
-      LOG.debug(functionName);
-
-      LOG.debug("Max Value:");
-      LOG.debug(myagg.max);
-
-      LOG.debug("Min Value:");
-      LOG.debug(myagg.min);
-
-      LOG.debug("Count of Null Values:");
-      LOG.debug(myagg.countNulls);
-
-      myagg.numDV.printNumDistinctValueEstimator();
-    }
-
     @Override
     public void iterate(AggregationBuffer agg, Object[] parameters) throws HiveException {
       Object p = parameters[0];
@@ -632,7 +602,7 @@ public class GenericUDAFComputeStats ext
     /* Object Inspector corresponding to the input parameter.
      */
     private PrimitiveObjectInspector inputOI;
-    private PrimitiveObjectInspector numVectorsOI;
+    private transient PrimitiveObjectInspector numVectorsOI;
 
     /* Partial aggregation result returned by TerminatePartial. Partial result is a struct
      * containing a long field named "count".
@@ -642,24 +612,21 @@ public class GenericUDAFComputeStats ext
     /* Object Inspectors corresponding to the struct returned by TerminatePartial and the long
      * field within the struct - "count"
      */
-    private StructObjectInspector soi;
-
-    private StructField columnTypeField;
-    private WritableStringObjectInspector columnTypeFieldOI;
+    private transient StructObjectInspector soi;
 
-    private StructField minField;
+    private transient StructField minField;
     private WritableDoubleObjectInspector minFieldOI;
 
-    private StructField maxField;
+    private transient StructField maxField;
     private WritableDoubleObjectInspector maxFieldOI;
 
-    private StructField countNullsField;
+    private transient StructField countNullsField;
     private WritableLongObjectInspector countNullsFieldOI;
 
-    private StructField ndvField;
+    private transient StructField ndvField;
     private WritableStringObjectInspector ndvFieldOI;
 
-    private StructField numBitVectorsField;
+    private transient StructField numBitVectorsField;
     private WritableIntObjectInspector numBitVectorsFieldOI;
 
     /* Output of final result of the aggregation
@@ -677,10 +644,6 @@ public class GenericUDAFComputeStats ext
       } else {
         soi = (StructObjectInspector) parameters[0];
 
-        columnTypeField = soi.getStructFieldRef("ColumnType");
-        columnTypeFieldOI = (WritableStringObjectInspector)
-                               columnTypeField.getFieldObjectInspector();
-
         minField = soi.getStructFieldRef("Min");
         minFieldOI = (WritableDoubleObjectInspector) minField.getFieldObjectInspector();
 
@@ -794,23 +757,6 @@ public class GenericUDAFComputeStats ext
 
     boolean warned = false;
 
-    private void printDebugOutput(String functionName, AggregationBuffer agg) {
-      DoubleStatsAgg myagg = (DoubleStatsAgg) agg;
-
-      LOG.debug(functionName);
-
-      LOG.debug("Max Value:");
-      LOG.debug(myagg.max);
-
-      LOG.debug("Min Value:");
-      LOG.debug(myagg.min);
-
-      LOG.debug("Count of Null Values:");
-      LOG.debug(myagg.countNulls);
-
-      myagg.numDV.printNumDistinctValueEstimator();
-    }
-
     @Override
     public void iterate(AggregationBuffer agg, Object[] parameters) throws HiveException {
       Object p = parameters[0];
@@ -953,7 +899,7 @@ public class GenericUDAFComputeStats ext
     /* Object Inspector corresponding to the input parameter.
      */
     private PrimitiveObjectInspector inputOI;
-    private PrimitiveObjectInspector numVectorsOI;
+    private transient PrimitiveObjectInspector numVectorsOI;
 
     /* Partial aggregation result returned by TerminatePartial. Partial result is a struct
      * containing a long field named "count".
@@ -963,27 +909,24 @@ public class GenericUDAFComputeStats ext
     /* Object Inspectors corresponding to the struct returned by TerminatePartial and the
      * fields within the struct - "maxLength", "sumLength", "count", "countNulls", "ndv"
      */
-    private StructObjectInspector soi;
+    private transient StructObjectInspector soi;
 
-    private StructField columnTypeField;
-    private WritableStringObjectInspector columnTypeFieldOI;
-
-    private StructField maxLengthField;
+    private transient StructField maxLengthField;
     private WritableLongObjectInspector maxLengthFieldOI;
 
-    private StructField sumLengthField;
+    private transient StructField sumLengthField;
     private WritableLongObjectInspector sumLengthFieldOI;
 
-    private StructField countField;
+    private transient StructField countField;
     private WritableLongObjectInspector countFieldOI;
 
-    private StructField countNullsField;
+    private transient StructField countNullsField;
     private WritableLongObjectInspector countNullsFieldOI;
 
-    private StructField ndvField;
+    private transient StructField ndvField;
     private WritableStringObjectInspector ndvFieldOI;
 
-    private StructField numBitVectorsField;
+    private transient StructField numBitVectorsField;
     private WritableIntObjectInspector numBitVectorsFieldOI;
 
     /* Output of final result of the aggregation
@@ -1001,10 +944,6 @@ public class GenericUDAFComputeStats ext
       } else {
         soi = (StructObjectInspector) parameters[0];
 
-        columnTypeField = soi.getStructFieldRef("ColumnType");
-        columnTypeFieldOI = (WritableStringObjectInspector)
-                               columnTypeField.getFieldObjectInspector();
-
         maxLengthField = soi.getStructFieldRef("MaxLength");
         maxLengthFieldOI = (WritableLongObjectInspector) maxLengthField.getFieldObjectInspector();
 
@@ -1126,26 +1065,6 @@ public class GenericUDAFComputeStats ext
 
     boolean warned = false;
 
-    private void printDebugOutput(String functionName, AggregationBuffer agg) {
-      StringStatsAgg myagg = (StringStatsAgg) agg;
-
-      LOG.debug(functionName);
-
-      LOG.debug("Max Length:");
-      LOG.debug(myagg.maxLength);
-
-      LOG.debug("Sum of Length:");
-      LOG.debug(myagg.sumLength);
-
-      LOG.debug("Count of non-Null Values:");
-      LOG.debug(myagg.count);
-
-      LOG.debug("Count of Null Values:");
-      LOG.debug(myagg.countNulls);
-
-      myagg.numDV.printNumDistinctValueEstimator();
-    }
-
     @Override
     public void iterate(AggregationBuffer agg, Object[] parameters) throws HiveException {
       Object p = parameters[0];
@@ -1308,21 +1227,18 @@ public class GenericUDAFComputeStats ext
     /* Object Inspectors corresponding to the struct returned by TerminatePartial and the
      * fields within the struct - "maxLength", "sumLength", "count", "countNulls"
      */
-    private StructObjectInspector soi;
+    private transient StructObjectInspector soi;
 
-    private StructField columnTypeField;
-    private WritableStringObjectInspector columnTypeFieldOI;
-
-    private StructField maxLengthField;
+    private transient StructField maxLengthField;
     private WritableLongObjectInspector maxLengthFieldOI;
 
-    private StructField sumLengthField;
+    private transient StructField sumLengthField;
     private WritableLongObjectInspector sumLengthFieldOI;
 
-    private StructField countField;
+    private transient StructField countField;
     private WritableLongObjectInspector countFieldOI;
 
-    private StructField countNullsField;
+    private transient StructField countNullsField;
     private WritableLongObjectInspector countNullsFieldOI;
 
     /* Output of final result of the aggregation
@@ -1339,10 +1255,6 @@ public class GenericUDAFComputeStats ext
       } else {
         soi = (StructObjectInspector) parameters[0];
 
-        columnTypeField = soi.getStructFieldRef("ColumnType");
-        columnTypeFieldOI = (WritableStringObjectInspector)
-                               columnTypeField.getFieldObjectInspector();
-
         maxLengthField = soi.getStructFieldRef("MaxLength");
         maxLengthFieldOI = (WritableLongObjectInspector) maxLengthField.getFieldObjectInspector();
 
@@ -1483,24 +1395,6 @@ public class GenericUDAFComputeStats ext
       }
     }
 
-    private void printDebugOutput(String functionName, AggregationBuffer agg) {
-      BinaryStatsAgg myagg = (BinaryStatsAgg) agg;
-
-      LOG.debug(functionName);
-
-      LOG.debug("Max Length:");
-      LOG.debug(myagg.maxLength);
-
-      LOG.debug("Sum of Length:");
-      LOG.debug(myagg.sumLength);
-
-      LOG.debug("Count of non-Null Values:");
-      LOG.debug(myagg.count);
-
-      LOG.debug("Count of Null Values:");
-      LOG.debug(myagg.countNulls);
-    }
-
     @Override
     public Object terminatePartial(AggregationBuffer agg) throws HiveException {
       BinaryStatsAgg myagg = (BinaryStatsAgg) agg;

Modified: hive/branches/vectorization/ql/src/java/org/apache/hadoop/hive/ql/udf/generic/GenericUDAFContextNGrams.java
URL: http://svn.apache.org/viewvc/hive/branches/vectorization/ql/src/java/org/apache/hadoop/hive/ql/udf/generic/GenericUDAFContextNGrams.java?rev=1514554&r1=1514553&r2=1514554&view=diff
==============================================================================
--- hive/branches/vectorization/ql/src/java/org/apache/hadoop/hive/ql/udf/generic/GenericUDAFContextNGrams.java (original)
+++ hive/branches/vectorization/ql/src/java/org/apache/hadoop/hive/ql/udf/generic/GenericUDAFContextNGrams.java Fri Aug 16 01:21:54 2013
@@ -158,16 +158,16 @@ public class GenericUDAFContextNGrams im
    */
   public static class GenericUDAFContextNGramEvaluator extends GenericUDAFEvaluator {
     // For PARTIAL1 and COMPLETE: ObjectInspectors for original data
-    private StandardListObjectInspector outerInputOI;
-    private StandardListObjectInspector innerInputOI;
-    private StandardListObjectInspector contextListOI;
+    private transient StandardListObjectInspector outerInputOI;
+    private transient StandardListObjectInspector innerInputOI;
+    private transient StandardListObjectInspector contextListOI;
     private PrimitiveObjectInspector contextOI;
     private PrimitiveObjectInspector inputOI;
-    private PrimitiveObjectInspector kOI;
-    private PrimitiveObjectInspector pOI;
+    private transient PrimitiveObjectInspector kOI;
+    private transient PrimitiveObjectInspector pOI;
 
     // For PARTIAL2 and FINAL: ObjectInspectors for partial aggregations
-    private StandardListObjectInspector loi;
+    private transient StandardListObjectInspector loi;
 
     @Override
     public ObjectInspector init(Mode m, ObjectInspector[] parameters) throws HiveException {

Modified: hive/branches/vectorization/ql/src/java/org/apache/hadoop/hive/ql/udf/generic/GenericUDAFCorrelation.java
URL: http://svn.apache.org/viewvc/hive/branches/vectorization/ql/src/java/org/apache/hadoop/hive/ql/udf/generic/GenericUDAFCorrelation.java?rev=1514554&r1=1514553&r2=1514554&view=diff
==============================================================================
--- hive/branches/vectorization/ql/src/java/org/apache/hadoop/hive/ql/udf/generic/GenericUDAFCorrelation.java (original)
+++ hive/branches/vectorization/ql/src/java/org/apache/hadoop/hive/ql/udf/generic/GenericUDAFCorrelation.java Fri Aug 16 01:21:54 2013
@@ -157,13 +157,13 @@ public class GenericUDAFCorrelation exte
     private PrimitiveObjectInspector yInputOI;
 
     // For PARTIAL2 and FINAL
-    private StructObjectInspector soi;
-    private StructField countField;
-    private StructField xavgField;
-    private StructField yavgField;
-    private StructField xvarField;
-    private StructField yvarField;
-    private StructField covarField;
+    private transient StructObjectInspector soi;
+    private transient StructField countField;
+    private transient StructField xavgField;
+    private transient StructField yavgField;
+    private transient StructField xvarField;
+    private transient StructField yvarField;
+    private transient StructField covarField;
     private LongObjectInspector countFieldOI;
     private DoubleObjectInspector xavgFieldOI;
     private DoubleObjectInspector yavgFieldOI;

Modified: hive/branches/vectorization/ql/src/java/org/apache/hadoop/hive/ql/udf/generic/GenericUDAFCovariance.java
URL: http://svn.apache.org/viewvc/hive/branches/vectorization/ql/src/java/org/apache/hadoop/hive/ql/udf/generic/GenericUDAFCovariance.java?rev=1514554&r1=1514553&r2=1514554&view=diff
==============================================================================
--- hive/branches/vectorization/ql/src/java/org/apache/hadoop/hive/ql/udf/generic/GenericUDAFCovariance.java (original)
+++ hive/branches/vectorization/ql/src/java/org/apache/hadoop/hive/ql/udf/generic/GenericUDAFCovariance.java Fri Aug 16 01:21:54 2013
@@ -150,11 +150,11 @@ public class GenericUDAFCovariance exten
     private PrimitiveObjectInspector yInputOI;
 
     // For PARTIAL2 and FINAL
-    private StructObjectInspector soi;
-    private StructField countField;
-    private StructField xavgField;
-    private StructField yavgField;
-    private StructField covarField;
+    private transient StructObjectInspector soi;
+    private transient StructField countField;
+    private transient StructField xavgField;
+    private transient StructField yavgField;
+    private transient StructField covarField;
     private LongObjectInspector countFieldOI;
     private DoubleObjectInspector xavgFieldOI;
     private DoubleObjectInspector yavgFieldOI;
@@ -252,7 +252,7 @@ public class GenericUDAFCovariance exten
       myagg.covar = 0;
     }
 
-    private boolean warned = false;
+    private final boolean warned = false;
 
     @Override
     public void iterate(AggregationBuffer agg, Object[] parameters) throws HiveException {

Modified: hive/branches/vectorization/ql/src/java/org/apache/hadoop/hive/ql/udf/generic/GenericUDAFCumeDist.java
URL: http://svn.apache.org/viewvc/hive/branches/vectorization/ql/src/java/org/apache/hadoop/hive/ql/udf/generic/GenericUDAFCumeDist.java?rev=1514554&r1=1514553&r2=1514554&view=diff
==============================================================================
--- hive/branches/vectorization/ql/src/java/org/apache/hadoop/hive/ql/udf/generic/GenericUDAFCumeDist.java (original)
+++ hive/branches/vectorization/ql/src/java/org/apache/hadoop/hive/ql/udf/generic/GenericUDAFCumeDist.java Fri Aug 16 01:21:54 2013
@@ -43,7 +43,9 @@ import org.apache.hadoop.io.IntWritable;
 									"   and including x in the specified order/ N"
 								),
 		supportsWindow = false,
-		pivotResult = true
+		pivotResult = true,
+		rankingFunction = true,
+		impliesOrder = true
 )
 public class GenericUDAFCumeDist extends GenericUDAFRank
 {

Modified: hive/branches/vectorization/ql/src/java/org/apache/hadoop/hive/ql/udf/generic/GenericUDAFDenseRank.java
URL: http://svn.apache.org/viewvc/hive/branches/vectorization/ql/src/java/org/apache/hadoop/hive/ql/udf/generic/GenericUDAFDenseRank.java?rev=1514554&r1=1514553&r2=1514554&view=diff
==============================================================================
--- hive/branches/vectorization/ql/src/java/org/apache/hadoop/hive/ql/udf/generic/GenericUDAFDenseRank.java (original)
+++ hive/branches/vectorization/ql/src/java/org/apache/hadoop/hive/ql/udf/generic/GenericUDAFDenseRank.java Fri Aug 16 01:21:54 2013
@@ -34,7 +34,9 @@ import org.apache.hadoop.hive.ql.exec.Wi
 										"that the next person came in third."
 								),
 		supportsWindow = false,
-		pivotResult = true
+		pivotResult = true,
+		rankingFunction = true,
+		impliesOrder = true
 )
 public class GenericUDAFDenseRank extends GenericUDAFRank
 {

Modified: hive/branches/vectorization/ql/src/java/org/apache/hadoop/hive/ql/udf/generic/GenericUDAFEWAHBitmap.java
URL: http://svn.apache.org/viewvc/hive/branches/vectorization/ql/src/java/org/apache/hadoop/hive/ql/udf/generic/GenericUDAFEWAHBitmap.java?rev=1514554&r1=1514553&r2=1514554&view=diff
==============================================================================
--- hive/branches/vectorization/ql/src/java/org/apache/hadoop/hive/ql/udf/generic/GenericUDAFEWAHBitmap.java (original)
+++ hive/branches/vectorization/ql/src/java/org/apache/hadoop/hive/ql/udf/generic/GenericUDAFEWAHBitmap.java Fri Aug 16 01:21:54 2013
@@ -35,7 +35,6 @@ import org.apache.hadoop.hive.serde2.obj
 import org.apache.hadoop.hive.serde2.objectinspector.ObjectInspectorUtils;
 import org.apache.hadoop.hive.serde2.objectinspector.PrimitiveObjectInspector;
 import org.apache.hadoop.hive.serde2.objectinspector.StandardListObjectInspector;
-import org.apache.hadoop.hive.serde2.objectinspector.primitive.LongObjectInspector;
 import org.apache.hadoop.hive.serde2.objectinspector.primitive.PrimitiveObjectInspectorFactory;
 import org.apache.hadoop.hive.serde2.objectinspector.primitive.PrimitiveObjectInspectorUtils;
 import org.apache.hadoop.hive.serde2.typeinfo.TypeInfo;
@@ -74,12 +73,11 @@ public class GenericUDAFEWAHBitmap exten
 
     // For PARTIAL1 and COMPLETE: ObjectInspectors for original data
     private PrimitiveObjectInspector inputOI;
-    private LongObjectInspector bitmapLongOI;
 
     // For PARTIAL2 and FINAL: ObjectInspectors for partial aggregations
     // (lists of bitmaps)
-    private StandardListObjectInspector loi;
-    private StandardListObjectInspector internalMergeOI;
+    private transient StandardListObjectInspector loi;
+    private transient StandardListObjectInspector internalMergeOI;
 
     @Override
     public ObjectInspector init(Mode m, ObjectInspector[] parameters)
@@ -93,13 +91,11 @@ public class GenericUDAFEWAHBitmap exten
             .getStandardListObjectInspector(PrimitiveObjectInspectorFactory.writableLongObjectInspector);
       } else if (m == Mode.PARTIAL2 || m == Mode.FINAL) {
         internalMergeOI = (StandardListObjectInspector) parameters[0];
-        bitmapLongOI = PrimitiveObjectInspectorFactory.writableLongObjectInspector;
         inputOI = PrimitiveObjectInspectorFactory.writableByteObjectInspector;
         loi = (StandardListObjectInspector) ObjectInspectorFactory
             .getStandardListObjectInspector(PrimitiveObjectInspectorFactory.writableLongObjectInspector);
         return loi;
       } else { // Mode.COMPLETE, ie. no map-side aggregation, requires ordering
-        bitmapLongOI = PrimitiveObjectInspectorFactory.writableLongObjectInspector;
         inputOI = PrimitiveObjectInspectorFactory.writableByteObjectInspector;
         loi = (StandardListObjectInspector) ObjectInspectorFactory
             .getStandardListObjectInspector(PrimitiveObjectInspectorFactory.writableLongObjectInspector);

Modified: hive/branches/vectorization/ql/src/java/org/apache/hadoop/hive/ql/udf/generic/GenericUDAFFirstValue.java
URL: http://svn.apache.org/viewvc/hive/branches/vectorization/ql/src/java/org/apache/hadoop/hive/ql/udf/generic/GenericUDAFFirstValue.java?rev=1514554&r1=1514553&r2=1514554&view=diff
==============================================================================
--- hive/branches/vectorization/ql/src/java/org/apache/hadoop/hive/ql/udf/generic/GenericUDAFFirstValue.java (original)
+++ hive/branches/vectorization/ql/src/java/org/apache/hadoop/hive/ql/udf/generic/GenericUDAFFirstValue.java Fri Aug 16 01:21:54 2013
@@ -41,7 +41,8 @@ import org.apache.hadoop.hive.serde2.typ
 								value = "_FUNC_(x)"
 								),
 		supportsWindow = true,
-		pivotResult = false
+		pivotResult = false,
+		impliesOrder = true
 )
 public class GenericUDAFFirstValue extends AbstractGenericUDAFResolver
 {

Modified: hive/branches/vectorization/ql/src/java/org/apache/hadoop/hive/ql/udf/generic/GenericUDAFHistogramNumeric.java
URL: http://svn.apache.org/viewvc/hive/branches/vectorization/ql/src/java/org/apache/hadoop/hive/ql/udf/generic/GenericUDAFHistogramNumeric.java?rev=1514554&r1=1514553&r2=1514554&view=diff
==============================================================================
--- hive/branches/vectorization/ql/src/java/org/apache/hadoop/hive/ql/udf/generic/GenericUDAFHistogramNumeric.java (original)
+++ hive/branches/vectorization/ql/src/java/org/apache/hadoop/hive/ql/udf/generic/GenericUDAFHistogramNumeric.java Fri Aug 16 01:21:54 2013
@@ -121,10 +121,10 @@ public class GenericUDAFHistogramNumeric
 
     // For PARTIAL1 and COMPLETE: ObjectInspectors for original data
     private PrimitiveObjectInspector inputOI;
-    private PrimitiveObjectInspector nbinsOI;
+    private transient PrimitiveObjectInspector nbinsOI;
 
     // For PARTIAL2 and FINAL: ObjectInspectors for partial aggregations (list of doubles)
-    private StandardListObjectInspector loi;
+    private transient StandardListObjectInspector loi;
 
 
     @Override

Modified: hive/branches/vectorization/ql/src/java/org/apache/hadoop/hive/ql/udf/generic/GenericUDAFLag.java
URL: http://svn.apache.org/viewvc/hive/branches/vectorization/ql/src/java/org/apache/hadoop/hive/ql/udf/generic/GenericUDAFLag.java?rev=1514554&r1=1514553&r2=1514554&view=diff
==============================================================================
--- hive/branches/vectorization/ql/src/java/org/apache/hadoop/hive/ql/udf/generic/GenericUDAFLag.java (original)
+++ hive/branches/vectorization/ql/src/java/org/apache/hadoop/hive/ql/udf/generic/GenericUDAFLag.java Fri Aug 16 01:21:54 2013
@@ -33,7 +33,8 @@ import org.apache.hadoop.hive.ql.metadat
                 value = "_FUNC_(expr, amt, default)"
                 ),
     supportsWindow = false,
-    pivotResult = true
+    pivotResult = true,
+    impliesOrder = true
 )
 public class GenericUDAFLag extends GenericUDAFLeadLag {
 

Modified: hive/branches/vectorization/ql/src/java/org/apache/hadoop/hive/ql/udf/generic/GenericUDAFLastValue.java
URL: http://svn.apache.org/viewvc/hive/branches/vectorization/ql/src/java/org/apache/hadoop/hive/ql/udf/generic/GenericUDAFLastValue.java?rev=1514554&r1=1514553&r2=1514554&view=diff
==============================================================================
--- hive/branches/vectorization/ql/src/java/org/apache/hadoop/hive/ql/udf/generic/GenericUDAFLastValue.java (original)
+++ hive/branches/vectorization/ql/src/java/org/apache/hadoop/hive/ql/udf/generic/GenericUDAFLastValue.java Fri Aug 16 01:21:54 2013
@@ -34,7 +34,7 @@ import org.apache.hadoop.hive.serde2.obj
 import org.apache.hadoop.hive.serde2.typeinfo.TypeInfo;
 import org.apache.hadoop.hive.serde2.typeinfo.TypeInfoFactory;
 
-@WindowFunctionDescription(description = @Description(name = "last_value", value = "_FUNC_(x)"), supportsWindow = true, pivotResult = false)
+@WindowFunctionDescription(description = @Description(name = "last_value", value = "_FUNC_(x)"), supportsWindow = true, pivotResult = false, impliesOrder = true)
 public class GenericUDAFLastValue extends AbstractGenericUDAFResolver
 {
 	static final Log LOG = LogFactory.getLog(GenericUDAFLastValue.class

Modified: hive/branches/vectorization/ql/src/java/org/apache/hadoop/hive/ql/udf/generic/GenericUDAFLead.java
URL: http://svn.apache.org/viewvc/hive/branches/vectorization/ql/src/java/org/apache/hadoop/hive/ql/udf/generic/GenericUDAFLead.java?rev=1514554&r1=1514553&r2=1514554&view=diff
==============================================================================
--- hive/branches/vectorization/ql/src/java/org/apache/hadoop/hive/ql/udf/generic/GenericUDAFLead.java (original)
+++ hive/branches/vectorization/ql/src/java/org/apache/hadoop/hive/ql/udf/generic/GenericUDAFLead.java Fri Aug 16 01:21:54 2013
@@ -33,7 +33,8 @@ import org.apache.hadoop.hive.ql.metadat
                 value = "_FUNC_(expr, amt, default)"
                 ),
     supportsWindow = false,
-    pivotResult = true
+    pivotResult = true,
+    impliesOrder = true
 )
 public class GenericUDAFLead extends GenericUDAFLeadLag {
 

Modified: hive/branches/vectorization/ql/src/java/org/apache/hadoop/hive/ql/udf/generic/GenericUDAFLeadLag.java
URL: http://svn.apache.org/viewvc/hive/branches/vectorization/ql/src/java/org/apache/hadoop/hive/ql/udf/generic/GenericUDAFLeadLag.java?rev=1514554&r1=1514553&r2=1514554&view=diff
==============================================================================
--- hive/branches/vectorization/ql/src/java/org/apache/hadoop/hive/ql/udf/generic/GenericUDAFLeadLag.java (original)
+++ hive/branches/vectorization/ql/src/java/org/apache/hadoop/hive/ql/udf/generic/GenericUDAFLeadLag.java Fri Aug 16 01:21:54 2013
@@ -94,10 +94,10 @@ public abstract class GenericUDAFLeadLag
 
   public static abstract class GenericUDAFLeadLagEvaluator extends GenericUDAFEvaluator {
 
-    ObjectInspector[] inputOI;
-    int amt;
+    private transient ObjectInspector[] inputOI;
+    private int amt;
     String fnName;
-    Converter defaultValueConverter;
+    private transient Converter defaultValueConverter;
 
     @Override
     public ObjectInspector init(Mode m, ObjectInspector[] parameters) throws HiveException

Modified: hive/branches/vectorization/ql/src/java/org/apache/hadoop/hive/ql/udf/generic/GenericUDAFMax.java
URL: http://svn.apache.org/viewvc/hive/branches/vectorization/ql/src/java/org/apache/hadoop/hive/ql/udf/generic/GenericUDAFMax.java?rev=1514554&r1=1514553&r2=1514554&view=diff
==============================================================================
--- hive/branches/vectorization/ql/src/java/org/apache/hadoop/hive/ql/udf/generic/GenericUDAFMax.java (original)
+++ hive/branches/vectorization/ql/src/java/org/apache/hadoop/hive/ql/udf/generic/GenericUDAFMax.java Fri Aug 16 01:21:54 2013
@@ -53,8 +53,8 @@ public class GenericUDAFMax extends Abst
   @UDFType(distinctLike=true)
   public static class GenericUDAFMaxEvaluator extends GenericUDAFEvaluator {
 
-    ObjectInspector inputOI;
-    ObjectInspector outputOI;
+    private transient ObjectInspector inputOI;
+    private transient ObjectInspector outputOI;
 
     @Override
     public ObjectInspector init(Mode m, ObjectInspector[] parameters)

Modified: hive/branches/vectorization/ql/src/java/org/apache/hadoop/hive/ql/udf/generic/GenericUDAFMin.java
URL: http://svn.apache.org/viewvc/hive/branches/vectorization/ql/src/java/org/apache/hadoop/hive/ql/udf/generic/GenericUDAFMin.java?rev=1514554&r1=1514553&r2=1514554&view=diff
==============================================================================
--- hive/branches/vectorization/ql/src/java/org/apache/hadoop/hive/ql/udf/generic/GenericUDAFMin.java (original)
+++ hive/branches/vectorization/ql/src/java/org/apache/hadoop/hive/ql/udf/generic/GenericUDAFMin.java Fri Aug 16 01:21:54 2013
@@ -53,8 +53,8 @@ public class GenericUDAFMin extends Abst
   @UDFType(distinctLike=true)
   public static class GenericUDAFMinEvaluator extends GenericUDAFEvaluator {
 
-    ObjectInspector inputOI;
-    ObjectInspector outputOI;
+    private transient ObjectInspector inputOI;
+    private transient ObjectInspector outputOI;
 
     @Override
     public ObjectInspector init(Mode m, ObjectInspector[] parameters)

Modified: hive/branches/vectorization/ql/src/java/org/apache/hadoop/hive/ql/udf/generic/GenericUDAFNTile.java
URL: http://svn.apache.org/viewvc/hive/branches/vectorization/ql/src/java/org/apache/hadoop/hive/ql/udf/generic/GenericUDAFNTile.java?rev=1514554&r1=1514553&r2=1514554&view=diff
==============================================================================
--- hive/branches/vectorization/ql/src/java/org/apache/hadoop/hive/ql/udf/generic/GenericUDAFNTile.java (original)
+++ hive/branches/vectorization/ql/src/java/org/apache/hadoop/hive/ql/udf/generic/GenericUDAFNTile.java Fri Aug 16 01:21:54 2013
@@ -90,7 +90,7 @@ public class GenericUDAFNTile  extends A
 
 	public static class GenericUDAFNTileEvaluator extends GenericUDAFEvaluator
 	{
-		PrimitiveObjectInspector inputOI;
+		private transient PrimitiveObjectInspector inputOI;
 
 		@Override
 		public ObjectInspector init(Mode m, ObjectInspector[] parameters) throws HiveException

Modified: hive/branches/vectorization/ql/src/java/org/apache/hadoop/hive/ql/udf/generic/GenericUDAFPercentRank.java
URL: http://svn.apache.org/viewvc/hive/branches/vectorization/ql/src/java/org/apache/hadoop/hive/ql/udf/generic/GenericUDAFPercentRank.java?rev=1514554&r1=1514553&r2=1514554&view=diff
==============================================================================
--- hive/branches/vectorization/ql/src/java/org/apache/hadoop/hive/ql/udf/generic/GenericUDAFPercentRank.java (original)
+++ hive/branches/vectorization/ql/src/java/org/apache/hadoop/hive/ql/udf/generic/GenericUDAFPercentRank.java Fri Aug 16 01:21:54 2013
@@ -40,7 +40,9 @@ import org.apache.hadoop.io.IntWritable;
 									"(rank of row in its partition - 1) / (number of rows in the partition - 1)"
 								),
 		supportsWindow = false,
-		pivotResult = true
+		pivotResult = true,
+		rankingFunction = true,
+		impliesOrder = true
 )
 public class GenericUDAFPercentRank extends GenericUDAFRank
 {

Modified: hive/branches/vectorization/ql/src/java/org/apache/hadoop/hive/ql/udf/generic/GenericUDAFPercentileApprox.java
URL: http://svn.apache.org/viewvc/hive/branches/vectorization/ql/src/java/org/apache/hadoop/hive/ql/udf/generic/GenericUDAFPercentileApprox.java?rev=1514554&r1=1514553&r2=1514554&view=diff
==============================================================================
--- hive/branches/vectorization/ql/src/java/org/apache/hadoop/hive/ql/udf/generic/GenericUDAFPercentileApprox.java (original)
+++ hive/branches/vectorization/ql/src/java/org/apache/hadoop/hive/ql/udf/generic/GenericUDAFPercentileApprox.java Fri Aug 16 01:21:54 2013
@@ -292,7 +292,7 @@ public class GenericUDAFPercentileApprox
     protected Integer nbins = 10000;
 
     // For PARTIAL2 and FINAL: ObjectInspectors for partial aggregations (list of doubles)
-    protected StandardListObjectInspector loi;
+    protected transient StandardListObjectInspector loi;
 
     @Override
     public void merge(AggregationBuffer agg, Object partial) throws HiveException {

Modified: hive/branches/vectorization/ql/src/java/org/apache/hadoop/hive/ql/udf/generic/GenericUDAFRank.java
URL: http://svn.apache.org/viewvc/hive/branches/vectorization/ql/src/java/org/apache/hadoop/hive/ql/udf/generic/GenericUDAFRank.java?rev=1514554&r1=1514553&r2=1514554&view=diff
==============================================================================
--- hive/branches/vectorization/ql/src/java/org/apache/hadoop/hive/ql/udf/generic/GenericUDAFRank.java (original)
+++ hive/branches/vectorization/ql/src/java/org/apache/hadoop/hive/ql/udf/generic/GenericUDAFRank.java Fri Aug 16 01:21:54 2013
@@ -44,7 +44,9 @@ import org.apache.hadoop.io.IntWritable;
 								value = "_FUNC_(x)"
 								),
 		supportsWindow = false,
-		pivotResult = true
+		pivotResult = true,
+		rankingFunction = true,
+		impliesOrder = true
 )
 public class GenericUDAFRank extends AbstractGenericUDAFResolver
 {

Modified: hive/branches/vectorization/ql/src/java/org/apache/hadoop/hive/ql/udf/generic/GenericUDAFVariance.java
URL: http://svn.apache.org/viewvc/hive/branches/vectorization/ql/src/java/org/apache/hadoop/hive/ql/udf/generic/GenericUDAFVariance.java?rev=1514554&r1=1514553&r2=1514554&view=diff
==============================================================================
--- hive/branches/vectorization/ql/src/java/org/apache/hadoop/hive/ql/udf/generic/GenericUDAFVariance.java (original)
+++ hive/branches/vectorization/ql/src/java/org/apache/hadoop/hive/ql/udf/generic/GenericUDAFVariance.java Fri Aug 16 01:21:54 2013
@@ -104,16 +104,15 @@ public class GenericUDAFVariance extends
   public static class GenericUDAFVarianceEvaluator extends GenericUDAFEvaluator {
 
     // For PARTIAL1 and COMPLETE
-    private PrimitiveObjectInspector inputOI;
+    private transient PrimitiveObjectInspector inputOI;
 
     // For PARTIAL2 and FINAL
-    private StructObjectInspector soi;
-    private StructField countField;
-    private StructField sumField;
-    private StructField varianceField;
+    private transient StructObjectInspector soi;
+    private transient StructField countField;
+    private transient StructField sumField;
+    private transient StructField varianceField;
     private LongObjectInspector countFieldOI;
     private DoubleObjectInspector sumFieldOI;
-    private DoubleObjectInspector varianceFieldOI;
 
     // For PARTIAL1 and PARTIAL2
     private Object[] partialResult;
@@ -139,8 +138,6 @@ public class GenericUDAFVariance extends
         countFieldOI = (LongObjectInspector) countField
             .getFieldObjectInspector();
         sumFieldOI = (DoubleObjectInspector) sumField.getFieldObjectInspector();
-        varianceFieldOI = (DoubleObjectInspector) varianceField
-            .getFieldObjectInspector();
       }
 
       // init output

Modified: hive/branches/vectorization/ql/src/java/org/apache/hadoop/hive/ql/udf/generic/GenericUDFArray.java
URL: http://svn.apache.org/viewvc/hive/branches/vectorization/ql/src/java/org/apache/hadoop/hive/ql/udf/generic/GenericUDFArray.java?rev=1514554&r1=1514553&r2=1514554&view=diff
==============================================================================
--- hive/branches/vectorization/ql/src/java/org/apache/hadoop/hive/ql/udf/generic/GenericUDFArray.java (original)
+++ hive/branches/vectorization/ql/src/java/org/apache/hadoop/hive/ql/udf/generic/GenericUDFArray.java Fri Aug 16 01:21:54 2013
@@ -26,9 +26,9 @@ import org.apache.hadoop.hive.ql.exec.UD
 import org.apache.hadoop.hive.ql.metadata.HiveException;
 import org.apache.hadoop.hive.serde2.objectinspector.ObjectInspector;
 import org.apache.hadoop.hive.serde2.objectinspector.ObjectInspectorConverters;
+import org.apache.hadoop.hive.serde2.objectinspector.ObjectInspectorConverters.Converter;
 import org.apache.hadoop.hive.serde2.objectinspector.ObjectInspectorFactory;
 import org.apache.hadoop.hive.serde2.objectinspector.PrimitiveObjectInspector;
-import org.apache.hadoop.hive.serde2.objectinspector.ObjectInspectorConverters.Converter;
 import org.apache.hadoop.hive.serde2.objectinspector.primitive.PrimitiveObjectInspectorFactory;
 
 /**

Modified: hive/branches/vectorization/ql/src/java/org/apache/hadoop/hive/ql/udf/generic/GenericUDFArrayContains.java
URL: http://svn.apache.org/viewvc/hive/branches/vectorization/ql/src/java/org/apache/hadoop/hive/ql/udf/generic/GenericUDFArrayContains.java?rev=1514554&r1=1514553&r2=1514554&view=diff
==============================================================================
--- hive/branches/vectorization/ql/src/java/org/apache/hadoop/hive/ql/udf/generic/GenericUDFArrayContains.java (original)
+++ hive/branches/vectorization/ql/src/java/org/apache/hadoop/hive/ql/udf/generic/GenericUDFArrayContains.java Fri Aug 16 01:21:54 2013
@@ -23,8 +23,8 @@ import org.apache.hadoop.hive.ql.exec.UD
 import org.apache.hadoop.hive.ql.metadata.HiveException;
 import org.apache.hadoop.hive.serde2.objectinspector.ListObjectInspector;
 import org.apache.hadoop.hive.serde2.objectinspector.ObjectInspector;
-import org.apache.hadoop.hive.serde2.objectinspector.ObjectInspectorUtils;
 import org.apache.hadoop.hive.serde2.objectinspector.ObjectInspector.Category;
+import org.apache.hadoop.hive.serde2.objectinspector.ObjectInspectorUtils;
 import org.apache.hadoop.hive.serde2.objectinspector.primitive.PrimitiveObjectInspectorFactory;
 import org.apache.hadoop.io.BooleanWritable;
 
@@ -44,9 +44,9 @@ public class GenericUDFArrayContains ext
   private static final int ARG_COUNT = 2; // Number of arguments to this UDF
   private static final String FUNC_NAME = "ARRAY_CONTAINS"; // External Name
 
-  private ObjectInspector valueOI;
-  private ListObjectInspector arrayOI;
-  private ObjectInspector arrayElementOI;
+  private transient ObjectInspector valueOI;
+  private transient ListObjectInspector arrayOI;
+  private transient ObjectInspector arrayElementOI;
   private BooleanWritable result;
 
   @Override

Modified: hive/branches/vectorization/ql/src/java/org/apache/hadoop/hive/ql/udf/generic/GenericUDFBaseCompare.java
URL: http://svn.apache.org/viewvc/hive/branches/vectorization/ql/src/java/org/apache/hadoop/hive/ql/udf/generic/GenericUDFBaseCompare.java?rev=1514554&r1=1514553&r2=1514554&view=diff
==============================================================================
--- hive/branches/vectorization/ql/src/java/org/apache/hadoop/hive/ql/udf/generic/GenericUDFBaseCompare.java (original)
+++ hive/branches/vectorization/ql/src/java/org/apache/hadoop/hive/ql/udf/generic/GenericUDFBaseCompare.java Fri Aug 16 01:21:54 2013
@@ -56,17 +56,17 @@ public abstract class GenericUDFBaseComp
   protected String opName;
   protected String opDisplayName;
 
-  protected ObjectInspector[] argumentOIs;
+  protected transient ObjectInspector[] argumentOIs;
 
-  protected ReturnObjectInspectorResolver conversionHelper = null;
+  protected transient ReturnObjectInspectorResolver conversionHelper = null;
   protected ObjectInspector compareOI;
   protected CompareType compareType;
-  protected Converter converter0, converter1;
-  protected StringObjectInspector soi0, soi1;
-  protected IntObjectInspector ioi0, ioi1;
-  protected LongObjectInspector loi0, loi1;
-  protected ByteObjectInspector byoi0, byoi1;
-  protected BooleanObjectInspector boi0,boi1;
+  protected transient Converter converter0, converter1;
+  protected transient StringObjectInspector soi0, soi1;
+  protected transient IntObjectInspector ioi0, ioi1;
+  protected transient LongObjectInspector loi0, loi1;
+  protected transient ByteObjectInspector byoi0, byoi1;
+  protected transient BooleanObjectInspector boi0,boi1;
   protected final BooleanWritable result = new BooleanWritable();
 
   @Override

Modified: hive/branches/vectorization/ql/src/java/org/apache/hadoop/hive/ql/udf/generic/GenericUDFCase.java
URL: http://svn.apache.org/viewvc/hive/branches/vectorization/ql/src/java/org/apache/hadoop/hive/ql/udf/generic/GenericUDFCase.java?rev=1514554&r1=1514553&r2=1514554&view=diff
==============================================================================
--- hive/branches/vectorization/ql/src/java/org/apache/hadoop/hive/ql/udf/generic/GenericUDFCase.java (original)
+++ hive/branches/vectorization/ql/src/java/org/apache/hadoop/hive/ql/udf/generic/GenericUDFCase.java Fri Aug 16 01:21:54 2013
@@ -32,9 +32,9 @@ import org.apache.hadoop.hive.serde2.obj
  * and f should have the same TypeInfo, or an exception will be thrown.
  */
 public class GenericUDFCase extends GenericUDF {
-  private ObjectInspector[] argumentOIs;
-  private GenericUDFUtils.ReturnObjectInspectorResolver returnOIResolver;
-  private GenericUDFUtils.ReturnObjectInspectorResolver caseOIResolver;
+  private transient ObjectInspector[] argumentOIs;
+  private transient GenericUDFUtils.ReturnObjectInspectorResolver returnOIResolver;
+  private transient GenericUDFUtils.ReturnObjectInspectorResolver caseOIResolver;
 
   @Override
   public ObjectInspector initialize(ObjectInspector[] arguments) throws UDFArgumentTypeException {

Modified: hive/branches/vectorization/ql/src/java/org/apache/hadoop/hive/ql/udf/generic/GenericUDFCoalesce.java
URL: http://svn.apache.org/viewvc/hive/branches/vectorization/ql/src/java/org/apache/hadoop/hive/ql/udf/generic/GenericUDFCoalesce.java?rev=1514554&r1=1514553&r2=1514554&view=diff
==============================================================================
--- hive/branches/vectorization/ql/src/java/org/apache/hadoop/hive/ql/udf/generic/GenericUDFCoalesce.java (original)
+++ hive/branches/vectorization/ql/src/java/org/apache/hadoop/hive/ql/udf/generic/GenericUDFCoalesce.java Fri Aug 16 01:21:54 2013
@@ -34,8 +34,8 @@ import org.apache.hadoop.hive.serde2.obj
     extended = "Example:\n"
     + "  > SELECT _FUNC_(NULL, 1, NULL) FROM src LIMIT 1;\n" + "  1")
 public class GenericUDFCoalesce extends GenericUDF {
-  private ObjectInspector[] argumentOIs;
-  private GenericUDFUtils.ReturnObjectInspectorResolver returnOIResolver;
+  private transient ObjectInspector[] argumentOIs;
+  private transient GenericUDFUtils.ReturnObjectInspectorResolver returnOIResolver;
 
   @Override
   public ObjectInspector initialize(ObjectInspector[] arguments) throws UDFArgumentTypeException {

Modified: hive/branches/vectorization/ql/src/java/org/apache/hadoop/hive/ql/udf/generic/GenericUDFConcatWS.java
URL: http://svn.apache.org/viewvc/hive/branches/vectorization/ql/src/java/org/apache/hadoop/hive/ql/udf/generic/GenericUDFConcatWS.java?rev=1514554&r1=1514553&r2=1514554&view=diff
==============================================================================
--- hive/branches/vectorization/ql/src/java/org/apache/hadoop/hive/ql/udf/generic/GenericUDFConcatWS.java (original)
+++ hive/branches/vectorization/ql/src/java/org/apache/hadoop/hive/ql/udf/generic/GenericUDFConcatWS.java Fri Aug 16 01:21:54 2013
@@ -47,7 +47,7 @@ import org.apache.hadoop.io.Text;
     + "  > SELECT _FUNC_('.', 'www', array('facebook', 'com')) FROM src LIMIT 1;\n"
     + "  'www.facebook.com'")
 public class GenericUDFConcatWS extends GenericUDF {
-  private ObjectInspector[] argumentOIs;
+  private transient ObjectInspector[] argumentOIs;
 
   @Override
   public ObjectInspector initialize(ObjectInspector[] arguments) throws UDFArgumentException {
@@ -64,12 +64,14 @@ public class GenericUDFConcatWS extends 
           if (((ListObjectInspector)arguments[i]).getListElementObjectInspector()
             .getTypeName().equals(serdeConstants.STRING_TYPE_NAME)
             || ((ListObjectInspector)arguments[i]).getListElementObjectInspector()
-            .getTypeName().equals(serdeConstants.VOID_TYPE_NAME))
+            .getTypeName().equals(serdeConstants.VOID_TYPE_NAME)) {
           break;
+          }
         case PRIMITIVE:
           if (arguments[i].getTypeName().equals(serdeConstants.STRING_TYPE_NAME)
-            || arguments[i].getTypeName().equals(serdeConstants.VOID_TYPE_NAME))
+            || arguments[i].getTypeName().equals(serdeConstants.VOID_TYPE_NAME)) {
           break;
+          }
         default:
           throw new UDFArgumentTypeException(i, "Argument " + (i + 1)
             + " of function CONCAT_WS must be \"" + serdeConstants.STRING_TYPE_NAME

Modified: hive/branches/vectorization/ql/src/java/org/apache/hadoop/hive/ql/udf/generic/GenericUDFEWAHBitmapEmpty.java
URL: http://svn.apache.org/viewvc/hive/branches/vectorization/ql/src/java/org/apache/hadoop/hive/ql/udf/generic/GenericUDFEWAHBitmapEmpty.java?rev=1514554&r1=1514553&r2=1514554&view=diff
==============================================================================
--- hive/branches/vectorization/ql/src/java/org/apache/hadoop/hive/ql/udf/generic/GenericUDFEWAHBitmapEmpty.java (original)
+++ hive/branches/vectorization/ql/src/java/org/apache/hadoop/hive/ql/udf/generic/GenericUDFEWAHBitmapEmpty.java Fri Aug 16 01:21:54 2013
@@ -31,8 +31,8 @@ import org.apache.hadoop.hive.ql.index.b
 import org.apache.hadoop.hive.ql.metadata.HiveException;
 import org.apache.hadoop.hive.serde2.objectinspector.ListObjectInspector;
 import org.apache.hadoop.hive.serde2.objectinspector.ObjectInspector;
-import org.apache.hadoop.hive.serde2.objectinspector.PrimitiveObjectInspector;
 import org.apache.hadoop.hive.serde2.objectinspector.ObjectInspector.Category;
+import org.apache.hadoop.hive.serde2.objectinspector.PrimitiveObjectInspector;
 import org.apache.hadoop.hive.serde2.objectinspector.primitive.BooleanObjectInspector;
 import org.apache.hadoop.hive.serde2.objectinspector.primitive.PrimitiveObjectInspectorFactory;
 import org.apache.hadoop.hive.serde2.objectinspector.primitive.PrimitiveObjectInspectorUtils;
@@ -42,8 +42,8 @@ import org.apache.hadoop.io.LongWritable
 @Description(name = "ewah_bitmap_empty", value = "_FUNC_(bitmap) - "
     + "Predicate that tests whether an EWAH-compressed bitmap is all zeros ")
 public class GenericUDFEWAHBitmapEmpty extends GenericUDF {
-  ObjectInspector bitmapOI;
-  BooleanObjectInspector boolOI;
+  private transient ObjectInspector bitmapOI;
+  private transient BooleanObjectInspector boolOI;
 
 @Override
 public ObjectInspector initialize(ObjectInspector[] arguments) throws UDFArgumentException {

Modified: hive/branches/vectorization/ql/src/java/org/apache/hadoop/hive/ql/udf/generic/GenericUDFElt.java
URL: http://svn.apache.org/viewvc/hive/branches/vectorization/ql/src/java/org/apache/hadoop/hive/ql/udf/generic/GenericUDFElt.java?rev=1514554&r1=1514553&r2=1514554&view=diff
==============================================================================
--- hive/branches/vectorization/ql/src/java/org/apache/hadoop/hive/ql/udf/generic/GenericUDFElt.java (original)
+++ hive/branches/vectorization/ql/src/java/org/apache/hadoop/hive/ql/udf/generic/GenericUDFElt.java Fri Aug 16 01:21:54 2013
@@ -24,8 +24,8 @@ import org.apache.hadoop.hive.ql.exec.UD
 import org.apache.hadoop.hive.ql.exec.UDFArgumentTypeException;
 import org.apache.hadoop.hive.ql.metadata.HiveException;
 import org.apache.hadoop.hive.serde2.objectinspector.ObjectInspector;
-import org.apache.hadoop.hive.serde2.objectinspector.ObjectInspectorConverters;
 import org.apache.hadoop.hive.serde2.objectinspector.ObjectInspector.Category;
+import org.apache.hadoop.hive.serde2.objectinspector.ObjectInspectorConverters;
 import org.apache.hadoop.hive.serde2.objectinspector.primitive.PrimitiveObjectInspectorFactory;
 import org.apache.hadoop.io.IntWritable;
 
@@ -41,7 +41,7 @@ import org.apache.hadoop.io.IntWritable;
     extended = "Example:\n"
     + "  > SELECT _FUNC_(1, 'face', 'book') FROM src LIMIT 1;\n" + "  'face'")
 public class GenericUDFElt extends GenericUDF {
-  private ObjectInspectorConverters.Converter[] converters;
+  private transient ObjectInspectorConverters.Converter[] converters;
 
   @Override
   public ObjectInspector initialize(ObjectInspector[] arguments) throws UDFArgumentException {

Modified: hive/branches/vectorization/ql/src/java/org/apache/hadoop/hive/ql/udf/generic/GenericUDFField.java
URL: http://svn.apache.org/viewvc/hive/branches/vectorization/ql/src/java/org/apache/hadoop/hive/ql/udf/generic/GenericUDFField.java?rev=1514554&r1=1514553&r2=1514554&view=diff
==============================================================================
--- hive/branches/vectorization/ql/src/java/org/apache/hadoop/hive/ql/udf/generic/GenericUDFField.java (original)
+++ hive/branches/vectorization/ql/src/java/org/apache/hadoop/hive/ql/udf/generic/GenericUDFField.java Fri Aug 16 01:21:54 2013
@@ -24,9 +24,8 @@ import org.apache.hadoop.hive.ql.exec.UD
 import org.apache.hadoop.hive.ql.exec.UDFArgumentTypeException;
 import org.apache.hadoop.hive.ql.metadata.HiveException;
 import org.apache.hadoop.hive.serde2.objectinspector.ObjectInspector;
-import org.apache.hadoop.hive.serde2.objectinspector.ObjectInspectorUtils;
-import org.apache.hadoop.hive.serde2.objectinspector.PrimitiveObjectInspector;
 import org.apache.hadoop.hive.serde2.objectinspector.ObjectInspector.Category;
+import org.apache.hadoop.hive.serde2.objectinspector.ObjectInspectorUtils;
 import org.apache.hadoop.hive.serde2.objectinspector.primitive.PrimitiveObjectInspectorFactory;
 import org.apache.hadoop.io.IntWritable;
 
@@ -38,7 +37,7 @@ import org.apache.hadoop.io.IntWritable;
     + "returns the index of str in the str1,str2,... list or 0 if not found", extended = "All primitive types are supported, arguments are compared using str.equals(x)."
     + " If str is NULL, the return value is 0.")
 public class GenericUDFField extends GenericUDF {
-  private ObjectInspector[] argumentOIs;
+  private transient ObjectInspector[] argumentOIs;
 
   @Override
   public ObjectInspector initialize(ObjectInspector[] arguments)

Modified: hive/branches/vectorization/ql/src/java/org/apache/hadoop/hive/ql/udf/generic/GenericUDFFormatNumber.java
URL: http://svn.apache.org/viewvc/hive/branches/vectorization/ql/src/java/org/apache/hadoop/hive/ql/udf/generic/GenericUDFFormatNumber.java?rev=1514554&r1=1514553&r2=1514554&view=diff
==============================================================================
--- hive/branches/vectorization/ql/src/java/org/apache/hadoop/hive/ql/udf/generic/GenericUDFFormatNumber.java (original)
+++ hive/branches/vectorization/ql/src/java/org/apache/hadoop/hive/ql/udf/generic/GenericUDFFormatNumber.java Fri Aug 16 01:21:54 2013
@@ -18,6 +18,8 @@
 
 package org.apache.hadoop.hive.ql.udf.generic;
 
+import java.text.DecimalFormat;
+
 import org.apache.hadoop.hive.ql.exec.Description;
 import org.apache.hadoop.hive.ql.exec.UDFArgumentException;
 import org.apache.hadoop.hive.ql.exec.UDFArgumentLengthException;
@@ -26,19 +28,12 @@ import org.apache.hadoop.hive.ql.metadat
 import org.apache.hadoop.hive.serde.serdeConstants;
 import org.apache.hadoop.hive.serde2.objectinspector.ObjectInspector;
 import org.apache.hadoop.hive.serde2.objectinspector.PrimitiveObjectInspector;
-import org.apache.hadoop.hive.serde2.objectinspector.PrimitiveObjectInspector.PrimitiveCategory;
-import org.apache.hadoop.hive.serde2.objectinspector.primitive.PrimitiveObjectInspectorFactory;
-import org.apache.hadoop.hive.serde2.objectinspector.primitive.StringObjectInspector;
+import org.apache.hadoop.hive.serde2.objectinspector.primitive.DoubleObjectInspector;
 import org.apache.hadoop.hive.serde2.objectinspector.primitive.IntObjectInspector;
 import org.apache.hadoop.hive.serde2.objectinspector.primitive.LongObjectInspector;
-import org.apache.hadoop.hive.serde2.objectinspector.primitive.DoubleObjectInspector;
+import org.apache.hadoop.hive.serde2.objectinspector.primitive.PrimitiveObjectInspectorFactory;
 import org.apache.hadoop.io.Text;
 
-import java.text.DecimalFormat;
-import java.text.NumberFormat;
-import java.lang.Number;
-import java.lang.NumberFormatException;
-
 /**
  * Generic UDF for format_number function
  * <code>FORMAT_NUMBER(X, D)</code>.
@@ -58,7 +53,7 @@ import java.lang.NumberFormatException;
     + "  > SELECT _FUNC_(12332.123456, 4) FROM src LIMIT 1;\n"
     + "  '12,332.1235'")
 public class GenericUDFFormatNumber extends GenericUDF {
-  private ObjectInspector[] argumentOIs;
+  private transient ObjectInspector[] argumentOIs;
   private final Text resultText = new Text();
   private final StringBuilder pattern = new StringBuilder("");
   private final DecimalFormat numberFormat = new DecimalFormat("");

Modified: hive/branches/vectorization/ql/src/java/org/apache/hadoop/hive/ql/udf/generic/GenericUDFFromUtcTimestamp.java
URL: http://svn.apache.org/viewvc/hive/branches/vectorization/ql/src/java/org/apache/hadoop/hive/ql/udf/generic/GenericUDFFromUtcTimestamp.java?rev=1514554&r1=1514553&r2=1514554&view=diff
==============================================================================
--- hive/branches/vectorization/ql/src/java/org/apache/hadoop/hive/ql/udf/generic/GenericUDFFromUtcTimestamp.java (original)
+++ hive/branches/vectorization/ql/src/java/org/apache/hadoop/hive/ql/udf/generic/GenericUDFFromUtcTimestamp.java Fri Aug 16 01:21:54 2013
@@ -38,9 +38,9 @@ public class GenericUDFFromUtcTimestamp 
 
   static final Log LOG = LogFactory.getLog(GenericUDFFromUtcTimestamp.class);
 
-  private PrimitiveObjectInspector[] argumentOIs;
-  private TimestampConverter timestampConverter;
-  private TextConverter textConverter;
+  private transient PrimitiveObjectInspector[] argumentOIs;
+  private transient TimestampConverter timestampConverter;
+  private transient TextConverter textConverter;
 
   @Override
   public ObjectInspector initialize(ObjectInspector[] arguments)

Modified: hive/branches/vectorization/ql/src/java/org/apache/hadoop/hive/ql/udf/generic/GenericUDFHash.java
URL: http://svn.apache.org/viewvc/hive/branches/vectorization/ql/src/java/org/apache/hadoop/hive/ql/udf/generic/GenericUDFHash.java?rev=1514554&r1=1514553&r2=1514554&view=diff
==============================================================================
--- hive/branches/vectorization/ql/src/java/org/apache/hadoop/hive/ql/udf/generic/GenericUDFHash.java (original)
+++ hive/branches/vectorization/ql/src/java/org/apache/hadoop/hive/ql/udf/generic/GenericUDFHash.java Fri Aug 16 01:21:54 2013
@@ -32,7 +32,7 @@ import org.apache.hadoop.io.IntWritable;
  */
 @Description(name = "hash", value = "_FUNC_(a1, a2, ...) - Returns a hash value of the arguments")
 public class GenericUDFHash extends GenericUDF {
-  private ObjectInspector[] argumentOIs;
+  private transient ObjectInspector[] argumentOIs;
 
   @Override
   public ObjectInspector initialize(ObjectInspector[] arguments) throws UDFArgumentTypeException {
@@ -41,7 +41,7 @@ public class GenericUDFHash extends Gene
     return PrimitiveObjectInspectorFactory.writableIntObjectInspector;
   }
 
-  private IntWritable result = new IntWritable();
+  private final IntWritable result = new IntWritable();
 
   @Override
   public Object evaluate(DeferredObject[] arguments) throws HiveException {

Modified: hive/branches/vectorization/ql/src/java/org/apache/hadoop/hive/ql/udf/generic/GenericUDFIf.java
URL: http://svn.apache.org/viewvc/hive/branches/vectorization/ql/src/java/org/apache/hadoop/hive/ql/udf/generic/GenericUDFIf.java?rev=1514554&r1=1514553&r2=1514554&view=diff
==============================================================================
--- hive/branches/vectorization/ql/src/java/org/apache/hadoop/hive/ql/udf/generic/GenericUDFIf.java (original)
+++ hive/branches/vectorization/ql/src/java/org/apache/hadoop/hive/ql/udf/generic/GenericUDFIf.java Fri Aug 16 01:21:54 2013
@@ -34,8 +34,8 @@ import org.apache.hadoop.hive.serde2.obj
  * on the context in which it is used.
  */
 public class GenericUDFIf extends GenericUDF {
-  private ObjectInspector[] argumentOIs;
-  private GenericUDFUtils.ReturnObjectInspectorResolver returnOIResolver;
+  private transient ObjectInspector[] argumentOIs;
+  private transient GenericUDFUtils.ReturnObjectInspectorResolver returnOIResolver;
 
   @Override
   public ObjectInspector initialize(ObjectInspector[] arguments) throws UDFArgumentException {

Modified: hive/branches/vectorization/ql/src/java/org/apache/hadoop/hive/ql/udf/generic/GenericUDFIn.java
URL: http://svn.apache.org/viewvc/hive/branches/vectorization/ql/src/java/org/apache/hadoop/hive/ql/udf/generic/GenericUDFIn.java?rev=1514554&r1=1514553&r2=1514554&view=diff
==============================================================================
--- hive/branches/vectorization/ql/src/java/org/apache/hadoop/hive/ql/udf/generic/GenericUDFIn.java (original)
+++ hive/branches/vectorization/ql/src/java/org/apache/hadoop/hive/ql/udf/generic/GenericUDFIn.java Fri Aug 16 01:21:54 2013
@@ -56,14 +56,14 @@ import org.apache.hadoop.io.BooleanWrita
 
 public class GenericUDFIn extends GenericUDF {
 
-  private ObjectInspector[] argumentOIs;
+  private transient ObjectInspector[] argumentOIs;
   private Set<Object> constantInSet;
   private boolean isInSetConstant = true; //are variables from IN(...) constant
 
-  BooleanWritable bw = new BooleanWritable();
+  private final BooleanWritable bw = new BooleanWritable();
 
-  ReturnObjectInspectorResolver conversionHelper;
-  ObjectInspector compareOI;
+  private transient ReturnObjectInspectorResolver conversionHelper;
+  private transient ObjectInspector compareOI;
 
   @Override
   public ObjectInspector initialize(ObjectInspector[] arguments)

Modified: hive/branches/vectorization/ql/src/java/org/apache/hadoop/hive/ql/udf/generic/GenericUDFInFile.java
URL: http://svn.apache.org/viewvc/hive/branches/vectorization/ql/src/java/org/apache/hadoop/hive/ql/udf/generic/GenericUDFInFile.java?rev=1514554&r1=1514553&r2=1514554&view=diff
==============================================================================
--- hive/branches/vectorization/ql/src/java/org/apache/hadoop/hive/ql/udf/generic/GenericUDFInFile.java (original)
+++ hive/branches/vectorization/ql/src/java/org/apache/hadoop/hive/ql/udf/generic/GenericUDFInFile.java Fri Aug 16 01:21:54 2013
@@ -24,7 +24,6 @@ import java.io.FileInputStream;
 import java.io.FileNotFoundException;
 import java.io.InputStream;
 import java.io.InputStreamReader;
-
 import java.util.HashSet;
 
 import org.apache.hadoop.hive.ql.exec.Description;
@@ -48,9 +47,9 @@ import org.apache.hadoop.hive.serde2.obj
     value = "_FUNC_(str, filename) - Returns true if str appears in the file")
 public class GenericUDFInFile extends GenericUDF {
 
-  HashSet<String> set;
-  ObjectInspector strObjectInspector;
-  ObjectInspector fileObjectInspector;
+  private HashSet<String> set;
+  private transient ObjectInspector strObjectInspector;
+  private transient ObjectInspector fileObjectInspector;
 
   @Override
   public ObjectInspector initialize(ObjectInspector[] arguments)

Modified: hive/branches/vectorization/ql/src/java/org/apache/hadoop/hive/ql/udf/generic/GenericUDFInstr.java
URL: http://svn.apache.org/viewvc/hive/branches/vectorization/ql/src/java/org/apache/hadoop/hive/ql/udf/generic/GenericUDFInstr.java?rev=1514554&r1=1514553&r2=1514554&view=diff
==============================================================================
--- hive/branches/vectorization/ql/src/java/org/apache/hadoop/hive/ql/udf/generic/GenericUDFInstr.java (original)
+++ hive/branches/vectorization/ql/src/java/org/apache/hadoop/hive/ql/udf/generic/GenericUDFInstr.java Fri Aug 16 01:21:54 2013
@@ -24,8 +24,8 @@ import org.apache.hadoop.hive.ql.exec.UD
 import org.apache.hadoop.hive.ql.exec.UDFArgumentTypeException;
 import org.apache.hadoop.hive.ql.metadata.HiveException;
 import org.apache.hadoop.hive.serde2.objectinspector.ObjectInspector;
-import org.apache.hadoop.hive.serde2.objectinspector.ObjectInspectorConverters;
 import org.apache.hadoop.hive.serde2.objectinspector.ObjectInspector.Category;
+import org.apache.hadoop.hive.serde2.objectinspector.ObjectInspectorConverters;
 import org.apache.hadoop.hive.serde2.objectinspector.primitive.PrimitiveObjectInspectorFactory;
 import org.apache.hadoop.io.IntWritable;
 import org.apache.hadoop.io.Text;
@@ -47,7 +47,7 @@ import org.apache.hadoop.io.Text;
     + "  > SELECT _FUNC_('Facebook', 'boo') FROM src LIMIT 1;\n" + "  5")
 public class GenericUDFInstr extends GenericUDF {
 
-  ObjectInspectorConverters.Converter[] converters;
+  private transient ObjectInspectorConverters.Converter[] converters;
 
   @Override
   public ObjectInspector initialize(ObjectInspector[] arguments) throws UDFArgumentException {

Modified: hive/branches/vectorization/ql/src/java/org/apache/hadoop/hive/ql/udf/generic/GenericUDFLeadLag.java
URL: http://svn.apache.org/viewvc/hive/branches/vectorization/ql/src/java/org/apache/hadoop/hive/ql/udf/generic/GenericUDFLeadLag.java?rev=1514554&r1=1514553&r2=1514554&view=diff
==============================================================================
--- hive/branches/vectorization/ql/src/java/org/apache/hadoop/hive/ql/udf/generic/GenericUDFLeadLag.java (original)
+++ hive/branches/vectorization/ql/src/java/org/apache/hadoop/hive/ql/udf/generic/GenericUDFLeadLag.java Fri Aug 16 01:21:54 2013
@@ -24,6 +24,7 @@ import org.apache.hadoop.hive.ql.exec.PT
 import org.apache.hadoop.hive.ql.exec.UDFArgumentException;
 import org.apache.hadoop.hive.ql.exec.UDFArgumentTypeException;
 import org.apache.hadoop.hive.ql.metadata.HiveException;
+import org.apache.hadoop.hive.ql.udf.UDFType;
 import org.apache.hadoop.hive.serde2.objectinspector.ConstantObjectInspector;
 import org.apache.hadoop.hive.serde2.objectinspector.ObjectInspector;
 import org.apache.hadoop.hive.serde2.objectinspector.ObjectInspectorConverters;
@@ -197,6 +198,7 @@ public abstract class GenericUDFLeadLag 
 
 	protected abstract int getIndex(int amt);
 
+	@UDFType(impliesOrder = true)
 	public static class GenericUDFLead extends GenericUDFLeadLag
 	{
 
@@ -219,6 +221,7 @@ public abstract class GenericUDFLeadLag 
 
 	}
 
+	@UDFType(impliesOrder = true)
 	public static class GenericUDFLag extends GenericUDFLeadLag
 	{
 		@Override

Modified: hive/branches/vectorization/ql/src/java/org/apache/hadoop/hive/ql/udf/generic/GenericUDFLocate.java
URL: http://svn.apache.org/viewvc/hive/branches/vectorization/ql/src/java/org/apache/hadoop/hive/ql/udf/generic/GenericUDFLocate.java?rev=1514554&r1=1514553&r2=1514554&view=diff
==============================================================================
--- hive/branches/vectorization/ql/src/java/org/apache/hadoop/hive/ql/udf/generic/GenericUDFLocate.java (original)
+++ hive/branches/vectorization/ql/src/java/org/apache/hadoop/hive/ql/udf/generic/GenericUDFLocate.java Fri Aug 16 01:21:54 2013
@@ -24,8 +24,8 @@ import org.apache.hadoop.hive.ql.exec.UD
 import org.apache.hadoop.hive.ql.exec.UDFArgumentTypeException;
 import org.apache.hadoop.hive.ql.metadata.HiveException;
 import org.apache.hadoop.hive.serde2.objectinspector.ObjectInspector;
-import org.apache.hadoop.hive.serde2.objectinspector.ObjectInspectorConverters;
 import org.apache.hadoop.hive.serde2.objectinspector.ObjectInspector.Category;
+import org.apache.hadoop.hive.serde2.objectinspector.ObjectInspectorConverters;
 import org.apache.hadoop.hive.serde2.objectinspector.primitive.PrimitiveObjectInspectorFactory;
 import org.apache.hadoop.io.IntWritable;
 import org.apache.hadoop.io.Text;
@@ -48,7 +48,7 @@ import org.apache.hadoop.io.Text;
     extended = "Example:\n"
     + "  > SELECT _FUNC_('bar', 'foobarbar', 5) FROM src LIMIT 1;\n" + "  7")
 public class GenericUDFLocate extends GenericUDF {
-  private ObjectInspectorConverters.Converter[] converters;
+  private transient ObjectInspectorConverters.Converter[] converters;
 
   @Override
   public ObjectInspector initialize(ObjectInspector[] arguments) throws UDFArgumentException {
@@ -82,7 +82,7 @@ public class GenericUDFLocate extends Ge
     return PrimitiveObjectInspectorFactory.writableIntObjectInspector;
   }
 
-  private IntWritable intWritable = new IntWritable(0);
+  private final IntWritable intWritable = new IntWritable(0);
 
   @Override
   public Object evaluate(DeferredObject[] arguments) throws HiveException {

Modified: hive/branches/vectorization/ql/src/java/org/apache/hadoop/hive/ql/udf/generic/GenericUDFMap.java
URL: http://svn.apache.org/viewvc/hive/branches/vectorization/ql/src/java/org/apache/hadoop/hive/ql/udf/generic/GenericUDFMap.java?rev=1514554&r1=1514553&r2=1514554&view=diff
==============================================================================
--- hive/branches/vectorization/ql/src/java/org/apache/hadoop/hive/ql/udf/generic/GenericUDFMap.java (original)
+++ hive/branches/vectorization/ql/src/java/org/apache/hadoop/hive/ql/udf/generic/GenericUDFMap.java Fri Aug 16 01:21:54 2013
@@ -27,9 +27,9 @@ import org.apache.hadoop.hive.ql.exec.UD
 import org.apache.hadoop.hive.ql.metadata.HiveException;
 import org.apache.hadoop.hive.serde2.objectinspector.ObjectInspector;
 import org.apache.hadoop.hive.serde2.objectinspector.ObjectInspectorConverters;
+import org.apache.hadoop.hive.serde2.objectinspector.ObjectInspectorConverters.Converter;
 import org.apache.hadoop.hive.serde2.objectinspector.ObjectInspectorFactory;
 import org.apache.hadoop.hive.serde2.objectinspector.PrimitiveObjectInspector;
-import org.apache.hadoop.hive.serde2.objectinspector.ObjectInspectorConverters.Converter;
 import org.apache.hadoop.hive.serde2.objectinspector.primitive.PrimitiveObjectInspectorFactory;
 
 /**
@@ -39,7 +39,7 @@ import org.apache.hadoop.hive.serde2.obj
 @Description(name = "map", value = "_FUNC_(key0, value0, key1, value1...) - "
     + "Creates a map with the given key/value pairs ")
 public class GenericUDFMap extends GenericUDF {
-  Converter[] converters;
+  private transient Converter[] converters;
   HashMap<Object, Object> ret = new HashMap<Object, Object>();
 
   @Override

Modified: hive/branches/vectorization/ql/src/java/org/apache/hadoop/hive/ql/udf/generic/GenericUDFMapKeys.java
URL: http://svn.apache.org/viewvc/hive/branches/vectorization/ql/src/java/org/apache/hadoop/hive/ql/udf/generic/GenericUDFMapKeys.java?rev=1514554&r1=1514553&r2=1514554&view=diff
==============================================================================
--- hive/branches/vectorization/ql/src/java/org/apache/hadoop/hive/ql/udf/generic/GenericUDFMapKeys.java (original)
+++ hive/branches/vectorization/ql/src/java/org/apache/hadoop/hive/ql/udf/generic/GenericUDFMapKeys.java Fri Aug 16 01:21:54 2013
@@ -27,8 +27,8 @@ import org.apache.hadoop.hive.ql.exec.UD
 import org.apache.hadoop.hive.ql.metadata.HiveException;
 import org.apache.hadoop.hive.serde2.objectinspector.MapObjectInspector;
 import org.apache.hadoop.hive.serde2.objectinspector.ObjectInspector;
-import org.apache.hadoop.hive.serde2.objectinspector.ObjectInspectorFactory;
 import org.apache.hadoop.hive.serde2.objectinspector.ObjectInspector.Category;
+import org.apache.hadoop.hive.serde2.objectinspector.ObjectInspectorFactory;
 
 /**
  * GenericUDFMapKeys.
@@ -37,7 +37,7 @@ import org.apache.hadoop.hive.serde2.obj
 @Description(name = "map_keys", value = "_FUNC_(map) - "
   + "Returns an unordered array containing the keys of the input map.")
 public class GenericUDFMapKeys extends GenericUDF {
-  private MapObjectInspector mapOI;
+  private transient MapObjectInspector mapOI;
   private final ArrayList<Object> retArray = new ArrayList<Object>();
 
   @Override

Modified: hive/branches/vectorization/ql/src/java/org/apache/hadoop/hive/ql/udf/generic/GenericUDFMapValues.java
URL: http://svn.apache.org/viewvc/hive/branches/vectorization/ql/src/java/org/apache/hadoop/hive/ql/udf/generic/GenericUDFMapValues.java?rev=1514554&r1=1514553&r2=1514554&view=diff
==============================================================================
--- hive/branches/vectorization/ql/src/java/org/apache/hadoop/hive/ql/udf/generic/GenericUDFMapValues.java (original)
+++ hive/branches/vectorization/ql/src/java/org/apache/hadoop/hive/ql/udf/generic/GenericUDFMapValues.java Fri Aug 16 01:21:54 2013
@@ -27,8 +27,8 @@ import org.apache.hadoop.hive.ql.exec.UD
 import org.apache.hadoop.hive.ql.metadata.HiveException;
 import org.apache.hadoop.hive.serde2.objectinspector.MapObjectInspector;
 import org.apache.hadoop.hive.serde2.objectinspector.ObjectInspector;
-import org.apache.hadoop.hive.serde2.objectinspector.ObjectInspectorFactory;
 import org.apache.hadoop.hive.serde2.objectinspector.ObjectInspector.Category;
+import org.apache.hadoop.hive.serde2.objectinspector.ObjectInspectorFactory;
 
 /**
  * GenericUDFMapValues.
@@ -37,7 +37,7 @@ import org.apache.hadoop.hive.serde2.obj
 @Description(name = "map_values", value = "_FUNC_(map) - "
   + "Returns an unordered array containing the values of the input map.")
 public class GenericUDFMapValues extends GenericUDF {
-  private MapObjectInspector mapOI;
+  private transient MapObjectInspector mapOI;
   private final ArrayList<Object> retArray = new ArrayList<Object>();
 
   @Override



Mime
View raw message