### Eclipse Workspace Patch 1.0 #P open src hive code Index: ql/src/java/org/apache/hadoop/hive/ql/exec/FunctionInfo.java =================================================================== --- ql/src/java/org/apache/hadoop/hive/ql/exec/FunctionInfo.java (revision 1220606) +++ ql/src/java/org/apache/hadoop/hive/ql/exec/FunctionInfo.java (working copy) @@ -39,26 +39,31 @@ private GenericUDTF genericUDTF; private GenericUDAFResolver genericUDAFResolver; + + private boolean isInternal; public FunctionInfo(boolean isNative, String displayName, - GenericUDF genericUDF) { + GenericUDF genericUDF, boolean isInternal) { this.isNative = isNative; this.displayName = displayName; this.genericUDF = genericUDF; + this.isInternal=isInternal; } public FunctionInfo(boolean isNative, String displayName, - GenericUDAFResolver genericUDAFResolver) { + GenericUDAFResolver genericUDAFResolver, boolean isInternal) { this.isNative = isNative; this.displayName = displayName; this.genericUDAFResolver = genericUDAFResolver; + this.isInternal=isInternal; } public FunctionInfo(boolean isNative, String displayName, - GenericUDTF genericUDTF) { + GenericUDTF genericUDTF, boolean isInternal) { this.isNative = isNative; this.displayName = displayName; this.genericUDTF = genericUDTF; + this.isInternal=isInternal; } /** @@ -89,7 +94,7 @@ public GenericUDAFResolver getGenericUDAFResolver() { return genericUDAFResolver; } - + /** * Get the Class of the UDF. */ @@ -131,6 +136,13 @@ } /** + * @return TRUE if the function is internal and should not be displayed in show functions command + */ + public boolean isInternal(){ + return isInternal; + } + + /** * @return TRUE if the function is a GenericUDF */ public boolean isGenericUDF() { Index: ql/src/java/org/apache/hadoop/hive/ql/exec/FunctionRegistry.java =================================================================== --- ql/src/java/org/apache/hadoop/hive/ql/exec/FunctionRegistry.java (revision 1220606) +++ ql/src/java/org/apache/hadoop/hive/ql/exec/FunctionRegistry.java (working copy) @@ -29,6 +29,7 @@ import java.util.Map; import java.util.Set; import java.util.TreeSet; +import java.util.Map.Entry; import java.util.regex.Pattern; import java.util.regex.PatternSyntaxException; @@ -333,35 +334,35 @@ registerUDF("xpath_short", UDFXPathShort.class, false); registerGenericUDF("xpath", GenericUDFXPath.class); - registerUDF("+", UDFOPPlus.class, true); - registerUDF("-", UDFOPMinus.class, true); - registerUDF("*", UDFOPMultiply.class, true); - registerUDF("/", UDFOPDivide.class, true); - registerUDF("%", UDFOPMod.class, true); + registerInternalUDF("+", UDFOPPlus.class, true); + registerInternalUDF("-", UDFOPMinus.class, true); + registerInternalUDF("*", UDFOPMultiply.class, true); + registerInternalUDF("/", UDFOPDivide.class, true); + registerInternalUDF("%", UDFOPMod.class, true); registerUDF("div", UDFOPLongDivide.class, true); - registerUDF("&", UDFOPBitAnd.class, true); - registerUDF("|", UDFOPBitOr.class, true); - registerUDF("^", UDFOPBitXor.class, true); - registerUDF("~", UDFOPBitNot.class, true); + registerInternalUDF("&", UDFOPBitAnd.class, true); + registerInternalUDF("|", UDFOPBitOr.class, true); + registerInternalUDF("^", UDFOPBitXor.class, true); + registerInternalUDF("~", UDFOPBitNot.class, true); registerGenericUDF("isnull", GenericUDFOPNull.class); registerGenericUDF("isnotnull", GenericUDFOPNotNull.class); - registerGenericUDF("if", GenericUDFIf.class); - registerGenericUDF("in", GenericUDFIn.class); + registerInternalGenericUDF("if", GenericUDFIf.class); + registerInternalGenericUDF("in", GenericUDFIn.class); registerGenericUDF("and", GenericUDFOPAnd.class); registerGenericUDF("or", GenericUDFOPOr.class); - registerGenericUDF("=", GenericUDFOPEqual.class); - registerGenericUDF("==", GenericUDFOPEqual.class); - registerGenericUDF("!=", GenericUDFOPNotEqual.class); - registerGenericUDF("<>", GenericUDFOPNotEqual.class); - registerGenericUDF("<", GenericUDFOPLessThan.class); - registerGenericUDF("<=", GenericUDFOPEqualOrLessThan.class); - registerGenericUDF(">", GenericUDFOPGreaterThan.class); - registerGenericUDF(">=", GenericUDFOPEqualOrGreaterThan.class); + registerInternalGenericUDF("=", GenericUDFOPEqual.class); + registerInternalGenericUDF("==", GenericUDFOPEqual.class); + registerInternalGenericUDF("!=", GenericUDFOPNotEqual.class); + registerInternalGenericUDF("<>", GenericUDFOPNotEqual.class); + registerInternalGenericUDF("<", GenericUDFOPLessThan.class); + registerInternalGenericUDF("<=", GenericUDFOPEqualOrLessThan.class); + registerInternalGenericUDF(">", GenericUDFOPGreaterThan.class); + registerInternalGenericUDF(">=", GenericUDFOPEqualOrGreaterThan.class); registerGenericUDF("not", GenericUDFOPNot.class); - registerGenericUDF("!", GenericUDFOPNot.class); + registerInternalGenericUDF("!", GenericUDFOPNot.class); registerGenericUDF("ewah_bitmap_and", GenericUDFEWAHBitmapAnd.class); registerGenericUDF("ewah_bitmap_or", GenericUDFEWAHBitmapOr.class); @@ -370,26 +371,26 @@ // Aliases for Java Class Names // These are used in getImplicitConvertUDFMethod - registerUDF(Constants.BOOLEAN_TYPE_NAME, UDFToBoolean.class, false, + registerInternalUDF(Constants.BOOLEAN_TYPE_NAME, UDFToBoolean.class, false, UDFToBoolean.class.getSimpleName()); - registerUDF(Constants.TINYINT_TYPE_NAME, UDFToByte.class, false, + registerInternalUDF(Constants.TINYINT_TYPE_NAME, UDFToByte.class, false, UDFToByte.class.getSimpleName()); - registerUDF(Constants.SMALLINT_TYPE_NAME, UDFToShort.class, false, + registerInternalUDF(Constants.SMALLINT_TYPE_NAME, UDFToShort.class, false, UDFToShort.class.getSimpleName()); - registerUDF(Constants.INT_TYPE_NAME, UDFToInteger.class, false, + registerInternalUDF(Constants.INT_TYPE_NAME, UDFToInteger.class, false, UDFToInteger.class.getSimpleName()); - registerUDF(Constants.BIGINT_TYPE_NAME, UDFToLong.class, false, + registerInternalUDF(Constants.BIGINT_TYPE_NAME, UDFToLong.class, false, UDFToLong.class.getSimpleName()); - registerUDF(Constants.FLOAT_TYPE_NAME, UDFToFloat.class, false, + registerInternalUDF(Constants.FLOAT_TYPE_NAME, UDFToFloat.class, false, UDFToFloat.class.getSimpleName()); - registerUDF(Constants.DOUBLE_TYPE_NAME, UDFToDouble.class, false, + registerInternalUDF(Constants.DOUBLE_TYPE_NAME, UDFToDouble.class, false, UDFToDouble.class.getSimpleName()); - registerUDF(Constants.STRING_TYPE_NAME, UDFToString.class, false, + registerInternalUDF(Constants.STRING_TYPE_NAME, UDFToString.class, false, UDFToString.class.getSimpleName()); - registerGenericUDF(Constants.TIMESTAMP_TYPE_NAME, + registerInternalGenericUDF(Constants.TIMESTAMP_TYPE_NAME, GenericUDFTimestamp.class); - registerGenericUDF(Constants.BINARY_TYPE_NAME, + registerInternalGenericUDF(Constants.BINARY_TYPE_NAME, GenericUDFToBinary.class); // Aggregate functions @@ -432,8 +433,8 @@ registerGenericUDF("named_struct", GenericUDFNamedStruct.class); registerGenericUDF("create_union", GenericUDFUnion.class); - registerGenericUDF("case", GenericUDFCase.class); - registerGenericUDF("when", GenericUDFWhen.class); + registerInternalGenericUDF("case", GenericUDFCase.class); + registerInternalGenericUDF("when", GenericUDFWhen.class); registerGenericUDF("hash", GenericUDFHash.class); registerGenericUDF("coalesce", GenericUDFCoalesce.class); registerGenericUDF("index", GenericUDFIndex.class); @@ -468,22 +469,38 @@ registerUDF(true, functionName, UDFClass, isOperator); } + private static void registerInternalUDF(String functionName, Class UDFClass, + boolean isOperator) { + registerInternalUDF(true, functionName, UDFClass, isOperator); + } + public static void registerUDF(boolean isNative, String functionName, Class UDFClass, boolean isOperator) { registerUDF(isNative, functionName, UDFClass, isOperator, functionName .toLowerCase()); } + private static void registerInternalUDF(boolean isNative, String functionName, + Class UDFClass, boolean isOperator) { + registerInternalUDF(isNative, functionName, UDFClass, isOperator, functionName + .toLowerCase()); + } + public static void registerUDF(String functionName, Class UDFClass, boolean isOperator, String displayName) { registerUDF(true, functionName, UDFClass, isOperator, displayName); } + private static void registerInternalUDF(String functionName, + Class UDFClass, boolean isOperator, String displayName) { + registerInternalUDF(true, functionName, UDFClass, isOperator, displayName); + } + public static void registerUDF(boolean isNative, String functionName, Class UDFClass, boolean isOperator, String displayName) { if (UDF.class.isAssignableFrom(UDFClass)) { FunctionInfo fI = new FunctionInfo(isNative, displayName, - new GenericUDFBridge(displayName, isOperator, UDFClass)); + new GenericUDFBridge(displayName, isOperator, UDFClass), false); mFunctions.put(functionName.toLowerCase(), fI); } else { throw new RuntimeException("Registering UDF Class " + UDFClass @@ -491,6 +508,18 @@ } } + private static void registerInternalUDF(boolean isNative, String functionName, + Class UDFClass, boolean isOperator, String displayName) { + if (UDF.class.isAssignableFrom(UDFClass)) { + FunctionInfo fI = new FunctionInfo(isNative, displayName, + new GenericUDFBridge(displayName, isOperator, UDFClass), true); + mFunctions.put(functionName.toLowerCase(), fI); + } else { + throw new RuntimeException("Registering UDF Class " + UDFClass + + " which does not extend " + UDF.class); + } + } + public static void registerTemporaryGenericUDF(String functionName, Class genericUDFClass) { registerGenericUDF(false, functionName, genericUDFClass); @@ -501,11 +530,16 @@ registerGenericUDF(true, functionName, genericUDFClass); } + private static void registerInternalGenericUDF(String functionName, + Class genericUDFClass) { + registerInternalGenericUDF(true, functionName, genericUDFClass); + } + public static void registerGenericUDF(boolean isNative, String functionName, Class genericUDFClass) { if (GenericUDF.class.isAssignableFrom(genericUDFClass)) { FunctionInfo fI = new FunctionInfo(isNative, functionName, - (GenericUDF) ReflectionUtils.newInstance(genericUDFClass, null)); + (GenericUDF) ReflectionUtils.newInstance(genericUDFClass, null), false); mFunctions.put(functionName.toLowerCase(), fI); } else { throw new RuntimeException("Registering GenericUDF Class " @@ -513,6 +547,18 @@ } } + private static void registerInternalGenericUDF(boolean isNative, String functionName, + Class genericUDFClass) { + if (GenericUDF.class.isAssignableFrom(genericUDFClass)) { + FunctionInfo fI = new FunctionInfo(isNative, functionName, + (GenericUDF) ReflectionUtils.newInstance(genericUDFClass, null), true); + mFunctions.put(functionName.toLowerCase(), fI); + } else { + throw new RuntimeException("Registering GenericUDF Class " + + genericUDFClass + " which does not extend " + GenericUDF.class); + } + } + public static void registerTemporaryGenericUDTF(String functionName, Class genericUDTFClass) { registerGenericUDTF(false, functionName, genericUDTFClass); @@ -527,7 +573,7 @@ Class genericUDTFClass) { if (GenericUDTF.class.isAssignableFrom(genericUDTFClass)) { FunctionInfo fI = new FunctionInfo(isNative, functionName, - (GenericUDTF) ReflectionUtils.newInstance(genericUDTFClass, null)); + (GenericUDTF) ReflectionUtils.newInstance(genericUDTFClass, null), false); mFunctions.put(functionName.toLowerCase(), fI); } else { throw new RuntimeException("Registering GenericUDTF Class " @@ -542,41 +588,77 @@ /** * Returns a set of registered function names. This is used for the CLI * command "SHOW FUNCTIONS;" - * + * * @return set of strings contains function names */ public static Set getFunctionNames() { - return mFunctions.keySet(); + return mFunctions.keySet(); } /** * Returns a set of registered function names. This is used for the CLI * command "SHOW FUNCTIONS 'regular expression';" Returns an empty set when * the regular expression is not valid. - * + * * @param funcPatternStr * regular expression of the interested function names + * + * @param isExcludeInternal + * to exclude the internal function names + * * @return set of strings contains function names */ - public static Set getFunctionNames(String funcPatternStr) { + public static Set getFunctionNames(String funcPatternStr, boolean isExcludeInternal) { Set funcNames = new TreeSet(); + Set funcs; Pattern funcPattern = null; try { funcPattern = Pattern.compile(funcPatternStr); } catch (PatternSyntaxException e) { return funcNames; } - for (String funcName : mFunctions.keySet()) { + if (isExcludeInternal) { + funcs = getFunctionNames(true); + } else { + funcs = getFunctionNames(); + } + for (String funcName : funcs) { if (funcPattern.matcher(funcName).matches()) { funcNames.add(funcName); } } return funcNames; + } /** + * Returns a set of registered function names. This is used for the CLI + * command "SHOW FUNCTIONS;" + * + * @param isExcludeInternal + * to exclude the internal function names + * + * @return set of strings contains function names + */ + public static Set getFunctionNames(boolean isExcludeInternal) { + if (!isExcludeInternal) { + return getFunctionNames(); + } else { + Set funcNames = new HashSet(); + Set> funcs = mFunctions.entrySet(); + for (Entry func : funcs) { + FunctionInfo value = func.getValue(); + if (!value.isInternal()) { + funcNames.add(func.getKey()); + } + } + return funcNames; + } + } + + /** * Returns the set of synonyms of the supplied function. - * + * * @param funcName * the name of the function * @return Set of synonyms for funcName @@ -624,10 +706,10 @@ /** * Find a common class that objects of both TypeInfo a and TypeInfo b can * convert to. This is used for comparing objects of type a and type b. - * + * * When we are comparing string and double, we will always convert both of * them to double and then compare. - * + * * @return null if no common class could be found. */ public static TypeInfo getCommonClassForComparison(TypeInfo a, TypeInfo b) { @@ -648,9 +730,9 @@ /** * Find a common class that objects of both TypeInfo a and TypeInfo b can * convert to. This is used for places other than comparison. - * + * * The common class of string and double is string. - * + * * @return null if no common class could be found. */ public static TypeInfo getCommonClass(TypeInfo a, TypeInfo b) { @@ -704,7 +786,7 @@ /** * Get the GenericUDAF evaluator for the name and argumentClasses. - * + * * @param name * the name of the UDAF * @param argumentTypeInfos @@ -744,6 +826,7 @@ * This method is shared between UDFRegistry and UDAFRegistry. methodName will * be "evaluate" for UDFRegistry, and "aggregate"/"evaluate"/"evaluatePartial" * for UDAFRegistry. + * * @throws UDFArgumentException */ public static Method getMethodInternal(Class udfClass, @@ -774,7 +857,7 @@ public static void registerGenericUDAF(boolean isNative, String functionName, GenericUDAFResolver genericUDAFResolver) { mFunctions.put(functionName.toLowerCase(), new FunctionInfo(isNative, - functionName.toLowerCase(), genericUDAFResolver)); + functionName.toLowerCase(), genericUDAFResolver, false)); } public static void registerTemporaryUDAF(String functionName, @@ -790,7 +873,7 @@ Class udafClass) { mFunctions.put(functionName.toLowerCase(), new FunctionInfo(isNative, functionName.toLowerCase(), new GenericUDAFBridge( - (UDAF) ReflectionUtils.newInstance(udafClass, null)))); + (UDAF) ReflectionUtils.newInstance(udafClass, null)), false)); } public static void unregisterTemporaryUDF(String functionName) throws HiveException { @@ -909,7 +992,7 @@ /** * Gets the closest matching method corresponding to the argument list from a * list of methods. - * + * * @param mlist * The list of methods to inspect. * @param exact @@ -1143,11 +1226,11 @@ /** * Registers the appropriate kind of temporary function based on a class's * type. - * + * * @param functionName name under which to register function - * + * * @param udfClass class implementing UD[A|T]F - * + * * @return true if udfClass's type was recognized (so registration * succeeded); false otherwise */ @@ -1179,9 +1262,9 @@ /** * Registers Hive functions from a plugin jar, using metadata from * the jar's META-INF/class-info.xml. - * + * * @param jarLocation URL for reading jar file - * + * * @param classLoader classloader to use for loading function classes */ public static void registerFunctionsFromPluginJar( Index: ql/src/java/org/apache/hadoop/hive/ql/exec/DDLTask.java =================================================================== --- ql/src/java/org/apache/hadoop/hive/ql/exec/DDLTask.java (revision 1220606) +++ ql/src/java/org/apache/hadoop/hive/ql/exec/DDLTask.java (working copy) @@ -2019,10 +2019,10 @@ Set funcs = null; if (showFuncs.getPattern() != null) { LOG.info("pattern: " + showFuncs.getPattern()); - funcs = FunctionRegistry.getFunctionNames(showFuncs.getPattern()); + funcs = FunctionRegistry.getFunctionNames(showFuncs.getPattern(), true); LOG.info("results : " + funcs.size()); } else { - funcs = FunctionRegistry.getFunctionNames(); + funcs = FunctionRegistry.getFunctionNames(true); } // write the results in the file @@ -2032,8 +2032,6 @@ FileSystem fs = resFile.getFileSystem(conf); outStream = fs.create(resFile); SortedSet sortedFuncs = new TreeSet(funcs); - // To remove the primitive types - sortedFuncs.removeAll(Constants.PrimitiveTypes); Iterator iterFuncs = sortedFuncs.iterator(); while (iterFuncs.hasNext()) { Index: ql/src/test/queries/clientpositive/udf_now.q =================================================================== --- ql/src/test/queries/clientpositive/udf_now.q (revision 0) +++ ql/src/test/queries/clientpositive/udf_now.q (revision 0) @@ -0,0 +1,2 @@ +DESCRIBE FUNCTION now; +DESCRIBE FUNCTION EXTENDED now; \ No newline at end of file Index: ql/src/test/results/clientpositive/show_functions.q.out =================================================================== --- ql/src/test/results/clientpositive/show_functions.q.out (revision 1220606) +++ ql/src/test/results/clientpositive/show_functions.q.out (working copy) @@ -2,22 +2,6 @@ PREHOOK: type: SHOWFUNCTIONS POSTHOOK: query: SHOW FUNCTIONS POSTHOOK: type: SHOWFUNCTIONS -! -!= -% -& -* -+ -- -/ -< -<= -<> -= -== -> ->= -^ abs acos and @@ -29,7 +13,6 @@ atan avg bin -case ceil ceiling coalesce @@ -69,8 +52,6 @@ hex histogram_numeric hour -if -in in_file index instr @@ -152,7 +133,6 @@ var_samp variance weekofyear -when xpath xpath_boolean xpath_double @@ -163,13 +143,21 @@ xpath_short xpath_string year -| -~ PREHOOK: query: SHOW FUNCTIONS '^c.*' PREHOOK: type: SHOWFUNCTIONS POSTHOOK: query: SHOW FUNCTIONS '^c.*' POSTHOOK: type: SHOWFUNCTIONS -case +abs +acos +and +array +array_contains +ascii +asin +assert_true +atan +avg +bin ceil ceiling coalesce @@ -184,50 +172,557 @@ covar_pop covar_samp create_union +date_add +date_sub +datediff +day +dayofmonth +degrees +div +e +elt +ewah_bitmap +ewah_bitmap_and +ewah_bitmap_empty +ewah_bitmap_or +exp +explode +field +find_in_set +floor +from_unixtime +from_utc_timestamp +get_json_object +hash +hex +histogram_numeric +hour +in_file +index +instr +isnotnull +isnull +json_tuple +lcase +length +like +ln +locate +log +log10 +log2 +lower +lpad +ltrim +map +map_keys +map_values +max +min +minute +month +named_struct +negative +ngrams +not +or +parse_url +parse_url_tuple +percentile +percentile_approx +pi +pmod +positive +pow +power +radians +rand +reflect +regexp +regexp_extract +regexp_replace +repeat +reverse +rlike +round +rpad +rtrim +second +sentences +sign +sin +size +space +split +sqrt +stack +std +stddev +stddev_pop +stddev_samp +str_to_map +struct +substr +substring +sum +tan +to_date +to_utc_timestamp +trim +ucase +unhex +union_map +unix_timestamp +upper +var_pop +var_samp +variance +weekofyear +xpath +xpath_boolean +xpath_double +xpath_float +xpath_int +xpath_long +xpath_number +xpath_short +xpath_string +year PREHOOK: query: SHOW FUNCTIONS '.*e$' PREHOOK: type: SHOWFUNCTIONS POSTHOOK: query: SHOW FUNCTIONS '.*e$' POSTHOOK: type: SHOWFUNCTIONS +abs +acos +and +array +array_contains +ascii +asin assert_true -case +atan +avg +bin +ceil +ceiling coalesce +collect_set +concat +concat_ws +context_ngrams +conv +corr +cos +count +covar_pop +covar_samp +create_union +date_add +date_sub +datediff +day +dayofmonth +degrees +div e +elt +ewah_bitmap +ewah_bitmap_and +ewah_bitmap_empty +ewah_bitmap_or +exp explode +field +find_in_set +floor from_unixtime +from_utc_timestamp +get_json_object +hash +hex +histogram_numeric +hour in_file +index +instr +isnotnull +isnull json_tuple lcase +length like +ln locate +log +log10 +log2 +lower +lpad +ltrim +map +map_keys +map_values +max +min minute +month +named_struct negative +ngrams +not +or +parse_url parse_url_tuple percentile +percentile_approx +pi +pmod positive +pow +power +radians +rand +reflect +regexp +regexp_extract regexp_replace +repeat reverse rlike +round +rpad +rtrim +second +sentences +sign +sin size space +split +sqrt +stack +std +stddev +stddev_pop +stddev_samp +str_to_map +struct +substr +substring +sum +tan to_date +to_utc_timestamp +trim ucase +unhex +union_map +unix_timestamp +upper +var_pop +var_samp variance +weekofyear +xpath +xpath_boolean xpath_double +xpath_float +xpath_int +xpath_long +xpath_number +xpath_short +xpath_string +year PREHOOK: query: SHOW FUNCTIONS 'log.*' PREHOOK: type: SHOWFUNCTIONS POSTHOOK: query: SHOW FUNCTIONS 'log.*' POSTHOOK: type: SHOWFUNCTIONS +abs +acos +and +array +array_contains +ascii +asin +assert_true +atan +avg +bin +ceil +ceiling +coalesce +collect_set +concat +concat_ws +context_ngrams +conv +corr +cos +count +covar_pop +covar_samp +create_union +date_add +date_sub +datediff +day +dayofmonth +degrees +div +e +elt +ewah_bitmap +ewah_bitmap_and +ewah_bitmap_empty +ewah_bitmap_or +exp +explode +field +find_in_set +floor +from_unixtime +from_utc_timestamp +get_json_object +hash +hex +histogram_numeric +hour +in_file +index +instr +isnotnull +isnull +json_tuple +lcase +length +like +ln +locate log log10 log2 +lower +lpad +ltrim +map +map_keys +map_values +max +min +minute +month +named_struct +negative +ngrams +not +or +parse_url +parse_url_tuple +percentile +percentile_approx +pi +pmod +positive +pow +power +radians +rand +reflect +regexp +regexp_extract +regexp_replace +repeat +reverse +rlike +round +rpad +rtrim +second +sentences +sign +sin +size +space +split +sqrt +stack +std +stddev +stddev_pop +stddev_samp +str_to_map +struct +substr +substring +sum +tan +to_date +to_utc_timestamp +trim +ucase +unhex +union_map +unix_timestamp +upper +var_pop +var_samp +variance +weekofyear +xpath +xpath_boolean +xpath_double +xpath_float +xpath_int +xpath_long +xpath_number +xpath_short +xpath_string +year PREHOOK: query: SHOW FUNCTIONS '.*date.*' PREHOOK: type: SHOWFUNCTIONS POSTHOOK: query: SHOW FUNCTIONS '.*date.*' POSTHOOK: type: SHOWFUNCTIONS +abs +acos +and +array +array_contains +ascii +asin +assert_true +atan +avg +bin +ceil +ceiling +coalesce +collect_set +concat +concat_ws +context_ngrams +conv +corr +cos +count +covar_pop +covar_samp +create_union date_add date_sub datediff +day +dayofmonth +degrees +div +e +elt +ewah_bitmap +ewah_bitmap_and +ewah_bitmap_empty +ewah_bitmap_or +exp +explode +field +find_in_set +floor +from_unixtime +from_utc_timestamp +get_json_object +hash +hex +histogram_numeric +hour +in_file +index +instr +isnotnull +isnull +json_tuple +lcase +length +like +ln +locate +log +log10 +log2 +lower +lpad +ltrim +map +map_keys +map_values +max +min +minute +month +named_struct +negative +ngrams +not +or +parse_url +parse_url_tuple +percentile +percentile_approx +pi +pmod +positive +pow +power +radians +rand +reflect +regexp +regexp_extract +regexp_replace +repeat +reverse +rlike +round +rpad +rtrim +second +sentences +sign +sin +size +space +split +sqrt +stack +std +stddev +stddev_pop +stddev_samp +str_to_map +struct +substr +substring +sum +tan to_date +to_utc_timestamp +trim +ucase +unhex +union_map +unix_timestamp +upper +var_pop +var_samp +variance +weekofyear +xpath +xpath_boolean +xpath_double +xpath_float +xpath_int +xpath_long +xpath_number +xpath_short +xpath_string +year PREHOOK: query: SHOW FUNCTIONS '***' PREHOOK: type: SHOWFUNCTIONS POSTHOOK: query: SHOW FUNCTIONS '***'