hive-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From na...@apache.org
Subject svn commit: r896744 [1/3] - in /hadoop/hive/trunk: ./ ql/src/java/org/apache/hadoop/hive/ql/exec/ ql/src/java/org/apache/hadoop/hive/ql/udf/ ql/src/java/org/apache/hadoop/hive/ql/udf/generic/ ql/src/test/queries/clientpositive/ ql/src/test/results/clie...
Date Thu, 07 Jan 2010 03:02:01 GMT
Author: namit
Date: Thu Jan  7 03:01:26 2010
New Revision: 896744

URL: http://svn.apache.org/viewvc?rev=896744&view=rev
Log:
HIVE-996 describe function" throws NPE when when called on UDTF or UDAF
(Carl Steinbach via namit)


Added:
    hadoop/hive/trunk/ql/src/test/queries/clientpositive/udaf_avg.q
    hadoop/hive/trunk/ql/src/test/queries/clientpositive/udaf_count.q
    hadoop/hive/trunk/ql/src/test/queries/clientpositive/udaf_max.q
    hadoop/hive/trunk/ql/src/test/queries/clientpositive/udaf_min.q
    hadoop/hive/trunk/ql/src/test/queries/clientpositive/udaf_std.q
    hadoop/hive/trunk/ql/src/test/queries/clientpositive/udaf_stddev_samp.q
    hadoop/hive/trunk/ql/src/test/queries/clientpositive/udaf_sum.q
    hadoop/hive/trunk/ql/src/test/queries/clientpositive/udaf_var_samp.q
    hadoop/hive/trunk/ql/src/test/queries/clientpositive/udaf_variance.q
    hadoop/hive/trunk/ql/src/test/results/clientpositive/udaf_avg.q.out
    hadoop/hive/trunk/ql/src/test/results/clientpositive/udaf_count.q.out
    hadoop/hive/trunk/ql/src/test/results/clientpositive/udaf_max.q.out
    hadoop/hive/trunk/ql/src/test/results/clientpositive/udaf_min.q.out
    hadoop/hive/trunk/ql/src/test/results/clientpositive/udaf_std.q.out
    hadoop/hive/trunk/ql/src/test/results/clientpositive/udaf_stddev_samp.q.out
    hadoop/hive/trunk/ql/src/test/results/clientpositive/udaf_sum.q.out
    hadoop/hive/trunk/ql/src/test/results/clientpositive/udaf_var_samp.q.out
    hadoop/hive/trunk/ql/src/test/results/clientpositive/udaf_variance.q.out
Modified:
    hadoop/hive/trunk/CHANGES.txt
    hadoop/hive/trunk/ql/src/java/org/apache/hadoop/hive/ql/exec/DDLTask.java
    hadoop/hive/trunk/ql/src/java/org/apache/hadoop/hive/ql/exec/FunctionInfo.java
    hadoop/hive/trunk/ql/src/java/org/apache/hadoop/hive/ql/exec/FunctionRegistry.java
    hadoop/hive/trunk/ql/src/java/org/apache/hadoop/hive/ql/exec/UDAF.java
    hadoop/hive/trunk/ql/src/java/org/apache/hadoop/hive/ql/udf/UDAFMax.java
    hadoop/hive/trunk/ql/src/java/org/apache/hadoop/hive/ql/udf/UDAFMin.java
    hadoop/hive/trunk/ql/src/java/org/apache/hadoop/hive/ql/udf/generic/GenericUDAFBridge.java
    hadoop/hive/trunk/ql/src/test/queries/clientpositive/udaf_number_format.q
    hadoop/hive/trunk/ql/src/test/queries/clientpositive/udf_abs.q
    hadoop/hive/trunk/ql/src/test/queries/clientpositive/udf_acos.q
    hadoop/hive/trunk/ql/src/test/queries/clientpositive/udf_array.q
    hadoop/hive/trunk/ql/src/test/queries/clientpositive/udf_ascii.q
    hadoop/hive/trunk/ql/src/test/queries/clientpositive/udf_asin.q
    hadoop/hive/trunk/ql/src/test/queries/clientpositive/udf_bin.q
    hadoop/hive/trunk/ql/src/test/queries/clientpositive/udf_case.q
    hadoop/hive/trunk/ql/src/test/queries/clientpositive/udf_coalesce.q
    hadoop/hive/trunk/ql/src/test/queries/clientpositive/udf_concat.q
    hadoop/hive/trunk/ql/src/test/queries/clientpositive/udf_conv.q
    hadoop/hive/trunk/ql/src/test/queries/clientpositive/udf_cos.q
    hadoop/hive/trunk/ql/src/test/queries/clientpositive/udf_divider.q
    hadoop/hive/trunk/ql/src/test/queries/clientpositive/udf_elt.q
    hadoop/hive/trunk/ql/src/test/queries/clientpositive/udf_hash.q
    hadoop/hive/trunk/ql/src/test/queries/clientpositive/udf_hex.q
    hadoop/hive/trunk/ql/src/test/queries/clientpositive/udf_if.q
    hadoop/hive/trunk/ql/src/test/queries/clientpositive/udf_instr.q
    hadoop/hive/trunk/ql/src/test/queries/clientpositive/udf_isnull_isnotnull.q
    hadoop/hive/trunk/ql/src/test/queries/clientpositive/udf_json.q
    hadoop/hive/trunk/ql/src/test/queries/clientpositive/udf_length.q
    hadoop/hive/trunk/ql/src/test/queries/clientpositive/udf_like.q
    hadoop/hive/trunk/ql/src/test/queries/clientpositive/udf_locate.q
    hadoop/hive/trunk/ql/src/test/queries/clientpositive/udf_lower.q
    hadoop/hive/trunk/ql/src/test/queries/clientpositive/udf_lpad_rpad.q
    hadoop/hive/trunk/ql/src/test/queries/clientpositive/udf_map.q
    hadoop/hive/trunk/ql/src/test/queries/clientpositive/udf_negative.q
    hadoop/hive/trunk/ql/src/test/queries/clientpositive/udf_parse_url.q
    hadoop/hive/trunk/ql/src/test/queries/clientpositive/udf_pmod.q
    hadoop/hive/trunk/ql/src/test/queries/clientpositive/udf_regexp.q
    hadoop/hive/trunk/ql/src/test/queries/clientpositive/udf_repeat.q
    hadoop/hive/trunk/ql/src/test/queries/clientpositive/udf_reverse.q
    hadoop/hive/trunk/ql/src/test/queries/clientpositive/udf_round.q
    hadoop/hive/trunk/ql/src/test/queries/clientpositive/udf_sin.q
    hadoop/hive/trunk/ql/src/test/queries/clientpositive/udf_size.q
    hadoop/hive/trunk/ql/src/test/queries/clientpositive/udf_space.q
    hadoop/hive/trunk/ql/src/test/queries/clientpositive/udf_split.q
    hadoop/hive/trunk/ql/src/test/queries/clientpositive/udf_substr.q
    hadoop/hive/trunk/ql/src/test/queries/clientpositive/udf_unhex.q
    hadoop/hive/trunk/ql/src/test/queries/clientpositive/udf_unix_timestamp.q
    hadoop/hive/trunk/ql/src/test/queries/clientpositive/udf_weekofyear.q
    hadoop/hive/trunk/ql/src/test/queries/clientpositive/udtf_explode.q
    hadoop/hive/trunk/ql/src/test/results/clientpositive/udf_abs.q.out
    hadoop/hive/trunk/ql/src/test/results/clientpositive/udf_acos.q.out
    hadoop/hive/trunk/ql/src/test/results/clientpositive/udf_array.q.out
    hadoop/hive/trunk/ql/src/test/results/clientpositive/udf_ascii.q.out
    hadoop/hive/trunk/ql/src/test/results/clientpositive/udf_asin.q.out
    hadoop/hive/trunk/ql/src/test/results/clientpositive/udf_bin.q.out
    hadoop/hive/trunk/ql/src/test/results/clientpositive/udf_case.q.out
    hadoop/hive/trunk/ql/src/test/results/clientpositive/udf_coalesce.q.out
    hadoop/hive/trunk/ql/src/test/results/clientpositive/udf_conv.q.out
    hadoop/hive/trunk/ql/src/test/results/clientpositive/udf_cos.q.out
    hadoop/hive/trunk/ql/src/test/results/clientpositive/udf_divider.q.out
    hadoop/hive/trunk/ql/src/test/results/clientpositive/udf_elt.q.out
    hadoop/hive/trunk/ql/src/test/results/clientpositive/udf_hash.q.out
    hadoop/hive/trunk/ql/src/test/results/clientpositive/udf_hex.q.out
    hadoop/hive/trunk/ql/src/test/results/clientpositive/udf_if.q.out
    hadoop/hive/trunk/ql/src/test/results/clientpositive/udf_instr.q.out
    hadoop/hive/trunk/ql/src/test/results/clientpositive/udf_isnull_isnotnull.q.out
    hadoop/hive/trunk/ql/src/test/results/clientpositive/udf_json.q.out
    hadoop/hive/trunk/ql/src/test/results/clientpositive/udf_length.q.out
    hadoop/hive/trunk/ql/src/test/results/clientpositive/udf_like.q.out
    hadoop/hive/trunk/ql/src/test/results/clientpositive/udf_locate.q.out
    hadoop/hive/trunk/ql/src/test/results/clientpositive/udf_lower.q.out
    hadoop/hive/trunk/ql/src/test/results/clientpositive/udf_lpad_rpad.q.out
    hadoop/hive/trunk/ql/src/test/results/clientpositive/udf_map.q.out
    hadoop/hive/trunk/ql/src/test/results/clientpositive/udf_negative.q.out
    hadoop/hive/trunk/ql/src/test/results/clientpositive/udf_parse_url.q.out
    hadoop/hive/trunk/ql/src/test/results/clientpositive/udf_pmod.q.out
    hadoop/hive/trunk/ql/src/test/results/clientpositive/udf_repeat.q.out
    hadoop/hive/trunk/ql/src/test/results/clientpositive/udf_reverse.q.out
    hadoop/hive/trunk/ql/src/test/results/clientpositive/udf_round.q.out
    hadoop/hive/trunk/ql/src/test/results/clientpositive/udf_sin.q.out
    hadoop/hive/trunk/ql/src/test/results/clientpositive/udf_size.q.out
    hadoop/hive/trunk/ql/src/test/results/clientpositive/udf_space.q.out
    hadoop/hive/trunk/ql/src/test/results/clientpositive/udf_split.q.out
    hadoop/hive/trunk/ql/src/test/results/clientpositive/udf_substr.q.out
    hadoop/hive/trunk/ql/src/test/results/clientpositive/udf_unhex.q.out
    hadoop/hive/trunk/ql/src/test/results/clientpositive/udf_unix_timestamp.q.out
    hadoop/hive/trunk/ql/src/test/results/clientpositive/udtf_explode.q.out

Modified: hadoop/hive/trunk/CHANGES.txt
URL: http://svn.apache.org/viewvc/hadoop/hive/trunk/CHANGES.txt?rev=896744&r1=896743&r2=896744&view=diff
==============================================================================
--- hadoop/hive/trunk/CHANGES.txt (original)
+++ hadoop/hive/trunk/CHANGES.txt Thu Jan  7 03:01:26 2010
@@ -412,6 +412,9 @@
     HIVE-1030 mapjoin should throw an error if the input is too large
     (Ning Zhang via namit)
 
+    HIVE-996 describe function" throws NPE when when called on UDTF or UDAF
+    (Carl Steinbach via namit)
+
 Release 0.4.0 -  Unreleased
 
   INCOMPATIBLE CHANGES

Modified: hadoop/hive/trunk/ql/src/java/org/apache/hadoop/hive/ql/exec/DDLTask.java
URL: http://svn.apache.org/viewvc/hadoop/hive/trunk/ql/src/java/org/apache/hadoop/hive/ql/exec/DDLTask.java?rev=896744&r1=896743&r2=896744&view=diff
==============================================================================
--- hadoop/hive/trunk/ql/src/java/org/apache/hadoop/hive/ql/exec/DDLTask.java (original)
+++ hadoop/hive/trunk/ql/src/java/org/apache/hadoop/hive/ql/exec/DDLTask.java Thu Jan  7 03:01:26 2010
@@ -26,10 +26,8 @@
 import java.io.Serializable;
 import java.io.Writer;
 import java.util.ArrayList;
-import java.util.HashMap;
 import java.util.HashSet;
 import java.util.Iterator;
-import java.util.LinkedHashMap;
 import java.util.List;
 import java.util.Map;
 import java.util.Set;
@@ -75,8 +73,6 @@
 import org.apache.hadoop.hive.ql.plan.showTableStatusDesc;
 import org.apache.hadoop.hive.ql.plan.showTablesDesc;
 import org.apache.hadoop.hive.ql.plan.api.StageType;
-import org.apache.hadoop.hive.ql.udf.generic.GenericUDF;
-import org.apache.hadoop.hive.ql.udf.generic.GenericUDFBridge;
 import org.apache.hadoop.hive.serde.Constants;
 import org.apache.hadoop.hive.serde2.Deserializer;
 import org.apache.hadoop.hive.serde2.MetadataTypedColumnsetSerDe;
@@ -473,8 +469,8 @@
    * @throws HiveException
    */
   private int describeFunction(descFunctionDesc descFunc)
-      throws HiveException {
-    String name = descFunc.getName();
+  throws HiveException {
+    String funcName = descFunc.getName();
 
     // write the results in the file
     try {
@@ -483,30 +479,25 @@
 
       // get the function documentation
       description desc = null;
-      FunctionInfo fi = FunctionRegistry.getFunctionInfo(name);
-
       Class<?> funcClass = null;
-      GenericUDF udf = fi.getGenericUDF();
-      if (udf != null) {
-        // If it's a GenericUDFBridge, then let's use the
-        if (udf instanceof GenericUDFBridge) {
-          funcClass = ((GenericUDFBridge)udf).getUdfClass();
-        } else {
-          funcClass = udf.getClass();
-        }
+      FunctionInfo functionInfo = FunctionRegistry.getFunctionInfo(funcName);
+      if (functionInfo != null) {
+        funcClass = functionInfo.getFunctionClass();
       }
-
       if (funcClass != null) {
         desc = funcClass.getAnnotation(description.class);
       }
       if (desc != null) {
-        outStream.writeBytes(desc.value().replace("_FUNC_", name));
-        if(descFunc.isExtended() && desc.extended().length()>0) {
-          outStream.writeBytes("\n"+desc.extended().replace("_FUNC_", name));
+        outStream.writeBytes(desc.value().replace("_FUNC_", funcName));
+        if(descFunc.isExtended() && desc.extended().length() > 0) {
+          outStream.writeBytes("\n"+desc.extended().replace("_FUNC_", funcName));
         }
       } else {
-        outStream.writeBytes("Function " + name + " does not exist or cannot" +
-        		" find documentation for it.");
+        if (funcClass != null) {
+          outStream.writeBytes("There is no documentation for function " + funcName);
+        } else {
+          outStream.writeBytes("Function " + funcName + " does not exist.");
+        }
       }
 
       outStream.write(terminator);
@@ -533,10 +524,10 @@
    * @return Return 0 when execution succeeds and above 0 if it fails.
    */
   private int showTableStatus(Hive db, showTableStatusDesc showTblStatus)
-      throws HiveException {
+  throws HiveException {
     // get the tables for the desired pattenn - populate the output stream
     List<Table> tbls = new ArrayList<Table>();
-    HashMap<String, String> part = showTblStatus.getPartSpec();
+    Map<String, String> part = showTblStatus.getPartSpec();
     Partition par = null;
     if (part != null) {
       Table tbl = db.getTable(showTblStatus.getDbName(), showTblStatus
@@ -613,10 +604,9 @@
         List<Path> locations = new ArrayList<Path>();
         if (isPartitioned) {
           if (par == null) {
-            List<Partition> parts = db.getPartitions(tbl);
-            for (Partition curPart : parts)
-              locations.add(new Path(curPart.getTPartition().getSd()
-                  .getLocation()));
+            for (Partition curPart : db.getPartitions(tbl)) {
+              locations.add(new Path(curPart.getTPartition().getSd().getLocation()));
+            }
           } else {
             locations.add(new Path(par.getTPartition().getSd().getLocation()));
           }
@@ -649,7 +639,7 @@
    * @throws HiveException Throws this exception if an unexpected error occurs.
    */
   private int describeTable(Hive db, descTableDesc descTbl)
-      throws HiveException {
+  throws HiveException {
     String colPath = descTbl.getTableName();
     String tableName = colPath.substring(0,
         colPath.indexOf('.') == -1 ? colPath.length() : colPath.indexOf('.'));

Modified: hadoop/hive/trunk/ql/src/java/org/apache/hadoop/hive/ql/exec/FunctionInfo.java
URL: http://svn.apache.org/viewvc/hadoop/hive/trunk/ql/src/java/org/apache/hadoop/hive/ql/exec/FunctionInfo.java?rev=896744&r1=896743&r2=896744&view=diff
==============================================================================
--- hadoop/hive/trunk/ql/src/java/org/apache/hadoop/hive/ql/exec/FunctionInfo.java (original)
+++ hadoop/hive/trunk/ql/src/java/org/apache/hadoop/hive/ql/exec/FunctionInfo.java Thu Jan  7 03:01:26 2010
@@ -18,8 +18,10 @@
 
 package org.apache.hadoop.hive.ql.exec;
 
+import org.apache.hadoop.hive.ql.udf.generic.GenericUDAFBridge;
 import org.apache.hadoop.hive.ql.udf.generic.GenericUDAFResolver;
 import org.apache.hadoop.hive.ql.udf.generic.GenericUDF;
+import org.apache.hadoop.hive.ql.udf.generic.GenericUDFBridge;
 import org.apache.hadoop.hive.ql.udf.generic.GenericUDTF;
 
 public class FunctionInfo {
@@ -28,11 +30,11 @@
 
   private String displayName;
 
-  private GenericUDF genericUDF = null;
+  private GenericUDF genericUDF;
 
-  private GenericUDTF genericUDTF = null;
+  private GenericUDTF genericUDTF;
   
-  private GenericUDAFResolver genericUDAFResolver = null;
+  private GenericUDAFResolver genericUDAFResolver;
   
   public FunctionInfo(boolean isNative, String displayName, GenericUDF genericUDF) {
     this.isNative = isNative;
@@ -57,6 +59,9 @@
    */
   public GenericUDF getGenericUDF() {
     // GenericUDF is stateful - we have to make a copy here
+    if (genericUDF == null) {
+      return null;
+    }
     return FunctionRegistry.cloneGenericUDF(genericUDF);
   }
   
@@ -65,8 +70,9 @@
    */
   public GenericUDTF getGenericUDTF() {
     // GenericUDTF is stateful too, copy
-    if (genericUDTF == null)
+    if (genericUDTF == null) {
       return null;
+    }
     return FunctionRegistry.cloneGenericUDTF(genericUDTF);
   }
   
@@ -78,6 +84,28 @@
   }
   
   /**
+   * Get the Class of the UDF
+   */
+  public Class<?> getFunctionClass() {
+    if (isGenericUDF()) {
+      if (genericUDF instanceof GenericUDFBridge) {
+        return ((GenericUDFBridge)genericUDF).getUdfClass();
+      } else {
+        return genericUDF.getClass();
+      }
+    } else if (isGenericUDAF()) {
+      if (genericUDAFResolver instanceof GenericUDAFBridge) {
+        return ((GenericUDAFBridge)genericUDAFResolver).getUDAFClass();
+      } else {
+        return genericUDAFResolver.getClass();
+      }
+    } else if (isGenericUDTF()) {
+      return genericUDTF.getClass();
+    }
+    return null;
+  }
+  
+  /**
    * Get the display name for this function.
    * This should be transfered into exprNodeGenericUDFDesc, and will be 
    * used as the first parameter to GenericUDF.getDisplayName() call, instead
@@ -94,4 +122,25 @@
   public boolean isNative() {
     return isNative;
   }
+  
+  /**
+   * @return TRUE if the function is a GenericUDF
+   */
+  public boolean isGenericUDF() {
+    return null != genericUDF;
+  }
+  
+  /**
+   * @return TRUE if the function is a GenericUDAF
+   */
+  public boolean isGenericUDAF() {
+    return null != genericUDAFResolver;
+  }
+  
+  /**
+   * @return TRUE if the function is a GenericUDTF
+   */
+  public boolean isGenericUDTF() {
+    return null != genericUDTF;
+  }
 }

Modified: hadoop/hive/trunk/ql/src/java/org/apache/hadoop/hive/ql/exec/FunctionRegistry.java
URL: http://svn.apache.org/viewvc/hadoop/hive/trunk/ql/src/java/org/apache/hadoop/hive/ql/exec/FunctionRegistry.java?rev=896744&r1=896743&r2=896744&view=diff
==============================================================================
--- hadoop/hive/trunk/ql/src/java/org/apache/hadoop/hive/ql/exec/FunctionRegistry.java (original)
+++ hadoop/hive/trunk/ql/src/java/org/apache/hadoop/hive/ql/exec/FunctionRegistry.java Thu Jan  7 03:01:26 2010
@@ -56,9 +56,8 @@
   /**
    * The mapping from expression function names to expression classes.
    */
-  static LinkedHashMap<String, FunctionInfo> mFunctions;
+  static Map<String, FunctionInfo> mFunctions = new LinkedHashMap<String, FunctionInfo>();
   static {
-    mFunctions = new LinkedHashMap<String, FunctionInfo>();
     registerUDF("concat", UDFConcat.class, false);
     registerUDF("substr", UDFSubstr.class, false);
     registerUDF("substring", UDFSubstr.class, false);
@@ -641,19 +640,26 @@
    * Create a copy of an existing GenericUDF.
    */
   public static GenericUDF cloneGenericUDF(GenericUDF genericUDF) {
+    if (null == genericUDF) {
+      return null;
+    }
+    
     if (genericUDF instanceof GenericUDFBridge) {
       GenericUDFBridge bridge = (GenericUDFBridge)genericUDF;
       return new GenericUDFBridge(bridge.getUdfName(), bridge.isOperator(), bridge.getUdfClass());
-    } else {
-      return (GenericUDF)ReflectionUtils.newInstance(genericUDF.getClass(), null);
     }
+    
+    return (GenericUDF)ReflectionUtils.newInstance(genericUDF.getClass(), null);
   }
 
   /**
    * Create a copy of an existing GenericUDTF.
    */
   public static GenericUDTF cloneGenericUDTF(GenericUDTF genericUDTF) {
-      return (GenericUDTF)ReflectionUtils.newInstance(genericUDTF.getClass(), null);
+    if (null == genericUDTF) {
+      return null;
+    }
+    return (GenericUDTF)ReflectionUtils.newInstance(genericUDTF.getClass(), null);
   }
   
   /**

Modified: hadoop/hive/trunk/ql/src/java/org/apache/hadoop/hive/ql/exec/UDAF.java
URL: http://svn.apache.org/viewvc/hadoop/hive/trunk/ql/src/java/org/apache/hadoop/hive/ql/exec/UDAF.java?rev=896744&r1=896743&r2=896744&view=diff
==============================================================================
--- hadoop/hive/trunk/ql/src/java/org/apache/hadoop/hive/ql/exec/UDAF.java (original)
+++ hadoop/hive/trunk/ql/src/java/org/apache/hadoop/hive/ql/exec/UDAF.java Thu Jan  7 03:01:26 2010
@@ -17,6 +17,8 @@
  */
 
 package org.apache.hadoop.hive.ql.exec;
+
+import org.apache.hadoop.hive.ql.udf.UDFType;
 //import org.apache.hadoop.hive.serde.ReflectionSerDe;
 
 /**

Modified: hadoop/hive/trunk/ql/src/java/org/apache/hadoop/hive/ql/udf/UDAFMax.java
URL: http://svn.apache.org/viewvc/hadoop/hive/trunk/ql/src/java/org/apache/hadoop/hive/ql/udf/UDAFMax.java?rev=896744&r1=896743&r2=896744&view=diff
==============================================================================
--- hadoop/hive/trunk/ql/src/java/org/apache/hadoop/hive/ql/udf/UDAFMax.java (original)
+++ hadoop/hive/trunk/ql/src/java/org/apache/hadoop/hive/ql/udf/UDAFMax.java Thu Jan  7 03:01:26 2010
@@ -20,6 +20,7 @@
 
 import org.apache.hadoop.hive.ql.exec.UDAF;
 import org.apache.hadoop.hive.ql.exec.UDAFEvaluator;
+import org.apache.hadoop.hive.ql.exec.description;
 import org.apache.hadoop.hive.serde2.io.DoubleWritable;
 import org.apache.hadoop.hive.serde2.io.ShortWritable;
 import org.apache.hadoop.hive.shims.ShimLoader;
@@ -29,7 +30,10 @@
 import org.apache.hadoop.io.Text;
 
 
-
+@description(
+    name = "max",
+    value = "_FUNC_(expr) - Returns the maximum value of expr"
+    )
 public class UDAFMax extends UDAF {
 
   static public class MaxShortEvaluator implements UDAFEvaluator {

Modified: hadoop/hive/trunk/ql/src/java/org/apache/hadoop/hive/ql/udf/UDAFMin.java
URL: http://svn.apache.org/viewvc/hadoop/hive/trunk/ql/src/java/org/apache/hadoop/hive/ql/udf/UDAFMin.java?rev=896744&r1=896743&r2=896744&view=diff
==============================================================================
--- hadoop/hive/trunk/ql/src/java/org/apache/hadoop/hive/ql/udf/UDAFMin.java (original)
+++ hadoop/hive/trunk/ql/src/java/org/apache/hadoop/hive/ql/udf/UDAFMin.java Thu Jan  7 03:01:26 2010
@@ -20,6 +20,7 @@
 
 import org.apache.hadoop.hive.ql.exec.UDAF;
 import org.apache.hadoop.hive.ql.exec.UDAFEvaluator;
+import org.apache.hadoop.hive.ql.exec.description;
 import org.apache.hadoop.hive.serde2.io.DoubleWritable;
 import org.apache.hadoop.hive.serde2.io.ShortWritable;
 import org.apache.hadoop.hive.shims.ShimLoader;
@@ -28,7 +29,10 @@
 import org.apache.hadoop.io.LongWritable;
 import org.apache.hadoop.io.Text;
 
-
+@description(
+    name = "min",
+    value = "_FUNC_(expr) - Returns the minimum value of expr"
+    )
 public class UDAFMin extends UDAF {
 
   static public class MinShortEvaluator implements UDAFEvaluator {

Modified: hadoop/hive/trunk/ql/src/java/org/apache/hadoop/hive/ql/udf/generic/GenericUDAFBridge.java
URL: http://svn.apache.org/viewvc/hadoop/hive/trunk/ql/src/java/org/apache/hadoop/hive/ql/udf/generic/GenericUDAFBridge.java?rev=896744&r1=896743&r2=896744&view=diff
==============================================================================
--- hadoop/hive/trunk/ql/src/java/org/apache/hadoop/hive/ql/udf/generic/GenericUDAFBridge.java (original)
+++ hadoop/hive/trunk/ql/src/java/org/apache/hadoop/hive/ql/udf/generic/GenericUDAFBridge.java Thu Jan  7 03:01:26 2010
@@ -27,16 +27,12 @@
 import org.apache.hadoop.hive.ql.exec.UDAFEvaluator;
 import org.apache.hadoop.hive.ql.metadata.HiveException;
 import org.apache.hadoop.hive.ql.parse.SemanticException;
-import org.apache.hadoop.hive.ql.udf.generic.GenericUDAFEvaluator.Mode;
 import org.apache.hadoop.hive.ql.udf.generic.GenericUDFUtils.ConversionHelper;
 import org.apache.hadoop.hive.serde2.objectinspector.ObjectInspector;
 import org.apache.hadoop.hive.serde2.objectinspector.ObjectInspectorFactory;
 import org.apache.hadoop.hive.serde2.objectinspector.ObjectInspectorFactory.ObjectInspectorOptions;
-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;
 import org.apache.hadoop.util.ReflectionUtils;
-import org.apache.hadoop.io.Writable;
 
 /**
  * This class is a bridge between GenericUDAF and UDAF.
@@ -51,6 +47,10 @@
     this.udaf = udaf;
   }
   
+  public Class<? extends UDAF> getUDAFClass() {
+    return udaf.getClass();
+  }
+  
   @Override
   public GenericUDAFEvaluator getEvaluator(
       TypeInfo[] parameters) throws SemanticException {

Added: hadoop/hive/trunk/ql/src/test/queries/clientpositive/udaf_avg.q
URL: http://svn.apache.org/viewvc/hadoop/hive/trunk/ql/src/test/queries/clientpositive/udaf_avg.q?rev=896744&view=auto
==============================================================================
--- hadoop/hive/trunk/ql/src/test/queries/clientpositive/udaf_avg.q (added)
+++ hadoop/hive/trunk/ql/src/test/queries/clientpositive/udaf_avg.q Thu Jan  7 03:01:26 2010
@@ -0,0 +1,4 @@
+DESCRIBE FUNCTION avg;
+DESCRIBE FUNCTION EXTENDED avg;
+DESCRIBE FUNCTION avg;
+DESCRIBE FUNCTION EXTENDED avg;

Added: hadoop/hive/trunk/ql/src/test/queries/clientpositive/udaf_count.q
URL: http://svn.apache.org/viewvc/hadoop/hive/trunk/ql/src/test/queries/clientpositive/udaf_count.q?rev=896744&view=auto
==============================================================================
--- hadoop/hive/trunk/ql/src/test/queries/clientpositive/udaf_count.q (added)
+++ hadoop/hive/trunk/ql/src/test/queries/clientpositive/udaf_count.q Thu Jan  7 03:01:26 2010
@@ -0,0 +1,4 @@
+DESCRIBE FUNCTION count;
+DESCRIBE FUNCTION EXTENDED count;
+DESCRIBE FUNCTION count;
+DESCRIBE FUNCTION EXTENDED count;

Added: hadoop/hive/trunk/ql/src/test/queries/clientpositive/udaf_max.q
URL: http://svn.apache.org/viewvc/hadoop/hive/trunk/ql/src/test/queries/clientpositive/udaf_max.q?rev=896744&view=auto
==============================================================================
--- hadoop/hive/trunk/ql/src/test/queries/clientpositive/udaf_max.q (added)
+++ hadoop/hive/trunk/ql/src/test/queries/clientpositive/udaf_max.q Thu Jan  7 03:01:26 2010
@@ -0,0 +1,4 @@
+DESCRIBE FUNCTION max;
+DESCRIBE FUNCTION EXTENDED max;
+DESCRIBE FUNCTION max;
+DESCRIBE FUNCTION EXTENDED max;

Added: hadoop/hive/trunk/ql/src/test/queries/clientpositive/udaf_min.q
URL: http://svn.apache.org/viewvc/hadoop/hive/trunk/ql/src/test/queries/clientpositive/udaf_min.q?rev=896744&view=auto
==============================================================================
--- hadoop/hive/trunk/ql/src/test/queries/clientpositive/udaf_min.q (added)
+++ hadoop/hive/trunk/ql/src/test/queries/clientpositive/udaf_min.q Thu Jan  7 03:01:26 2010
@@ -0,0 +1,4 @@
+DESCRIBE FUNCTION min;
+DESCRIBE FUNCTION EXTENDED min;
+DESCRIBE FUNCTION min;
+DESCRIBE FUNCTION EXTENDED min;

Modified: hadoop/hive/trunk/ql/src/test/queries/clientpositive/udaf_number_format.q
URL: http://svn.apache.org/viewvc/hadoop/hive/trunk/ql/src/test/queries/clientpositive/udaf_number_format.q?rev=896744&r1=896743&r2=896744&view=diff
==============================================================================
--- hadoop/hive/trunk/ql/src/test/queries/clientpositive/udaf_number_format.q (original)
+++ hadoop/hive/trunk/ql/src/test/queries/clientpositive/udaf_number_format.q Thu Jan  7 03:01:26 2010
@@ -1,3 +1,4 @@
+
 EXPLAIN SELECT
   sum('a'),
   avg('a'),

Added: hadoop/hive/trunk/ql/src/test/queries/clientpositive/udaf_std.q
URL: http://svn.apache.org/viewvc/hadoop/hive/trunk/ql/src/test/queries/clientpositive/udaf_std.q?rev=896744&view=auto
==============================================================================
--- hadoop/hive/trunk/ql/src/test/queries/clientpositive/udaf_std.q (added)
+++ hadoop/hive/trunk/ql/src/test/queries/clientpositive/udaf_std.q Thu Jan  7 03:01:26 2010
@@ -0,0 +1,16 @@
+DESCRIBE FUNCTION std;
+DESCRIBE FUNCTION EXTENDED std;
+
+DESCRIBE FUNCTION stddev;
+DESCRIBE FUNCTION EXTENDED stddev;
+
+DESCRIBE FUNCTION stddev_pop;
+DESCRIBE FUNCTION EXTENDED stddev_pop;
+DESCRIBE FUNCTION std;
+DESCRIBE FUNCTION EXTENDED std;
+
+DESCRIBE FUNCTION stddev;
+DESCRIBE FUNCTION EXTENDED stddev;
+
+DESCRIBE FUNCTION stddev_pop;
+DESCRIBE FUNCTION EXTENDED stddev_pop;

Added: hadoop/hive/trunk/ql/src/test/queries/clientpositive/udaf_stddev_samp.q
URL: http://svn.apache.org/viewvc/hadoop/hive/trunk/ql/src/test/queries/clientpositive/udaf_stddev_samp.q?rev=896744&view=auto
==============================================================================
--- hadoop/hive/trunk/ql/src/test/queries/clientpositive/udaf_stddev_samp.q (added)
+++ hadoop/hive/trunk/ql/src/test/queries/clientpositive/udaf_stddev_samp.q Thu Jan  7 03:01:26 2010
@@ -0,0 +1,4 @@
+DESCRIBE FUNCTION stddev_samp;
+DESCRIBE FUNCTION EXTENDED stddev_samp;
+DESCRIBE FUNCTION stddev_samp;
+DESCRIBE FUNCTION EXTENDED stddev_samp;

Added: hadoop/hive/trunk/ql/src/test/queries/clientpositive/udaf_sum.q
URL: http://svn.apache.org/viewvc/hadoop/hive/trunk/ql/src/test/queries/clientpositive/udaf_sum.q?rev=896744&view=auto
==============================================================================
--- hadoop/hive/trunk/ql/src/test/queries/clientpositive/udaf_sum.q (added)
+++ hadoop/hive/trunk/ql/src/test/queries/clientpositive/udaf_sum.q Thu Jan  7 03:01:26 2010
@@ -0,0 +1,6 @@
+DESCRIBE FUNCTION sum;
+DESCRIBE FUNCTION EXTENDED sum;
+
+DESCRIBE FUNCTION sum;
+DESCRIBE FUNCTION EXTENDED sum;
+

Added: hadoop/hive/trunk/ql/src/test/queries/clientpositive/udaf_var_samp.q
URL: http://svn.apache.org/viewvc/hadoop/hive/trunk/ql/src/test/queries/clientpositive/udaf_var_samp.q?rev=896744&view=auto
==============================================================================
--- hadoop/hive/trunk/ql/src/test/queries/clientpositive/udaf_var_samp.q (added)
+++ hadoop/hive/trunk/ql/src/test/queries/clientpositive/udaf_var_samp.q Thu Jan  7 03:01:26 2010
@@ -0,0 +1,4 @@
+DESCRIBE FUNCTION var_samp;
+DESCRIBE FUNCTION EXTENDED var_samp;
+DESCRIBE FUNCTION var_samp;
+DESCRIBE FUNCTION EXTENDED var_samp;

Added: hadoop/hive/trunk/ql/src/test/queries/clientpositive/udaf_variance.q
URL: http://svn.apache.org/viewvc/hadoop/hive/trunk/ql/src/test/queries/clientpositive/udaf_variance.q?rev=896744&view=auto
==============================================================================
--- hadoop/hive/trunk/ql/src/test/queries/clientpositive/udaf_variance.q (added)
+++ hadoop/hive/trunk/ql/src/test/queries/clientpositive/udaf_variance.q Thu Jan  7 03:01:26 2010
@@ -0,0 +1,10 @@
+DESCRIBE FUNCTION variance;
+DESCRIBE FUNCTION EXTENDED variance;
+
+DESCRIBE FUNCTION var_pop;
+DESCRIBE FUNCTION EXTENDED var_pop;
+DESCRIBE FUNCTION variance;
+DESCRIBE FUNCTION EXTENDED variance;
+
+DESCRIBE FUNCTION var_pop;
+DESCRIBE FUNCTION EXTENDED var_pop;

Modified: hadoop/hive/trunk/ql/src/test/queries/clientpositive/udf_abs.q
URL: http://svn.apache.org/viewvc/hadoop/hive/trunk/ql/src/test/queries/clientpositive/udf_abs.q?rev=896744&r1=896743&r2=896744&view=diff
==============================================================================
--- hadoop/hive/trunk/ql/src/test/queries/clientpositive/udf_abs.q (original)
+++ hadoop/hive/trunk/ql/src/test/queries/clientpositive/udf_abs.q Thu Jan  7 03:01:26 2010
@@ -1,3 +1,6 @@
+DESCRIBE FUNCTION abs;
+DESCRIBE FUNCTION EXTENDED abs;
+
 EXPLAIN SELECT
   abs(0),
   abs(-1),

Modified: hadoop/hive/trunk/ql/src/test/queries/clientpositive/udf_acos.q
URL: http://svn.apache.org/viewvc/hadoop/hive/trunk/ql/src/test/queries/clientpositive/udf_acos.q?rev=896744&r1=896743&r2=896744&view=diff
==============================================================================
--- hadoop/hive/trunk/ql/src/test/queries/clientpositive/udf_acos.q (original)
+++ hadoop/hive/trunk/ql/src/test/queries/clientpositive/udf_acos.q Thu Jan  7 03:01:26 2010
@@ -1,3 +1,6 @@
+DESCRIBE FUNCTION acos;
+DESCRIBE FUNCTION EXTENDED acos;
+
 SELECT acos(null)
 FROM src LIMIT 1;
 

Modified: hadoop/hive/trunk/ql/src/test/queries/clientpositive/udf_array.q
URL: http://svn.apache.org/viewvc/hadoop/hive/trunk/ql/src/test/queries/clientpositive/udf_array.q?rev=896744&r1=896743&r2=896744&view=diff
==============================================================================
--- hadoop/hive/trunk/ql/src/test/queries/clientpositive/udf_array.q (original)
+++ hadoop/hive/trunk/ql/src/test/queries/clientpositive/udf_array.q Thu Jan  7 03:01:26 2010
@@ -1,3 +1,7 @@
+-- Parsing bug requires us to quote array
+DESCRIBE FUNCTION 'array';
+DESCRIBE FUNCTION EXTENDED 'array';
+
 EXPLAIN SELECT array(), array()[1], array(1, 2, 3), array(1, 2, 3)[2], array(1,"a", 2, 3), array(1,"a", 2, 3)[2],
 array(array(1), array(2), array(3), array(4))[1][0] FROM src LIMIT 1;
 

Modified: hadoop/hive/trunk/ql/src/test/queries/clientpositive/udf_ascii.q
URL: http://svn.apache.org/viewvc/hadoop/hive/trunk/ql/src/test/queries/clientpositive/udf_ascii.q?rev=896744&r1=896743&r2=896744&view=diff
==============================================================================
--- hadoop/hive/trunk/ql/src/test/queries/clientpositive/udf_ascii.q (original)
+++ hadoop/hive/trunk/ql/src/test/queries/clientpositive/udf_ascii.q Thu Jan  7 03:01:26 2010
@@ -1,3 +1,6 @@
+DESCRIBE FUNCTION ascii;
+DESCRIBE FUNCTION EXTENDED ascii;
+
 EXPLAIN SELECT
   ascii('Facebook'),
   ascii(''),

Modified: hadoop/hive/trunk/ql/src/test/queries/clientpositive/udf_asin.q
URL: http://svn.apache.org/viewvc/hadoop/hive/trunk/ql/src/test/queries/clientpositive/udf_asin.q?rev=896744&r1=896743&r2=896744&view=diff
==============================================================================
--- hadoop/hive/trunk/ql/src/test/queries/clientpositive/udf_asin.q (original)
+++ hadoop/hive/trunk/ql/src/test/queries/clientpositive/udf_asin.q Thu Jan  7 03:01:26 2010
@@ -1,3 +1,6 @@
+DESCRIBE FUNCTION asin;
+DESCRIBE FUNCTION EXTENDED asin;
+
 SELECT asin(null)
 FROM src LIMIT 1;
 

Modified: hadoop/hive/trunk/ql/src/test/queries/clientpositive/udf_bin.q
URL: http://svn.apache.org/viewvc/hadoop/hive/trunk/ql/src/test/queries/clientpositive/udf_bin.q?rev=896744&r1=896743&r2=896744&view=diff
==============================================================================
--- hadoop/hive/trunk/ql/src/test/queries/clientpositive/udf_bin.q (original)
+++ hadoop/hive/trunk/ql/src/test/queries/clientpositive/udf_bin.q Thu Jan  7 03:01:26 2010
@@ -1,3 +1,6 @@
+DESCRIBE FUNCTION bin;
+DESCRIBE FUNCTION EXTENDED bin;
+
 SELECT
   bin(1),
   bin(0),

Modified: hadoop/hive/trunk/ql/src/test/queries/clientpositive/udf_case.q
URL: http://svn.apache.org/viewvc/hadoop/hive/trunk/ql/src/test/queries/clientpositive/udf_case.q?rev=896744&r1=896743&r2=896744&view=diff
==============================================================================
--- hadoop/hive/trunk/ql/src/test/queries/clientpositive/udf_case.q (original)
+++ hadoop/hive/trunk/ql/src/test/queries/clientpositive/udf_case.q Thu Jan  7 03:01:26 2010
@@ -1,3 +1,7 @@
+-- Parsing bug requires us to quote case
+DESCRIBE FUNCTION 'case';
+DESCRIBE FUNCTION EXTENDED 'case';
+
 EXPLAIN
 SELECT CASE 1
         WHEN 1 THEN 2

Modified: hadoop/hive/trunk/ql/src/test/queries/clientpositive/udf_coalesce.q
URL: http://svn.apache.org/viewvc/hadoop/hive/trunk/ql/src/test/queries/clientpositive/udf_coalesce.q?rev=896744&r1=896743&r2=896744&view=diff
==============================================================================
--- hadoop/hive/trunk/ql/src/test/queries/clientpositive/udf_coalesce.q (original)
+++ hadoop/hive/trunk/ql/src/test/queries/clientpositive/udf_coalesce.q Thu Jan  7 03:01:26 2010
@@ -1,3 +1,6 @@
+DESCRIBE FUNCTION coalesce;
+DESCRIBE FUNCTION EXTENDED coalesce;
+
 EXPLAIN
 SELECT COALESCE(1),
        COALESCE(1, 2),

Modified: hadoop/hive/trunk/ql/src/test/queries/clientpositive/udf_concat.q
URL: http://svn.apache.org/viewvc/hadoop/hive/trunk/ql/src/test/queries/clientpositive/udf_concat.q?rev=896744&r1=896743&r2=896744&view=diff
==============================================================================
--- hadoop/hive/trunk/ql/src/test/queries/clientpositive/udf_concat.q (original)
+++ hadoop/hive/trunk/ql/src/test/queries/clientpositive/udf_concat.q Thu Jan  7 03:01:26 2010
@@ -1,5 +1,4 @@
 DESCRIBE FUNCTION concat;
-
 DESCRIBE FUNCTION EXTENDED concat;
 
 SELECT

Modified: hadoop/hive/trunk/ql/src/test/queries/clientpositive/udf_conv.q
URL: http://svn.apache.org/viewvc/hadoop/hive/trunk/ql/src/test/queries/clientpositive/udf_conv.q?rev=896744&r1=896743&r2=896744&view=diff
==============================================================================
--- hadoop/hive/trunk/ql/src/test/queries/clientpositive/udf_conv.q (original)
+++ hadoop/hive/trunk/ql/src/test/queries/clientpositive/udf_conv.q Thu Jan  7 03:01:26 2010
@@ -1,3 +1,6 @@
+DESCRIBE FUNCTION conv;
+DESCRIBE FUNCTION EXTENDED conv;
+
 -- conv must work on both strings and integers up to 64-bit precision
 
 -- Some simple conversions to test different bases

Modified: hadoop/hive/trunk/ql/src/test/queries/clientpositive/udf_cos.q
URL: http://svn.apache.org/viewvc/hadoop/hive/trunk/ql/src/test/queries/clientpositive/udf_cos.q?rev=896744&r1=896743&r2=896744&view=diff
==============================================================================
--- hadoop/hive/trunk/ql/src/test/queries/clientpositive/udf_cos.q (original)
+++ hadoop/hive/trunk/ql/src/test/queries/clientpositive/udf_cos.q Thu Jan  7 03:01:26 2010
@@ -1,3 +1,6 @@
+DESCRIBE FUNCTION cos;
+DESCRIBE FUNCTION EXTENDED cos;
+
 SELECT cos(null)
 FROM src LIMIT 1;
 

Modified: hadoop/hive/trunk/ql/src/test/queries/clientpositive/udf_divider.q
URL: http://svn.apache.org/viewvc/hadoop/hive/trunk/ql/src/test/queries/clientpositive/udf_divider.q?rev=896744&r1=896743&r2=896744&view=diff
==============================================================================
--- hadoop/hive/trunk/ql/src/test/queries/clientpositive/udf_divider.q (original)
+++ hadoop/hive/trunk/ql/src/test/queries/clientpositive/udf_divider.q Thu Jan  7 03:01:26 2010
@@ -1,3 +1,6 @@
+DESCRIBE FUNCTION div;
+DESCRIBE FUNCTION EXTENDED div;
+
 SELECT 3 / 2 FROM SRC LIMIT 1;
 
 SELECT 3 DIV 2 FROM SRC LIMIT 1;

Modified: hadoop/hive/trunk/ql/src/test/queries/clientpositive/udf_elt.q
URL: http://svn.apache.org/viewvc/hadoop/hive/trunk/ql/src/test/queries/clientpositive/udf_elt.q?rev=896744&r1=896743&r2=896744&view=diff
==============================================================================
--- hadoop/hive/trunk/ql/src/test/queries/clientpositive/udf_elt.q (original)
+++ hadoop/hive/trunk/ql/src/test/queries/clientpositive/udf_elt.q Thu Jan  7 03:01:26 2010
@@ -1,3 +1,6 @@
+DESCRIBE FUNCTION elt;
+DESCRIBE FUNCTION EXTENDED elt;
+
 EXPLAIN
 SELECT elt(2, 'abc', 'defg'),
        elt(3, 'aa', 'bb', 'cc', 'dd', 'ee', 'ff', 'gg'),

Modified: hadoop/hive/trunk/ql/src/test/queries/clientpositive/udf_hash.q
URL: http://svn.apache.org/viewvc/hadoop/hive/trunk/ql/src/test/queries/clientpositive/udf_hash.q?rev=896744&r1=896743&r2=896744&view=diff
==============================================================================
--- hadoop/hive/trunk/ql/src/test/queries/clientpositive/udf_hash.q (original)
+++ hadoop/hive/trunk/ql/src/test/queries/clientpositive/udf_hash.q Thu Jan  7 03:01:26 2010
@@ -1,3 +1,6 @@
+DESCRIBE FUNCTION hash;
+DESCRIBE FUNCTION EXTENDED hash;
+
 EXPLAIN
 SELECT hash(CAST(1 AS TINYINT)), hash(CAST(2 AS SMALLINT)),
        hash(3), hash(CAST('123456789012' AS BIGINT)),

Modified: hadoop/hive/trunk/ql/src/test/queries/clientpositive/udf_hex.q
URL: http://svn.apache.org/viewvc/hadoop/hive/trunk/ql/src/test/queries/clientpositive/udf_hex.q?rev=896744&r1=896743&r2=896744&view=diff
==============================================================================
--- hadoop/hive/trunk/ql/src/test/queries/clientpositive/udf_hex.q (original)
+++ hadoop/hive/trunk/ql/src/test/queries/clientpositive/udf_hex.q Thu Jan  7 03:01:26 2010
@@ -1,3 +1,6 @@
+DESCRIBE FUNCTION hex;
+DESCRIBE FUNCTION EXTENDED hex;
+
 -- If the argument is a string, hex should return a string containing two hex
 -- digits for every character in the input.
 SELECT

Modified: hadoop/hive/trunk/ql/src/test/queries/clientpositive/udf_if.q
URL: http://svn.apache.org/viewvc/hadoop/hive/trunk/ql/src/test/queries/clientpositive/udf_if.q?rev=896744&r1=896743&r2=896744&view=diff
==============================================================================
--- hadoop/hive/trunk/ql/src/test/queries/clientpositive/udf_if.q (original)
+++ hadoop/hive/trunk/ql/src/test/queries/clientpositive/udf_if.q Thu Jan  7 03:01:26 2010
@@ -1,3 +1,6 @@
+DESCRIBE FUNCTION if;
+DESCRIBE FUNCTION EXTENDED if;
+
 EXPLAIN
 SELECT IF(TRUE, 1, 2) AS COL1,
        IF(FALSE, CAST(NULL AS STRING), CAST(1 AS STRING)) AS COL2,

Modified: hadoop/hive/trunk/ql/src/test/queries/clientpositive/udf_instr.q
URL: http://svn.apache.org/viewvc/hadoop/hive/trunk/ql/src/test/queries/clientpositive/udf_instr.q?rev=896744&r1=896743&r2=896744&view=diff
==============================================================================
--- hadoop/hive/trunk/ql/src/test/queries/clientpositive/udf_instr.q (original)
+++ hadoop/hive/trunk/ql/src/test/queries/clientpositive/udf_instr.q Thu Jan  7 03:01:26 2010
@@ -1,3 +1,6 @@
+DESCRIBE FUNCTION instr;
+DESCRIBE FUNCTION EXTENDED instr;
+
 EXPLAIN
 SELECT instr('abcd', 'abc'),
        instr('abcabc', 'ccc'),

Modified: hadoop/hive/trunk/ql/src/test/queries/clientpositive/udf_isnull_isnotnull.q
URL: http://svn.apache.org/viewvc/hadoop/hive/trunk/ql/src/test/queries/clientpositive/udf_isnull_isnotnull.q?rev=896744&r1=896743&r2=896744&view=diff
==============================================================================
--- hadoop/hive/trunk/ql/src/test/queries/clientpositive/udf_isnull_isnotnull.q (original)
+++ hadoop/hive/trunk/ql/src/test/queries/clientpositive/udf_isnull_isnotnull.q Thu Jan  7 03:01:26 2010
@@ -1,3 +1,10 @@
+DESCRIBE FUNCTION isnull;
+DESCRIBE FUNCTION EXTENDED isnull;
+
+DESCRIBE FUNCTION isnotnull;
+DESCRIBE FUNCTION EXTENDED isnotnull;
+
+
 EXPLAIN
 SELECT NULL IS NULL,
        1 IS NOT NULL, 

Modified: hadoop/hive/trunk/ql/src/test/queries/clientpositive/udf_json.q
URL: http://svn.apache.org/viewvc/hadoop/hive/trunk/ql/src/test/queries/clientpositive/udf_json.q?rev=896744&r1=896743&r2=896744&view=diff
==============================================================================
--- hadoop/hive/trunk/ql/src/test/queries/clientpositive/udf_json.q (original)
+++ hadoop/hive/trunk/ql/src/test/queries/clientpositive/udf_json.q Thu Jan  7 03:01:26 2010
@@ -1,3 +1,6 @@
+DESCRIBE FUNCTION get_json_object;
+DESCRIBE FUNCTION EXTENDED get_json_object;
+
 CREATE TABLE dest1(c1 STRING) STORED AS TEXTFILE;
 
 FROM src INSERT OVERWRITE TABLE dest1 SELECT '  abc  ' WHERE src.key = 86;

Modified: hadoop/hive/trunk/ql/src/test/queries/clientpositive/udf_length.q
URL: http://svn.apache.org/viewvc/hadoop/hive/trunk/ql/src/test/queries/clientpositive/udf_length.q?rev=896744&r1=896743&r2=896744&view=diff
==============================================================================
--- hadoop/hive/trunk/ql/src/test/queries/clientpositive/udf_length.q (original)
+++ hadoop/hive/trunk/ql/src/test/queries/clientpositive/udf_length.q Thu Jan  7 03:01:26 2010
@@ -1,3 +1,6 @@
+DESCRIBE FUNCTION length;
+DESCRIBE FUNCTION EXTENDED length;
+
 CREATE TABLE dest1(len INT);
 EXPLAIN FROM src1 INSERT OVERWRITE TABLE dest1 SELECT length(src1.value);
 FROM src1 INSERT OVERWRITE TABLE dest1 SELECT length(src1.value);

Modified: hadoop/hive/trunk/ql/src/test/queries/clientpositive/udf_like.q
URL: http://svn.apache.org/viewvc/hadoop/hive/trunk/ql/src/test/queries/clientpositive/udf_like.q?rev=896744&r1=896743&r2=896744&view=diff
==============================================================================
--- hadoop/hive/trunk/ql/src/test/queries/clientpositive/udf_like.q (original)
+++ hadoop/hive/trunk/ql/src/test/queries/clientpositive/udf_like.q Thu Jan  7 03:01:26 2010
@@ -1,3 +1,6 @@
+DESCRIBE FUNCTION like;
+DESCRIBE FUNCTION EXTENDED like;
+
 EXPLAIN
 SELECT '_%_' LIKE '%\_\%\_%', '__' LIKE '%\_\%\_%', '%%_%_' LIKE '%\_\%\_%', '%_%_%' LIKE '%\%\_\%',
   '_%_' LIKE '\%\_%', '%__' LIKE '__\%%', '_%' LIKE '\_\%\_\%%', '_%' LIKE '\_\%_%',

Modified: hadoop/hive/trunk/ql/src/test/queries/clientpositive/udf_locate.q
URL: http://svn.apache.org/viewvc/hadoop/hive/trunk/ql/src/test/queries/clientpositive/udf_locate.q?rev=896744&r1=896743&r2=896744&view=diff
==============================================================================
--- hadoop/hive/trunk/ql/src/test/queries/clientpositive/udf_locate.q (original)
+++ hadoop/hive/trunk/ql/src/test/queries/clientpositive/udf_locate.q Thu Jan  7 03:01:26 2010
@@ -1,3 +1,6 @@
+DESCRIBE FUNCTION locate;
+DESCRIBE FUNCTION EXTENDED locate;
+
 EXPLAIN
 SELECT locate('abc', 'abcd'),
        locate('ccc', 'abcabc'),

Modified: hadoop/hive/trunk/ql/src/test/queries/clientpositive/udf_lower.q
URL: http://svn.apache.org/viewvc/hadoop/hive/trunk/ql/src/test/queries/clientpositive/udf_lower.q?rev=896744&r1=896743&r2=896744&view=diff
==============================================================================
--- hadoop/hive/trunk/ql/src/test/queries/clientpositive/udf_lower.q (original)
+++ hadoop/hive/trunk/ql/src/test/queries/clientpositive/udf_lower.q Thu Jan  7 03:01:26 2010
@@ -1,3 +1,5 @@
+DESCRIBE FUNCTION lower;
+DESCRIBE FUNCTION EXTENDED lower;
 
 EXPLAIN
 SELECT lower('AbC 123'), upper('AbC 123') FROM src WHERE key = 86;

Modified: hadoop/hive/trunk/ql/src/test/queries/clientpositive/udf_lpad_rpad.q
URL: http://svn.apache.org/viewvc/hadoop/hive/trunk/ql/src/test/queries/clientpositive/udf_lpad_rpad.q?rev=896744&r1=896743&r2=896744&view=diff
==============================================================================
--- hadoop/hive/trunk/ql/src/test/queries/clientpositive/udf_lpad_rpad.q (original)
+++ hadoop/hive/trunk/ql/src/test/queries/clientpositive/udf_lpad_rpad.q Thu Jan  7 03:01:26 2010
@@ -1,3 +1,9 @@
+DESCRIBE FUNCTION lpad;
+DESCRIBE FUNCTION EXTENDED lpad;
+
+DESCRIBE FUNCTION rpad;
+DESCRIBE FUNCTION EXTENDED rpad;
+
 EXPLAIN SELECT
   lpad('hi', 1, '?'),
   lpad('hi', 5, '.'),

Modified: hadoop/hive/trunk/ql/src/test/queries/clientpositive/udf_map.q
URL: http://svn.apache.org/viewvc/hadoop/hive/trunk/ql/src/test/queries/clientpositive/udf_map.q?rev=896744&r1=896743&r2=896744&view=diff
==============================================================================
--- hadoop/hive/trunk/ql/src/test/queries/clientpositive/udf_map.q (original)
+++ hadoop/hive/trunk/ql/src/test/queries/clientpositive/udf_map.q Thu Jan  7 03:01:26 2010
@@ -1,3 +1,7 @@
+-- Parsing bug requires us to quote map
+DESCRIBE FUNCTION 'map';
+DESCRIBE FUNCTION EXTENDED 'map';
+
 EXPLAIN SELECT map(), map(1, "a", 2, "b", 3, "c"), map(1, 2, "a", "b"), 
 map(1, "a", 2, "b", 3, "c")[2],  map(1, 2, "a", "b")["a"], map(1, array("a"))[1][0] FROM src LIMIT 1;
 

Modified: hadoop/hive/trunk/ql/src/test/queries/clientpositive/udf_negative.q
URL: http://svn.apache.org/viewvc/hadoop/hive/trunk/ql/src/test/queries/clientpositive/udf_negative.q?rev=896744&r1=896743&r2=896744&view=diff
==============================================================================
--- hadoop/hive/trunk/ql/src/test/queries/clientpositive/udf_negative.q (original)
+++ hadoop/hive/trunk/ql/src/test/queries/clientpositive/udf_negative.q Thu Jan  7 03:01:26 2010
@@ -1,3 +1,6 @@
+DESCRIBE FUNCTION negative;
+DESCRIBE FUNCTION EXTENDED negative;
+
 select - null from src limit 1;
 select - cast(null as int) from src limit 1;
 select - cast(null as smallint) from src limit 1;

Modified: hadoop/hive/trunk/ql/src/test/queries/clientpositive/udf_parse_url.q
URL: http://svn.apache.org/viewvc/hadoop/hive/trunk/ql/src/test/queries/clientpositive/udf_parse_url.q?rev=896744&r1=896743&r2=896744&view=diff
==============================================================================
--- hadoop/hive/trunk/ql/src/test/queries/clientpositive/udf_parse_url.q (original)
+++ hadoop/hive/trunk/ql/src/test/queries/clientpositive/udf_parse_url.q Thu Jan  7 03:01:26 2010
@@ -1,3 +1,6 @@
+DESCRIBE FUNCTION parse_url;
+DESCRIBE FUNCTION EXTENDED parse_url;
+
 EXPLAIN
 SELECT parse_url('http://facebook.com/path1/p.php?k1=v1&k2=v2#Ref1', 'HOST'), 
 parse_url('http://facebook.com/path1/p.php?k1=v1&k2=v2#Ref1', 'PATH'), 

Modified: hadoop/hive/trunk/ql/src/test/queries/clientpositive/udf_pmod.q
URL: http://svn.apache.org/viewvc/hadoop/hive/trunk/ql/src/test/queries/clientpositive/udf_pmod.q?rev=896744&r1=896743&r2=896744&view=diff
==============================================================================
--- hadoop/hive/trunk/ql/src/test/queries/clientpositive/udf_pmod.q (original)
+++ hadoop/hive/trunk/ql/src/test/queries/clientpositive/udf_pmod.q Thu Jan  7 03:01:26 2010
@@ -1,3 +1,6 @@
+DESCRIBE FUNCTION pmod;
+DESCRIBE FUNCTION EXTENDED pmod;
+
 SELECT pmod(null, null)
 FROM src LIMIT 1;
 

Modified: hadoop/hive/trunk/ql/src/test/queries/clientpositive/udf_regexp.q
URL: http://svn.apache.org/viewvc/hadoop/hive/trunk/ql/src/test/queries/clientpositive/udf_regexp.q?rev=896744&r1=896743&r2=896744&view=diff
==============================================================================
--- hadoop/hive/trunk/ql/src/test/queries/clientpositive/udf_regexp.q (original)
+++ hadoop/hive/trunk/ql/src/test/queries/clientpositive/udf_regexp.q Thu Jan  7 03:01:26 2010
@@ -1,5 +1,4 @@
 DESCRIBE FUNCTION regexp;
-
 DESCRIBE FUNCTION EXTENDED regexp;
 
 SELECT 'fofo' REGEXP '^fo', 'fo\no' REGEXP '^fo\no$', 'Bn' REGEXP '^Ba*n', 'afofo' REGEXP 'fo',

Modified: hadoop/hive/trunk/ql/src/test/queries/clientpositive/udf_repeat.q
URL: http://svn.apache.org/viewvc/hadoop/hive/trunk/ql/src/test/queries/clientpositive/udf_repeat.q?rev=896744&r1=896743&r2=896744&view=diff
==============================================================================
--- hadoop/hive/trunk/ql/src/test/queries/clientpositive/udf_repeat.q (original)
+++ hadoop/hive/trunk/ql/src/test/queries/clientpositive/udf_repeat.q Thu Jan  7 03:01:26 2010
@@ -1,3 +1,6 @@
+DESCRIBE FUNCTION repeat;
+DESCRIBE FUNCTION EXTENDED repeat;
+
 EXPLAIN SELECT
   repeat("Facebook", 3),
   repeat("", 4),

Modified: hadoop/hive/trunk/ql/src/test/queries/clientpositive/udf_reverse.q
URL: http://svn.apache.org/viewvc/hadoop/hive/trunk/ql/src/test/queries/clientpositive/udf_reverse.q?rev=896744&r1=896743&r2=896744&view=diff
==============================================================================
--- hadoop/hive/trunk/ql/src/test/queries/clientpositive/udf_reverse.q (original)
+++ hadoop/hive/trunk/ql/src/test/queries/clientpositive/udf_reverse.q Thu Jan  7 03:01:26 2010
@@ -1,3 +1,6 @@
+DESCRIBE FUNCTION reverse;
+DESCRIBE FUNCTION EXTENDED reverse;
+
 CREATE TABLE dest1(len STRING);
 EXPLAIN FROM src1 INSERT OVERWRITE TABLE dest1 SELECT reverse(src1.value);
 FROM src1 INSERT OVERWRITE TABLE dest1 SELECT reverse(src1.value);

Modified: hadoop/hive/trunk/ql/src/test/queries/clientpositive/udf_round.q
URL: http://svn.apache.org/viewvc/hadoop/hive/trunk/ql/src/test/queries/clientpositive/udf_round.q?rev=896744&r1=896743&r2=896744&view=diff
==============================================================================
--- hadoop/hive/trunk/ql/src/test/queries/clientpositive/udf_round.q (original)
+++ hadoop/hive/trunk/ql/src/test/queries/clientpositive/udf_round.q Thu Jan  7 03:01:26 2010
@@ -1,3 +1,6 @@
+DESCRIBE FUNCTION round;
+DESCRIBE FUNCTION EXTENDED round;
+
 SELECT round(null), round(null, 0), round(125, null)
 FROM src LIMIT 1;
 

Modified: hadoop/hive/trunk/ql/src/test/queries/clientpositive/udf_sin.q
URL: http://svn.apache.org/viewvc/hadoop/hive/trunk/ql/src/test/queries/clientpositive/udf_sin.q?rev=896744&r1=896743&r2=896744&view=diff
==============================================================================
--- hadoop/hive/trunk/ql/src/test/queries/clientpositive/udf_sin.q (original)
+++ hadoop/hive/trunk/ql/src/test/queries/clientpositive/udf_sin.q Thu Jan  7 03:01:26 2010
@@ -1,3 +1,6 @@
+DESCRIBE FUNCTION sin;
+DESCRIBE FUNCTION EXTENDED sin;
+
 SELECT sin(null)
 FROM src LIMIT 1;
 

Modified: hadoop/hive/trunk/ql/src/test/queries/clientpositive/udf_size.q
URL: http://svn.apache.org/viewvc/hadoop/hive/trunk/ql/src/test/queries/clientpositive/udf_size.q?rev=896744&r1=896743&r2=896744&view=diff
==============================================================================
--- hadoop/hive/trunk/ql/src/test/queries/clientpositive/udf_size.q (original)
+++ hadoop/hive/trunk/ql/src/test/queries/clientpositive/udf_size.q Thu Jan  7 03:01:26 2010
@@ -1,3 +1,6 @@
+DESCRIBE FUNCTION size;
+DESCRIBE FUNCTION EXTENDED size;
+
 EXPLAIN
 FROM src_thrift
 SELECT size(src_thrift.lint), 

Modified: hadoop/hive/trunk/ql/src/test/queries/clientpositive/udf_space.q
URL: http://svn.apache.org/viewvc/hadoop/hive/trunk/ql/src/test/queries/clientpositive/udf_space.q?rev=896744&r1=896743&r2=896744&view=diff
==============================================================================
--- hadoop/hive/trunk/ql/src/test/queries/clientpositive/udf_space.q (original)
+++ hadoop/hive/trunk/ql/src/test/queries/clientpositive/udf_space.q Thu Jan  7 03:01:26 2010
@@ -1,3 +1,6 @@
+DESCRIBE FUNCTION space;
+DESCRIBE FUNCTION EXTENDED space;
+
 EXPLAIN SELECT
   space(10),
   space(0),

Modified: hadoop/hive/trunk/ql/src/test/queries/clientpositive/udf_split.q
URL: http://svn.apache.org/viewvc/hadoop/hive/trunk/ql/src/test/queries/clientpositive/udf_split.q?rev=896744&r1=896743&r2=896744&view=diff
==============================================================================
--- hadoop/hive/trunk/ql/src/test/queries/clientpositive/udf_split.q (original)
+++ hadoop/hive/trunk/ql/src/test/queries/clientpositive/udf_split.q Thu Jan  7 03:01:26 2010
@@ -1,3 +1,6 @@
+DESCRIBE FUNCTION split;
+DESCRIBE FUNCTION EXTENDED split;
+
 EXPLAIN SELECT 
   split('a b c', ' '),
   split('oneAtwoBthreeC', '[ABC]'),

Modified: hadoop/hive/trunk/ql/src/test/queries/clientpositive/udf_substr.q
URL: http://svn.apache.org/viewvc/hadoop/hive/trunk/ql/src/test/queries/clientpositive/udf_substr.q?rev=896744&r1=896743&r2=896744&view=diff
==============================================================================
--- hadoop/hive/trunk/ql/src/test/queries/clientpositive/udf_substr.q (original)
+++ hadoop/hive/trunk/ql/src/test/queries/clientpositive/udf_substr.q Thu Jan  7 03:01:26 2010
@@ -1,3 +1,6 @@
+DESCRIBE FUNCTION substr;
+DESCRIBE FUNCTION EXTENDED substr;
+
 SELECT
   substr(null, 1), substr(null, 1, 1),
   substr('ABC', null), substr('ABC', null, 1),

Modified: hadoop/hive/trunk/ql/src/test/queries/clientpositive/udf_unhex.q
URL: http://svn.apache.org/viewvc/hadoop/hive/trunk/ql/src/test/queries/clientpositive/udf_unhex.q?rev=896744&r1=896743&r2=896744&view=diff
==============================================================================
--- hadoop/hive/trunk/ql/src/test/queries/clientpositive/udf_unhex.q (original)
+++ hadoop/hive/trunk/ql/src/test/queries/clientpositive/udf_unhex.q Thu Jan  7 03:01:26 2010
@@ -1,3 +1,6 @@
+DESCRIBE FUNCTION unhex;
+DESCRIBE FUNCTION EXTENDED unhex;
+
 -- Good inputs
 
 SELECT

Modified: hadoop/hive/trunk/ql/src/test/queries/clientpositive/udf_unix_timestamp.q
URL: http://svn.apache.org/viewvc/hadoop/hive/trunk/ql/src/test/queries/clientpositive/udf_unix_timestamp.q?rev=896744&r1=896743&r2=896744&view=diff
==============================================================================
--- hadoop/hive/trunk/ql/src/test/queries/clientpositive/udf_unix_timestamp.q (original)
+++ hadoop/hive/trunk/ql/src/test/queries/clientpositive/udf_unix_timestamp.q Thu Jan  7 03:01:26 2010
@@ -1,3 +1,6 @@
+DESCRIBE FUNCTION unix_timestamp;
+DESCRIBE FUNCTION EXTENDED unix_timestamp;
+
 SELECT
   '2009-03-20 11:30:01',
   unix_timestamp('2009-03-20 11:30:01')

Modified: hadoop/hive/trunk/ql/src/test/queries/clientpositive/udf_weekofyear.q
URL: http://svn.apache.org/viewvc/hadoop/hive/trunk/ql/src/test/queries/clientpositive/udf_weekofyear.q?rev=896744&r1=896743&r2=896744&view=diff
==============================================================================
--- hadoop/hive/trunk/ql/src/test/queries/clientpositive/udf_weekofyear.q (original)
+++ hadoop/hive/trunk/ql/src/test/queries/clientpositive/udf_weekofyear.q Thu Jan  7 03:01:26 2010
@@ -1,5 +1,4 @@
 DESCRIBE FUNCTION weekofyear;
-
 DESCRIBE FUNCTION EXTENDED weekofyear;
 
 SELECT weekofyear('1980-01-01'), weekofyear('1980-01-06'), weekofyear('1980-01-07'), weekofyear('1980-12-31'),

Modified: hadoop/hive/trunk/ql/src/test/queries/clientpositive/udtf_explode.q
URL: http://svn.apache.org/viewvc/hadoop/hive/trunk/ql/src/test/queries/clientpositive/udtf_explode.q?rev=896744&r1=896743&r2=896744&view=diff
==============================================================================
--- hadoop/hive/trunk/ql/src/test/queries/clientpositive/udtf_explode.q (original)
+++ hadoop/hive/trunk/ql/src/test/queries/clientpositive/udtf_explode.q Thu Jan  7 03:01:26 2010
@@ -1,3 +1,6 @@
+DESCRIBE FUNCTION explode;
+DESCRIBE FUNCTION EXTENDED explode;
+
 EXPLAIN EXTENDED SELECT explode(array(1,2,3)) AS myCol FROM src LIMIT 3;
 EXPLAIN EXTENDED SELECT a.myCol, count(1) FROM (SELECT explode(array(1,2,3)) AS myCol FROM src LIMIT 3) a GROUP BY a.myCol;
 

Added: hadoop/hive/trunk/ql/src/test/results/clientpositive/udaf_avg.q.out
URL: http://svn.apache.org/viewvc/hadoop/hive/trunk/ql/src/test/results/clientpositive/udaf_avg.q.out?rev=896744&view=auto
==============================================================================
--- hadoop/hive/trunk/ql/src/test/results/clientpositive/udaf_avg.q.out (added)
+++ hadoop/hive/trunk/ql/src/test/results/clientpositive/udaf_avg.q.out Thu Jan  7 03:01:26 2010
@@ -0,0 +1,20 @@
+PREHOOK: query: DESCRIBE FUNCTION avg
+PREHOOK: type: DESCFUNCTION
+POSTHOOK: query: DESCRIBE FUNCTION avg
+POSTHOOK: type: DESCFUNCTION
+avg(x) - Returns the mean of a set of numbers
+PREHOOK: query: DESCRIBE FUNCTION EXTENDED avg
+PREHOOK: type: DESCFUNCTION
+POSTHOOK: query: DESCRIBE FUNCTION EXTENDED avg
+POSTHOOK: type: DESCFUNCTION
+avg(x) - Returns the mean of a set of numbers
+PREHOOK: query: DESCRIBE FUNCTION avg
+PREHOOK: type: DESCFUNCTION
+POSTHOOK: query: DESCRIBE FUNCTION avg
+POSTHOOK: type: DESCFUNCTION
+avg(x) - Returns the mean of a set of numbers
+PREHOOK: query: DESCRIBE FUNCTION EXTENDED avg
+PREHOOK: type: DESCFUNCTION
+POSTHOOK: query: DESCRIBE FUNCTION EXTENDED avg
+POSTHOOK: type: DESCFUNCTION
+avg(x) - Returns the mean of a set of numbers

Added: hadoop/hive/trunk/ql/src/test/results/clientpositive/udaf_count.q.out
URL: http://svn.apache.org/viewvc/hadoop/hive/trunk/ql/src/test/results/clientpositive/udaf_count.q.out?rev=896744&view=auto
==============================================================================
--- hadoop/hive/trunk/ql/src/test/results/clientpositive/udaf_count.q.out (added)
+++ hadoop/hive/trunk/ql/src/test/results/clientpositive/udaf_count.q.out Thu Jan  7 03:01:26 2010
@@ -0,0 +1,20 @@
+PREHOOK: query: DESCRIBE FUNCTION count
+PREHOOK: type: DESCFUNCTION
+POSTHOOK: query: DESCRIBE FUNCTION count
+POSTHOOK: type: DESCFUNCTION
+count(x) - Returns the count
+PREHOOK: query: DESCRIBE FUNCTION EXTENDED count
+PREHOOK: type: DESCFUNCTION
+POSTHOOK: query: DESCRIBE FUNCTION EXTENDED count
+POSTHOOK: type: DESCFUNCTION
+count(x) - Returns the count
+PREHOOK: query: DESCRIBE FUNCTION count
+PREHOOK: type: DESCFUNCTION
+POSTHOOK: query: DESCRIBE FUNCTION count
+POSTHOOK: type: DESCFUNCTION
+count(x) - Returns the count
+PREHOOK: query: DESCRIBE FUNCTION EXTENDED count
+PREHOOK: type: DESCFUNCTION
+POSTHOOK: query: DESCRIBE FUNCTION EXTENDED count
+POSTHOOK: type: DESCFUNCTION
+count(x) - Returns the count

Added: hadoop/hive/trunk/ql/src/test/results/clientpositive/udaf_max.q.out
URL: http://svn.apache.org/viewvc/hadoop/hive/trunk/ql/src/test/results/clientpositive/udaf_max.q.out?rev=896744&view=auto
==============================================================================
--- hadoop/hive/trunk/ql/src/test/results/clientpositive/udaf_max.q.out (added)
+++ hadoop/hive/trunk/ql/src/test/results/clientpositive/udaf_max.q.out Thu Jan  7 03:01:26 2010
@@ -0,0 +1,20 @@
+PREHOOK: query: DESCRIBE FUNCTION max
+PREHOOK: type: DESCFUNCTION
+POSTHOOK: query: DESCRIBE FUNCTION max
+POSTHOOK: type: DESCFUNCTION
+max(expr) - Returns the maximum value of expr
+PREHOOK: query: DESCRIBE FUNCTION EXTENDED max
+PREHOOK: type: DESCFUNCTION
+POSTHOOK: query: DESCRIBE FUNCTION EXTENDED max
+POSTHOOK: type: DESCFUNCTION
+max(expr) - Returns the maximum value of expr
+PREHOOK: query: DESCRIBE FUNCTION max
+PREHOOK: type: DESCFUNCTION
+POSTHOOK: query: DESCRIBE FUNCTION max
+POSTHOOK: type: DESCFUNCTION
+max(expr) - Returns the maximum value of expr
+PREHOOK: query: DESCRIBE FUNCTION EXTENDED max
+PREHOOK: type: DESCFUNCTION
+POSTHOOK: query: DESCRIBE FUNCTION EXTENDED max
+POSTHOOK: type: DESCFUNCTION
+max(expr) - Returns the maximum value of expr

Added: hadoop/hive/trunk/ql/src/test/results/clientpositive/udaf_min.q.out
URL: http://svn.apache.org/viewvc/hadoop/hive/trunk/ql/src/test/results/clientpositive/udaf_min.q.out?rev=896744&view=auto
==============================================================================
--- hadoop/hive/trunk/ql/src/test/results/clientpositive/udaf_min.q.out (added)
+++ hadoop/hive/trunk/ql/src/test/results/clientpositive/udaf_min.q.out Thu Jan  7 03:01:26 2010
@@ -0,0 +1,20 @@
+PREHOOK: query: DESCRIBE FUNCTION min
+PREHOOK: type: DESCFUNCTION
+POSTHOOK: query: DESCRIBE FUNCTION min
+POSTHOOK: type: DESCFUNCTION
+min(expr) - Returns the minimum value of expr
+PREHOOK: query: DESCRIBE FUNCTION EXTENDED min
+PREHOOK: type: DESCFUNCTION
+POSTHOOK: query: DESCRIBE FUNCTION EXTENDED min
+POSTHOOK: type: DESCFUNCTION
+min(expr) - Returns the minimum value of expr
+PREHOOK: query: DESCRIBE FUNCTION min
+PREHOOK: type: DESCFUNCTION
+POSTHOOK: query: DESCRIBE FUNCTION min
+POSTHOOK: type: DESCFUNCTION
+min(expr) - Returns the minimum value of expr
+PREHOOK: query: DESCRIBE FUNCTION EXTENDED min
+PREHOOK: type: DESCFUNCTION
+POSTHOOK: query: DESCRIBE FUNCTION EXTENDED min
+POSTHOOK: type: DESCFUNCTION
+min(expr) - Returns the minimum value of expr

Added: hadoop/hive/trunk/ql/src/test/results/clientpositive/udaf_std.q.out
URL: http://svn.apache.org/viewvc/hadoop/hive/trunk/ql/src/test/results/clientpositive/udaf_std.q.out?rev=896744&view=auto
==============================================================================
--- hadoop/hive/trunk/ql/src/test/results/clientpositive/udaf_std.q.out (added)
+++ hadoop/hive/trunk/ql/src/test/results/clientpositive/udaf_std.q.out Thu Jan  7 03:01:26 2010
@@ -0,0 +1,60 @@
+PREHOOK: query: DESCRIBE FUNCTION std
+PREHOOK: type: DESCFUNCTION
+POSTHOOK: query: DESCRIBE FUNCTION std
+POSTHOOK: type: DESCFUNCTION
+std(x) - Returns the standard deviation of a set of numbers
+PREHOOK: query: DESCRIBE FUNCTION EXTENDED std
+PREHOOK: type: DESCFUNCTION
+POSTHOOK: query: DESCRIBE FUNCTION EXTENDED std
+POSTHOOK: type: DESCFUNCTION
+std(x) - Returns the standard deviation of a set of numbers
+PREHOOK: query: DESCRIBE FUNCTION stddev
+PREHOOK: type: DESCFUNCTION
+POSTHOOK: query: DESCRIBE FUNCTION stddev
+POSTHOOK: type: DESCFUNCTION
+stddev(x) - Returns the standard deviation of a set of numbers
+PREHOOK: query: DESCRIBE FUNCTION EXTENDED stddev
+PREHOOK: type: DESCFUNCTION
+POSTHOOK: query: DESCRIBE FUNCTION EXTENDED stddev
+POSTHOOK: type: DESCFUNCTION
+stddev(x) - Returns the standard deviation of a set of numbers
+PREHOOK: query: DESCRIBE FUNCTION stddev_pop
+PREHOOK: type: DESCFUNCTION
+POSTHOOK: query: DESCRIBE FUNCTION stddev_pop
+POSTHOOK: type: DESCFUNCTION
+stddev_pop(x) - Returns the standard deviation of a set of numbers
+PREHOOK: query: DESCRIBE FUNCTION EXTENDED stddev_pop
+PREHOOK: type: DESCFUNCTION
+POSTHOOK: query: DESCRIBE FUNCTION EXTENDED stddev_pop
+POSTHOOK: type: DESCFUNCTION
+stddev_pop(x) - Returns the standard deviation of a set of numbers
+PREHOOK: query: DESCRIBE FUNCTION std
+PREHOOK: type: DESCFUNCTION
+POSTHOOK: query: DESCRIBE FUNCTION std
+POSTHOOK: type: DESCFUNCTION
+std(x) - Returns the standard deviation of a set of numbers
+PREHOOK: query: DESCRIBE FUNCTION EXTENDED std
+PREHOOK: type: DESCFUNCTION
+POSTHOOK: query: DESCRIBE FUNCTION EXTENDED std
+POSTHOOK: type: DESCFUNCTION
+std(x) - Returns the standard deviation of a set of numbers
+PREHOOK: query: DESCRIBE FUNCTION stddev
+PREHOOK: type: DESCFUNCTION
+POSTHOOK: query: DESCRIBE FUNCTION stddev
+POSTHOOK: type: DESCFUNCTION
+stddev(x) - Returns the standard deviation of a set of numbers
+PREHOOK: query: DESCRIBE FUNCTION EXTENDED stddev
+PREHOOK: type: DESCFUNCTION
+POSTHOOK: query: DESCRIBE FUNCTION EXTENDED stddev
+POSTHOOK: type: DESCFUNCTION
+stddev(x) - Returns the standard deviation of a set of numbers
+PREHOOK: query: DESCRIBE FUNCTION stddev_pop
+PREHOOK: type: DESCFUNCTION
+POSTHOOK: query: DESCRIBE FUNCTION stddev_pop
+POSTHOOK: type: DESCFUNCTION
+stddev_pop(x) - Returns the standard deviation of a set of numbers
+PREHOOK: query: DESCRIBE FUNCTION EXTENDED stddev_pop
+PREHOOK: type: DESCFUNCTION
+POSTHOOK: query: DESCRIBE FUNCTION EXTENDED stddev_pop
+POSTHOOK: type: DESCFUNCTION
+stddev_pop(x) - Returns the standard deviation of a set of numbers

Added: hadoop/hive/trunk/ql/src/test/results/clientpositive/udaf_stddev_samp.q.out
URL: http://svn.apache.org/viewvc/hadoop/hive/trunk/ql/src/test/results/clientpositive/udaf_stddev_samp.q.out?rev=896744&view=auto
==============================================================================
--- hadoop/hive/trunk/ql/src/test/results/clientpositive/udaf_stddev_samp.q.out (added)
+++ hadoop/hive/trunk/ql/src/test/results/clientpositive/udaf_stddev_samp.q.out Thu Jan  7 03:01:26 2010
@@ -0,0 +1,20 @@
+PREHOOK: query: DESCRIBE FUNCTION stddev_samp
+PREHOOK: type: DESCFUNCTION
+POSTHOOK: query: DESCRIBE FUNCTION stddev_samp
+POSTHOOK: type: DESCFUNCTION
+stddev_samp(x) - Returns the sample standard deviation of a set of numbers
+PREHOOK: query: DESCRIBE FUNCTION EXTENDED stddev_samp
+PREHOOK: type: DESCFUNCTION
+POSTHOOK: query: DESCRIBE FUNCTION EXTENDED stddev_samp
+POSTHOOK: type: DESCFUNCTION
+stddev_samp(x) - Returns the sample standard deviation of a set of numbers
+PREHOOK: query: DESCRIBE FUNCTION stddev_samp
+PREHOOK: type: DESCFUNCTION
+POSTHOOK: query: DESCRIBE FUNCTION stddev_samp
+POSTHOOK: type: DESCFUNCTION
+stddev_samp(x) - Returns the sample standard deviation of a set of numbers
+PREHOOK: query: DESCRIBE FUNCTION EXTENDED stddev_samp
+PREHOOK: type: DESCFUNCTION
+POSTHOOK: query: DESCRIBE FUNCTION EXTENDED stddev_samp
+POSTHOOK: type: DESCFUNCTION
+stddev_samp(x) - Returns the sample standard deviation of a set of numbers

Added: hadoop/hive/trunk/ql/src/test/results/clientpositive/udaf_sum.q.out
URL: http://svn.apache.org/viewvc/hadoop/hive/trunk/ql/src/test/results/clientpositive/udaf_sum.q.out?rev=896744&view=auto
==============================================================================
--- hadoop/hive/trunk/ql/src/test/results/clientpositive/udaf_sum.q.out (added)
+++ hadoop/hive/trunk/ql/src/test/results/clientpositive/udaf_sum.q.out Thu Jan  7 03:01:26 2010
@@ -0,0 +1,20 @@
+PREHOOK: query: DESCRIBE FUNCTION sum
+PREHOOK: type: DESCFUNCTION
+POSTHOOK: query: DESCRIBE FUNCTION sum
+POSTHOOK: type: DESCFUNCTION
+sum(x) - Returns the sum of a set of numbers
+PREHOOK: query: DESCRIBE FUNCTION EXTENDED sum
+PREHOOK: type: DESCFUNCTION
+POSTHOOK: query: DESCRIBE FUNCTION EXTENDED sum
+POSTHOOK: type: DESCFUNCTION
+sum(x) - Returns the sum of a set of numbers
+PREHOOK: query: DESCRIBE FUNCTION sum
+PREHOOK: type: DESCFUNCTION
+POSTHOOK: query: DESCRIBE FUNCTION sum
+POSTHOOK: type: DESCFUNCTION
+sum(x) - Returns the sum of a set of numbers
+PREHOOK: query: DESCRIBE FUNCTION EXTENDED sum
+PREHOOK: type: DESCFUNCTION
+POSTHOOK: query: DESCRIBE FUNCTION EXTENDED sum
+POSTHOOK: type: DESCFUNCTION
+sum(x) - Returns the sum of a set of numbers

Added: hadoop/hive/trunk/ql/src/test/results/clientpositive/udaf_var_samp.q.out
URL: http://svn.apache.org/viewvc/hadoop/hive/trunk/ql/src/test/results/clientpositive/udaf_var_samp.q.out?rev=896744&view=auto
==============================================================================
--- hadoop/hive/trunk/ql/src/test/results/clientpositive/udaf_var_samp.q.out (added)
+++ hadoop/hive/trunk/ql/src/test/results/clientpositive/udaf_var_samp.q.out Thu Jan  7 03:01:26 2010
@@ -0,0 +1,20 @@
+PREHOOK: query: DESCRIBE FUNCTION var_samp
+PREHOOK: type: DESCFUNCTION
+POSTHOOK: query: DESCRIBE FUNCTION var_samp
+POSTHOOK: type: DESCFUNCTION
+var_samp(x) - Returns the sample variance of a set of numbers
+PREHOOK: query: DESCRIBE FUNCTION EXTENDED var_samp
+PREHOOK: type: DESCFUNCTION
+POSTHOOK: query: DESCRIBE FUNCTION EXTENDED var_samp
+POSTHOOK: type: DESCFUNCTION
+var_samp(x) - Returns the sample variance of a set of numbers
+PREHOOK: query: DESCRIBE FUNCTION var_samp
+PREHOOK: type: DESCFUNCTION
+POSTHOOK: query: DESCRIBE FUNCTION var_samp
+POSTHOOK: type: DESCFUNCTION
+var_samp(x) - Returns the sample variance of a set of numbers
+PREHOOK: query: DESCRIBE FUNCTION EXTENDED var_samp
+PREHOOK: type: DESCFUNCTION
+POSTHOOK: query: DESCRIBE FUNCTION EXTENDED var_samp
+POSTHOOK: type: DESCFUNCTION
+var_samp(x) - Returns the sample variance of a set of numbers

Added: hadoop/hive/trunk/ql/src/test/results/clientpositive/udaf_variance.q.out
URL: http://svn.apache.org/viewvc/hadoop/hive/trunk/ql/src/test/results/clientpositive/udaf_variance.q.out?rev=896744&view=auto
==============================================================================
--- hadoop/hive/trunk/ql/src/test/results/clientpositive/udaf_variance.q.out (added)
+++ hadoop/hive/trunk/ql/src/test/results/clientpositive/udaf_variance.q.out Thu Jan  7 03:01:26 2010
@@ -0,0 +1,40 @@
+PREHOOK: query: DESCRIBE FUNCTION variance
+PREHOOK: type: DESCFUNCTION
+POSTHOOK: query: DESCRIBE FUNCTION variance
+POSTHOOK: type: DESCFUNCTION
+variance(x) - Returns the variance of a set of numbers
+PREHOOK: query: DESCRIBE FUNCTION EXTENDED variance
+PREHOOK: type: DESCFUNCTION
+POSTHOOK: query: DESCRIBE FUNCTION EXTENDED variance
+POSTHOOK: type: DESCFUNCTION
+variance(x) - Returns the variance of a set of numbers
+PREHOOK: query: DESCRIBE FUNCTION var_pop
+PREHOOK: type: DESCFUNCTION
+POSTHOOK: query: DESCRIBE FUNCTION var_pop
+POSTHOOK: type: DESCFUNCTION
+var_pop(x) - Returns the variance of a set of numbers
+PREHOOK: query: DESCRIBE FUNCTION EXTENDED var_pop
+PREHOOK: type: DESCFUNCTION
+POSTHOOK: query: DESCRIBE FUNCTION EXTENDED var_pop
+POSTHOOK: type: DESCFUNCTION
+var_pop(x) - Returns the variance of a set of numbers
+PREHOOK: query: DESCRIBE FUNCTION variance
+PREHOOK: type: DESCFUNCTION
+POSTHOOK: query: DESCRIBE FUNCTION variance
+POSTHOOK: type: DESCFUNCTION
+variance(x) - Returns the variance of a set of numbers
+PREHOOK: query: DESCRIBE FUNCTION EXTENDED variance
+PREHOOK: type: DESCFUNCTION
+POSTHOOK: query: DESCRIBE FUNCTION EXTENDED variance
+POSTHOOK: type: DESCFUNCTION
+variance(x) - Returns the variance of a set of numbers
+PREHOOK: query: DESCRIBE FUNCTION var_pop
+PREHOOK: type: DESCFUNCTION
+POSTHOOK: query: DESCRIBE FUNCTION var_pop
+POSTHOOK: type: DESCFUNCTION
+var_pop(x) - Returns the variance of a set of numbers
+PREHOOK: query: DESCRIBE FUNCTION EXTENDED var_pop
+PREHOOK: type: DESCFUNCTION
+POSTHOOK: query: DESCRIBE FUNCTION EXTENDED var_pop
+POSTHOOK: type: DESCFUNCTION
+var_pop(x) - Returns the variance of a set of numbers

Modified: hadoop/hive/trunk/ql/src/test/results/clientpositive/udf_abs.q.out
URL: http://svn.apache.org/viewvc/hadoop/hive/trunk/ql/src/test/results/clientpositive/udf_abs.q.out?rev=896744&r1=896743&r2=896744&view=diff
==============================================================================
--- hadoop/hive/trunk/ql/src/test/results/clientpositive/udf_abs.q.out (original)
+++ hadoop/hive/trunk/ql/src/test/results/clientpositive/udf_abs.q.out Thu Jan  7 03:01:26 2010
@@ -1,3 +1,18 @@
+PREHOOK: query: DESCRIBE FUNCTION abs
+PREHOOK: type: DESCFUNCTION
+POSTHOOK: query: DESCRIBE FUNCTION abs
+POSTHOOK: type: DESCFUNCTION
+abs(x) - returns the absolute value of x
+PREHOOK: query: DESCRIBE FUNCTION EXTENDED abs
+PREHOOK: type: DESCFUNCTION
+POSTHOOK: query: DESCRIBE FUNCTION EXTENDED abs
+POSTHOOK: type: DESCFUNCTION
+abs(x) - returns the absolute value of x
+Example:
+  > SELECT abs(0) FROM src LIMIT 1;
+  0
+  > SELECT abs(-5) FROM src LIMIT 1;
+  5
 PREHOOK: query: EXPLAIN SELECT
   abs(0),
   abs(-1),
@@ -63,7 +78,7 @@
 FROM src LIMIT 1
 PREHOOK: type: QUERY
 PREHOOK: Input: default@src
-PREHOOK: Output: file:/data/users/njain/hive5/hive5/build/ql/tmp/2094182155/10000
+PREHOOK: Output: file:/Users/carl/Projects/hd9/hive-trunk/build/ql/tmp/1461910312/10000
 POSTHOOK: query: SELECT
   abs(0),
   abs(-1),
@@ -73,7 +88,7 @@
 FROM src LIMIT 1
 POSTHOOK: type: QUERY
 POSTHOOK: Input: default@src
-POSTHOOK: Output: file:/data/users/njain/hive5/hive5/build/ql/tmp/2094182155/10000
+POSTHOOK: Output: file:/Users/carl/Projects/hd9/hive-trunk/build/ql/tmp/1461910312/10000
 0	1	123	9223372036854775807	9223372036854775807
 PREHOOK: query: EXPLAIN SELECT
   abs(0.0),
@@ -130,7 +145,7 @@
 FROM src LIMIT 1
 PREHOOK: type: QUERY
 PREHOOK: Input: default@src
-PREHOOK: Output: file:/data/users/njain/hive5/hive5/build/ql/tmp/108724608/10000
+PREHOOK: Output: file:/Users/carl/Projects/hd9/hive-trunk/build/ql/tmp/1794760562/10000
 POSTHOOK: query: SELECT
   abs(0.0),
   abs(-3.14159265),
@@ -138,5 +153,5 @@
 FROM src LIMIT 1
 POSTHOOK: type: QUERY
 POSTHOOK: Input: default@src
-POSTHOOK: Output: file:/data/users/njain/hive5/hive5/build/ql/tmp/108724608/10000
+POSTHOOK: Output: file:/Users/carl/Projects/hd9/hive-trunk/build/ql/tmp/1794760562/10000
 0.0	3.14159265	3.14159265

Modified: hadoop/hive/trunk/ql/src/test/results/clientpositive/udf_acos.q.out
URL: http://svn.apache.org/viewvc/hadoop/hive/trunk/ql/src/test/results/clientpositive/udf_acos.q.out?rev=896744&r1=896743&r2=896744&view=diff
==============================================================================
--- hadoop/hive/trunk/ql/src/test/results/clientpositive/udf_acos.q.out (original)
+++ hadoop/hive/trunk/ql/src/test/results/clientpositive/udf_acos.q.out Thu Jan  7 03:01:26 2010
@@ -1,44 +1,59 @@
+PREHOOK: query: DESCRIBE FUNCTION acos
+PREHOOK: type: DESCFUNCTION
+POSTHOOK: query: DESCRIBE FUNCTION acos
+POSTHOOK: type: DESCFUNCTION
+acos(x) - returns the arc cosine of x if -1<=x<=1 or NULL otherwise
+PREHOOK: query: DESCRIBE FUNCTION EXTENDED acos
+PREHOOK: type: DESCFUNCTION
+POSTHOOK: query: DESCRIBE FUNCTION EXTENDED acos
+POSTHOOK: type: DESCFUNCTION
+acos(x) - returns the arc cosine of x if -1<=x<=1 or NULL otherwise
+Example:
+  > SELECT acos(1) FROM src LIMIT 1;
+  0
+  > SELECT acos(2) FROM src LIMIT 1;
+  NULL
 PREHOOK: query: SELECT acos(null)
 FROM src LIMIT 1
 PREHOOK: type: QUERY
 PREHOOK: Input: default@src
-PREHOOK: Output: file:/data/users/njain/hive5/hive5/build/ql/tmp/1457812629/10000
+PREHOOK: Output: file:/Users/carl/Projects/hd9/hive-trunk/build/ql/tmp/959577580/10000
 POSTHOOK: query: SELECT acos(null)
 FROM src LIMIT 1
 POSTHOOK: type: QUERY
 POSTHOOK: Input: default@src
-POSTHOOK: Output: file:/data/users/njain/hive5/hive5/build/ql/tmp/1457812629/10000
+POSTHOOK: Output: file:/Users/carl/Projects/hd9/hive-trunk/build/ql/tmp/959577580/10000
 NULL
 PREHOOK: query: SELECT acos(0)
 FROM src LIMIT 1
 PREHOOK: type: QUERY
 PREHOOK: Input: default@src
-PREHOOK: Output: file:/data/users/njain/hive5/hive5/build/ql/tmp/1180311283/10000
+PREHOOK: Output: file:/Users/carl/Projects/hd9/hive-trunk/build/ql/tmp/227674626/10000
 POSTHOOK: query: SELECT acos(0)
 FROM src LIMIT 1
 POSTHOOK: type: QUERY
 POSTHOOK: Input: default@src
-POSTHOOK: Output: file:/data/users/njain/hive5/hive5/build/ql/tmp/1180311283/10000
+POSTHOOK: Output: file:/Users/carl/Projects/hd9/hive-trunk/build/ql/tmp/227674626/10000
 1.5707963267948966
 PREHOOK: query: SELECT acos(-0.5), asin(0.66)
 FROM src LIMIT 1
 PREHOOK: type: QUERY
 PREHOOK: Input: default@src
-PREHOOK: Output: file:/data/users/njain/hive5/hive5/build/ql/tmp/804897720/10000
+PREHOOK: Output: file:/Users/carl/Projects/hd9/hive-trunk/build/ql/tmp/1521007936/10000
 POSTHOOK: query: SELECT acos(-0.5), asin(0.66)
 FROM src LIMIT 1
 POSTHOOK: type: QUERY
 POSTHOOK: Input: default@src
-POSTHOOK: Output: file:/data/users/njain/hive5/hive5/build/ql/tmp/804897720/10000
+POSTHOOK: Output: file:/Users/carl/Projects/hd9/hive-trunk/build/ql/tmp/1521007936/10000
 2.0943951023931957	0.7208187608700897
 PREHOOK: query: SELECT acos(2)
 FROM src LIMIT 1
 PREHOOK: type: QUERY
 PREHOOK: Input: default@src
-PREHOOK: Output: file:/data/users/njain/hive5/hive5/build/ql/tmp/615514597/10000
+PREHOOK: Output: file:/Users/carl/Projects/hd9/hive-trunk/build/ql/tmp/325299096/10000
 POSTHOOK: query: SELECT acos(2)
 FROM src LIMIT 1
 POSTHOOK: type: QUERY
 POSTHOOK: Input: default@src
-POSTHOOK: Output: file:/data/users/njain/hive5/hive5/build/ql/tmp/615514597/10000
+POSTHOOK: Output: file:/Users/carl/Projects/hd9/hive-trunk/build/ql/tmp/325299096/10000
 NaN

Modified: hadoop/hive/trunk/ql/src/test/results/clientpositive/udf_array.q.out
URL: http://svn.apache.org/viewvc/hadoop/hive/trunk/ql/src/test/results/clientpositive/udf_array.q.out?rev=896744&r1=896743&r2=896744&view=diff
==============================================================================
--- hadoop/hive/trunk/ql/src/test/results/clientpositive/udf_array.q.out (original)
+++ hadoop/hive/trunk/ql/src/test/results/clientpositive/udf_array.q.out Thu Jan  7 03:01:26 2010
@@ -1,3 +1,15 @@
+PREHOOK: query: -- Parsing bug requires us to quote array
+DESCRIBE FUNCTION 'array'
+PREHOOK: type: DESCFUNCTION
+POSTHOOK: query: -- Parsing bug requires us to quote array
+DESCRIBE FUNCTION 'array'
+POSTHOOK: type: DESCFUNCTION
+array(n0, n1...) - Creates an array with the given elements 
+PREHOOK: query: DESCRIBE FUNCTION EXTENDED 'array'
+PREHOOK: type: DESCFUNCTION
+POSTHOOK: query: DESCRIBE FUNCTION EXTENDED 'array'
+POSTHOOK: type: DESCFUNCTION
+array(n0, n1...) - Creates an array with the given elements 
 PREHOOK: query: EXPLAIN SELECT array(), array()[1], array(1, 2, 3), array(1, 2, 3)[2], array(1,"a", 2, 3), array(1,"a", 2, 3)[2],
 array(array(1), array(2), array(3), array(4))[1][0] FROM src LIMIT 1
 PREHOOK: type: QUERY
@@ -52,10 +64,10 @@
 array(array(1), array(2), array(3), array(4))[1][0] FROM src LIMIT 1
 PREHOOK: type: QUERY
 PREHOOK: Input: default@src
-PREHOOK: Output: file:/data/users/pyang/trunk-HIVE-554/VENDOR.hive/trunk/build/ql/tmp/1854297096/10000
+PREHOOK: Output: file:/Users/carl/Projects/hd9/hive-trunk/build/ql/tmp/1972672782/10000
 POSTHOOK: query: SELECT array(), array()[1], array(1, 2, 3), array(1, 2, 3)[2], array(1,"a", 2, 3), array(1,"a", 2, 3)[2],
 array(array(1), array(2), array(3), array(4))[1][0] FROM src LIMIT 1
 POSTHOOK: type: QUERY
 POSTHOOK: Input: default@src
-POSTHOOK: Output: file:/data/users/pyang/trunk-HIVE-554/VENDOR.hive/trunk/build/ql/tmp/1854297096/10000
+POSTHOOK: Output: file:/Users/carl/Projects/hd9/hive-trunk/build/ql/tmp/1972672782/10000
 []	NULL	[1,2,3]	3	["1","a","2","3"]	2	2

Modified: hadoop/hive/trunk/ql/src/test/results/clientpositive/udf_ascii.q.out
URL: http://svn.apache.org/viewvc/hadoop/hive/trunk/ql/src/test/results/clientpositive/udf_ascii.q.out?rev=896744&r1=896743&r2=896744&view=diff
==============================================================================
--- hadoop/hive/trunk/ql/src/test/results/clientpositive/udf_ascii.q.out (original)
+++ hadoop/hive/trunk/ql/src/test/results/clientpositive/udf_ascii.q.out Thu Jan  7 03:01:26 2010
@@ -1,3 +1,18 @@
+PREHOOK: query: DESCRIBE FUNCTION ascii
+PREHOOK: type: DESCFUNCTION
+POSTHOOK: query: DESCRIBE FUNCTION ascii
+POSTHOOK: type: DESCFUNCTION
+ascii(str) - returns the numeric value of the first character of str
+PREHOOK: query: DESCRIBE FUNCTION EXTENDED ascii
+PREHOOK: type: DESCFUNCTION
+POSTHOOK: query: DESCRIBE FUNCTION EXTENDED ascii
+POSTHOOK: type: DESCFUNCTION
+ascii(str) - returns the numeric value of the first character of str
+Returns 0 if str is empty or NULL if str is NULL
+Example:
+  > SELECT ascii('222') FROM src LIMIT 1;  50
+  > SELECT ascii(2) FROM src LIMIT 1;
+  50
 PREHOOK: query: EXPLAIN SELECT
   ascii('Facebook'),
   ascii(''),
@@ -53,7 +68,7 @@
 FROM src LIMIT 1
 PREHOOK: type: QUERY
 PREHOOK: Input: default@src
-PREHOOK: Output: file:/data/users/njain/hive5/hive5/build/ql/tmp/772117818/10000
+PREHOOK: Output: file:/Users/carl/Projects/hd9/hive-trunk/build/ql/tmp/1375319396/10000
 POSTHOOK: query: SELECT
   ascii('Facebook'),
   ascii(''),
@@ -61,5 +76,5 @@
 FROM src LIMIT 1
 POSTHOOK: type: QUERY
 POSTHOOK: Input: default@src
-POSTHOOK: Output: file:/data/users/njain/hive5/hive5/build/ql/tmp/772117818/10000
+POSTHOOK: Output: file:/Users/carl/Projects/hd9/hive-trunk/build/ql/tmp/1375319396/10000
 70	0	33

Modified: hadoop/hive/trunk/ql/src/test/results/clientpositive/udf_asin.q.out
URL: http://svn.apache.org/viewvc/hadoop/hive/trunk/ql/src/test/results/clientpositive/udf_asin.q.out?rev=896744&r1=896743&r2=896744&view=diff
==============================================================================
--- hadoop/hive/trunk/ql/src/test/results/clientpositive/udf_asin.q.out (original)
+++ hadoop/hive/trunk/ql/src/test/results/clientpositive/udf_asin.q.out Thu Jan  7 03:01:26 2010
@@ -1,44 +1,59 @@
+PREHOOK: query: DESCRIBE FUNCTION asin
+PREHOOK: type: DESCFUNCTION
+POSTHOOK: query: DESCRIBE FUNCTION asin
+POSTHOOK: type: DESCFUNCTION
+asin(x) - returns the arc sine of x if -1<=x<=1 or NULL otherwise
+PREHOOK: query: DESCRIBE FUNCTION EXTENDED asin
+PREHOOK: type: DESCFUNCTION
+POSTHOOK: query: DESCRIBE FUNCTION EXTENDED asin
+POSTHOOK: type: DESCFUNCTION
+asin(x) - returns the arc sine of x if -1<=x<=1 or NULL otherwise
+Example:
+  > SELECT asin(0) FROM src LIMIT 1;
+  0
+  > SELECT asin(2) FROM src LIMIT 1;
+  NULL
 PREHOOK: query: SELECT asin(null)
 FROM src LIMIT 1
 PREHOOK: type: QUERY
 PREHOOK: Input: default@src
-PREHOOK: Output: file:/data/users/njain/hive5/hive5/build/ql/tmp/335338053/10000
+PREHOOK: Output: file:/Users/carl/Projects/hd9/hive-trunk/build/ql/tmp/267750936/10000
 POSTHOOK: query: SELECT asin(null)
 FROM src LIMIT 1
 POSTHOOK: type: QUERY
 POSTHOOK: Input: default@src
-POSTHOOK: Output: file:/data/users/njain/hive5/hive5/build/ql/tmp/335338053/10000
+POSTHOOK: Output: file:/Users/carl/Projects/hd9/hive-trunk/build/ql/tmp/267750936/10000
 NULL
 PREHOOK: query: SELECT asin(0)
 FROM src LIMIT 1
 PREHOOK: type: QUERY
 PREHOOK: Input: default@src
-PREHOOK: Output: file:/data/users/njain/hive5/hive5/build/ql/tmp/1930989265/10000
+PREHOOK: Output: file:/Users/carl/Projects/hd9/hive-trunk/build/ql/tmp/833606284/10000
 POSTHOOK: query: SELECT asin(0)
 FROM src LIMIT 1
 POSTHOOK: type: QUERY
 POSTHOOK: Input: default@src
-POSTHOOK: Output: file:/data/users/njain/hive5/hive5/build/ql/tmp/1930989265/10000
+POSTHOOK: Output: file:/Users/carl/Projects/hd9/hive-trunk/build/ql/tmp/833606284/10000
 0.0
 PREHOOK: query: SELECT asin(-0.5), asin(0.66)
 FROM src LIMIT 1
 PREHOOK: type: QUERY
 PREHOOK: Input: default@src
-PREHOOK: Output: file:/data/users/njain/hive5/hive5/build/ql/tmp/1036919646/10000
+PREHOOK: Output: file:/Users/carl/Projects/hd9/hive-trunk/build/ql/tmp/604043294/10000
 POSTHOOK: query: SELECT asin(-0.5), asin(0.66)
 FROM src LIMIT 1
 POSTHOOK: type: QUERY
 POSTHOOK: Input: default@src
-POSTHOOK: Output: file:/data/users/njain/hive5/hive5/build/ql/tmp/1036919646/10000
+POSTHOOK: Output: file:/Users/carl/Projects/hd9/hive-trunk/build/ql/tmp/604043294/10000
 -0.5235987755982989	0.7208187608700897
 PREHOOK: query: SELECT asin(2)
 FROM src LIMIT 1
 PREHOOK: type: QUERY
 PREHOOK: Input: default@src
-PREHOOK: Output: file:/data/users/njain/hive5/hive5/build/ql/tmp/1231279693/10000
+PREHOOK: Output: file:/Users/carl/Projects/hd9/hive-trunk/build/ql/tmp/1494381105/10000
 POSTHOOK: query: SELECT asin(2)
 FROM src LIMIT 1
 POSTHOOK: type: QUERY
 POSTHOOK: Input: default@src
-POSTHOOK: Output: file:/data/users/njain/hive5/hive5/build/ql/tmp/1231279693/10000
+POSTHOOK: Output: file:/Users/carl/Projects/hd9/hive-trunk/build/ql/tmp/1494381105/10000
 NaN

Modified: hadoop/hive/trunk/ql/src/test/results/clientpositive/udf_bin.q.out
URL: http://svn.apache.org/viewvc/hadoop/hive/trunk/ql/src/test/results/clientpositive/udf_bin.q.out?rev=896744&r1=896743&r2=896744&view=diff
==============================================================================
--- hadoop/hive/trunk/ql/src/test/results/clientpositive/udf_bin.q.out (original)
+++ hadoop/hive/trunk/ql/src/test/results/clientpositive/udf_bin.q.out Thu Jan  7 03:01:26 2010
@@ -1,3 +1,17 @@
+PREHOOK: query: DESCRIBE FUNCTION bin
+PREHOOK: type: DESCFUNCTION
+POSTHOOK: query: DESCRIBE FUNCTION bin
+POSTHOOK: type: DESCFUNCTION
+bin(n) - returns n in binary
+PREHOOK: query: DESCRIBE FUNCTION EXTENDED bin
+PREHOOK: type: DESCFUNCTION
+POSTHOOK: query: DESCRIBE FUNCTION EXTENDED bin
+POSTHOOK: type: DESCFUNCTION
+bin(n) - returns n in binary
+n is a BIGINT. Returns NULL if n is NULL.
+Example:
+  > SELECT bin(13) FROM src LIMIT 1
+  '1101'
 PREHOOK: query: SELECT
   bin(1),
   bin(0),
@@ -5,7 +19,7 @@
 FROM src LIMIT 1
 PREHOOK: type: QUERY
 PREHOOK: Input: default@src
-PREHOOK: Output: file:/data/users/njain/hive5/hive5/build/ql/tmp/359409613/10000
+PREHOOK: Output: file:/Users/carl/Projects/hd9/hive-trunk/build/ql/tmp/888920394/10000
 POSTHOOK: query: SELECT
   bin(1),
   bin(0),
@@ -13,16 +27,16 @@
 FROM src LIMIT 1
 POSTHOOK: type: QUERY
 POSTHOOK: Input: default@src
-POSTHOOK: Output: file:/data/users/njain/hive5/hive5/build/ql/tmp/359409613/10000
+POSTHOOK: Output: file:/Users/carl/Projects/hd9/hive-trunk/build/ql/tmp/888920394/10000
 1	0	101111101011100001101100101
 PREHOOK: query: -- Negative numbers should be treated as two's complement (64 bit).
 SELECT bin(-5) FROM src LIMIT 1
 PREHOOK: type: QUERY
 PREHOOK: Input: default@src
-PREHOOK: Output: file:/data/users/njain/hive5/hive5/build/ql/tmp/991182455/10000
+PREHOOK: Output: file:/Users/carl/Projects/hd9/hive-trunk/build/ql/tmp/1468739151/10000
 POSTHOOK: query: -- Negative numbers should be treated as two's complement (64 bit).
 SELECT bin(-5) FROM src LIMIT 1
 POSTHOOK: type: QUERY
 POSTHOOK: Input: default@src
-POSTHOOK: Output: file:/data/users/njain/hive5/hive5/build/ql/tmp/991182455/10000
+POSTHOOK: Output: file:/Users/carl/Projects/hd9/hive-trunk/build/ql/tmp/1468739151/10000
 1111111111111111111111111111111111111111111111111111111111111011

Modified: hadoop/hive/trunk/ql/src/test/results/clientpositive/udf_case.q.out
URL: http://svn.apache.org/viewvc/hadoop/hive/trunk/ql/src/test/results/clientpositive/udf_case.q.out?rev=896744&r1=896743&r2=896744&view=diff
==============================================================================
--- hadoop/hive/trunk/ql/src/test/results/clientpositive/udf_case.q.out (original)
+++ hadoop/hive/trunk/ql/src/test/results/clientpositive/udf_case.q.out Thu Jan  7 03:01:26 2010
@@ -1,3 +1,15 @@
+PREHOOK: query: -- Parsing bug requires us to quote case
+DESCRIBE FUNCTION 'case'
+PREHOOK: type: DESCFUNCTION
+POSTHOOK: query: -- Parsing bug requires us to quote case
+DESCRIBE FUNCTION 'case'
+POSTHOOK: type: DESCFUNCTION
+There is no documentation for function case
+PREHOOK: query: DESCRIBE FUNCTION EXTENDED 'case'
+PREHOOK: type: DESCFUNCTION
+POSTHOOK: query: DESCRIBE FUNCTION EXTENDED 'case'
+POSTHOOK: type: DESCFUNCTION
+There is no documentation for function case
 PREHOOK: query: EXPLAIN
 SELECT CASE 1
         WHEN 1 THEN 2
@@ -124,7 +136,7 @@
 FROM src LIMIT 1
 PREHOOK: type: QUERY
 PREHOOK: Input: default@src
-PREHOOK: Output: file:/data/users/njain/hive5/hive5/build/ql/tmp/606727511/10000
+PREHOOK: Output: file:/Users/carl/Projects/hd9/hive-trunk/build/ql/tmp/908511377/10000
 POSTHOOK: query: SELECT CASE 1
         WHEN 1 THEN 2
         WHEN 3 THEN 4
@@ -153,5 +165,5 @@
 FROM src LIMIT 1
 POSTHOOK: type: QUERY
 POSTHOOK: Input: default@src
-POSTHOOK: Output: file:/data/users/njain/hive5/hive5/build/ql/tmp/606727511/10000
+POSTHOOK: Output: file:/Users/carl/Projects/hd9/hive-trunk/build/ql/tmp/908511377/10000
 2	5	15	NULL	20	24

Modified: hadoop/hive/trunk/ql/src/test/results/clientpositive/udf_coalesce.q.out
URL: http://svn.apache.org/viewvc/hadoop/hive/trunk/ql/src/test/results/clientpositive/udf_coalesce.q.out?rev=896744&r1=896743&r2=896744&view=diff
==============================================================================
--- hadoop/hive/trunk/ql/src/test/results/clientpositive/udf_coalesce.q.out (original)
+++ hadoop/hive/trunk/ql/src/test/results/clientpositive/udf_coalesce.q.out Thu Jan  7 03:01:26 2010
@@ -1,3 +1,16 @@
+PREHOOK: query: DESCRIBE FUNCTION coalesce
+PREHOOK: type: DESCFUNCTION
+POSTHOOK: query: DESCRIBE FUNCTION coalesce
+POSTHOOK: type: DESCFUNCTION
+coalesce(a1, a2, ...) - Returns the first non-null argument
+PREHOOK: query: DESCRIBE FUNCTION EXTENDED coalesce
+PREHOOK: type: DESCFUNCTION
+POSTHOOK: query: DESCRIBE FUNCTION EXTENDED coalesce
+POSTHOOK: type: DESCFUNCTION
+coalesce(a1, a2, ...) - Returns the first non-null argument
+Example:
+  > SELECT coalesce(NULL, 1, NULL) FROM src LIMIT 1;
+  1
 PREHOOK: query: EXPLAIN
 SELECT COALESCE(1),
        COALESCE(1, 2),
@@ -127,7 +140,7 @@
 FROM src LIMIT 1
 PREHOOK: type: QUERY
 PREHOOK: Input: default@src
-PREHOOK: Output: file:/data/users/njain/hive5/hive5/build/ql/tmp/1848821474/10000
+PREHOOK: Output: file:/Users/carl/Projects/hd9/hive-trunk/build/ql/tmp/1867907378/10000
 POSTHOOK: query: SELECT COALESCE(1),
        COALESCE(1, 2),
        COALESCE(NULL, 2),
@@ -149,7 +162,7 @@
 FROM src LIMIT 1
 POSTHOOK: type: QUERY
 POSTHOOK: Input: default@src
-POSTHOOK: Output: file:/data/users/njain/hive5/hive5/build/ql/tmp/1848821474/10000
+POSTHOOK: Output: file:/Users/carl/Projects/hd9/hive-trunk/build/ql/tmp/1867907378/10000
 1	1	2	1	3	4	1	1	2	1	3	4	1.0	1.0	2.0	2.0	2.0	NULL
 PREHOOK: query: EXPLAIN
 SELECT COALESCE(src_thrift.lint[1], 999),
@@ -204,14 +217,14 @@
 FROM src_thrift
 PREHOOK: type: QUERY
 PREHOOK: Input: default@src_thrift
-PREHOOK: Output: file:/data/users/njain/hive5/hive5/build/ql/tmp/1800031969/10000
+PREHOOK: Output: file:/Users/carl/Projects/hd9/hive-trunk/build/ql/tmp/791594604/10000
 POSTHOOK: query: SELECT COALESCE(src_thrift.lint[1], 999),
        COALESCE(src_thrift.lintstring[0].mystring, '999'),
        COALESCE(src_thrift.mstringstring['key_2'], '999')
 FROM src_thrift
 POSTHOOK: type: QUERY
 POSTHOOK: Input: default@src_thrift
-POSTHOOK: Output: file:/data/users/njain/hive5/hive5/build/ql/tmp/1800031969/10000
+POSTHOOK: Output: file:/Users/carl/Projects/hd9/hive-trunk/build/ql/tmp/791594604/10000
 0	0	999
 2	1	999
 4	8	value_2



Mime
View raw message