Package org.apache.hadoop.hive.ql.udf.generic

Standard toolkit and framework for generic User-defined functions.

See:
          Description

Interface Summary
Collector Collector gets data from a source.
GenericUDAFEvaluator.AggregationBuffer Deprecated. use GenericUDAFEvaluator.AbstractAggregationBuffer instead
GenericUDAFParameterInfo A callback interface used in conjunction with GenericUDAFResolver2 interface that allows for a more extensible and flexible means of discovering the parameter types provided for UDAF invocation.
GenericUDAFResolver Deprecated. Use GenericUDAFResolver2 instead.
GenericUDAFResolver2 This interface extends the GenericUDAFResolver interface and provides more flexibility in terms of discovering the parameter types supplied to the UDAF.
GenericUDF.DeferredObject A Defered Object allows us to do lazy-evaluation and short-circuiting.
 

Class Summary
AbstractGenericUDAFResolver An abstract class to help facilitate existing implementations of GenericUDAFResolver to migrate towards the newly introduced interface GenericUDAFResolver2.
AbstractGenericUDFEWAHBitmapBop An abstract class for a UDF that performs a binary operation between two EWAH-compressed bitmaps.
AbstractGenericUDFReflect common class for reflective UDFs
DecimalNumDistinctValueEstimator  
DoubleNumDistinctValueEstimator  
GenericUDAFAverage GenericUDAFAverage.
GenericUDAFAverage.AbstractGenericUDAFAverageEvaluator<TYPE>  
GenericUDAFAverage.GenericUDAFAverageEvaluatorDecimal  
GenericUDAFAverage.GenericUDAFAverageEvaluatorDouble  
GenericUDAFBridge This class is a bridge between GenericUDAF and UDAF.
GenericUDAFBridge.GenericUDAFBridgeEvaluator GenericUDAFBridgeEvaluator.
GenericUDAFCollectList  
GenericUDAFCollectSet GenericUDAFCollectSet
GenericUDAFComputeStats GenericUDAFComputeStats
GenericUDAFComputeStats.GenericUDAFBinaryStatsEvaluator GenericUDAFBinaryStatsEvaluator.
GenericUDAFComputeStats.GenericUDAFBinaryStatsEvaluator.BinaryStatsAgg  
GenericUDAFComputeStats.GenericUDAFBooleanStatsEvaluator GenericUDAFBooleanStatsEvaluator.
GenericUDAFComputeStats.GenericUDAFBooleanStatsEvaluator.BooleanStatsAgg  
GenericUDAFComputeStats.GenericUDAFDecimalStatsEvaluator  
GenericUDAFComputeStats.GenericUDAFDecimalStatsEvaluator.DecimalStatsAgg  
GenericUDAFComputeStats.GenericUDAFDoubleStatsEvaluator GenericUDAFDoubleStatsEvaluator.
GenericUDAFComputeStats.GenericUDAFDoubleStatsEvaluator.DoubleStatsAgg  
GenericUDAFComputeStats.GenericUDAFLongStatsEvaluator GenericUDAFLongStatsEvaluator.
GenericUDAFComputeStats.GenericUDAFLongStatsEvaluator.LongStatsAgg  
GenericUDAFComputeStats.GenericUDAFStringStatsEvaluator GenericUDAFStringStatsEvaluator.
GenericUDAFComputeStats.GenericUDAFStringStatsEvaluator.StringStatsAgg  
GenericUDAFContextNGrams Estimates the top-k contextual n-grams in arbitrary sequential data using a heuristic.
GenericUDAFContextNGrams.GenericUDAFContextNGramEvaluator A constant-space heuristic to estimate the top-k contextual n-grams.
GenericUDAFCorrelation Compute the Pearson correlation coefficient corr(x, y), using the following stable one-pass method, based on: "Formulas for Robust, One-Pass Parallel Computation of Covariances and Arbitrary-Order Statistical Moments", Philippe Pebay, Sandia Labs and "The Art of Computer Programming, volume 2: Seminumerical Algorithms", Donald Knuth.
GenericUDAFCorrelation.GenericUDAFCorrelationEvaluator Evaluate the Pearson correlation coefficient using a stable one-pass algorithm, based on work by Philippe Pébay and Donald Knuth.
GenericUDAFCount This class implements the COUNT aggregation function as in SQL.
GenericUDAFCount.GenericUDAFCountEvaluator GenericUDAFCountEvaluator.
GenericUDAFCovariance Compute the covariance covar_pop(x, y), using the following one-pass method (ref.
GenericUDAFCovariance.GenericUDAFCovarianceEvaluator Evaluate the variance using the algorithm described in http://en.wikipedia.org/wiki/Algorithms_for_calculating_variance, presumably by Pébay, Philippe (2008), in "Formulas for Robust, One-Pass Parallel Computation of Covariances and Arbitrary-Order Statistical Moments", Technical Report SAND2008-6212, Sandia National Laboratories, http://infoserve.sandia.gov/sand_doc/2008/086212.pdf Incremental: n : mx_n = mx_(n-1) + [x_n - mx_(n-1)]/n : my_n = my_(n-1) + [y_n - my_(n-1)]/n : c_n = c_(n-1) + (x_n - mx_(n-1))*(y_n - my_n) : Merge: c_X = c_A + c_B + (mx_A - mx_B)*(my_A - my_B)*n_A*n_B/n_X This one-pass algorithm is stable.
GenericUDAFCovarianceSample Compute the sample covariance by extending GenericUDAFCovariance and overriding the terminate() method of the evaluator.
GenericUDAFCovarianceSample.GenericUDAFCovarianceSampleEvaluator Compute the sample covariance by extending GenericUDAFCovarianceEvaluator and overriding the terminate() method of the evaluator.
GenericUDAFCumeDist  
GenericUDAFCumeDist.GenericUDAFCumeDistEvaluator  
GenericUDAFDenseRank  
GenericUDAFDenseRank.GenericUDAFDenseRankEvaluator  
GenericUDAFEvaluator A Generic User-defined aggregation function (GenericUDAF) for the use with Hive.
GenericUDAFEvaluator.AbstractAggregationBuffer  
GenericUDAFEWAHBitmap GenericUDAFEWAHBitmap.
GenericUDAFEWAHBitmap.GenericUDAFEWAHBitmapEvaluator  
GenericUDAFFirstValue  
GenericUDAFFirstValue.GenericUDAFFirstValueEvaluator  
GenericUDAFHistogramNumeric Computes an approximate histogram of a numerical column using a user-specified number of bins.
GenericUDAFHistogramNumeric.GenericUDAFHistogramNumericEvaluator Construct a histogram using an algorithm described by Ben-Haim and Tom-Tov.
GenericUDAFLag  
GenericUDAFLag.GenericUDAFLagEvaluator  
GenericUDAFLastValue  
GenericUDAFLastValue.GenericUDAFLastValueEvaluator  
GenericUDAFLead  
GenericUDAFLead.GenericUDAFLeadEvaluator  
GenericUDAFLeadLag abstract class for Lead & lag UDAFs GenericUDAFLeadLag.
GenericUDAFLeadLag.GenericUDAFLeadLagEvaluator  
GenericUDAFMax  
GenericUDAFMax.GenericUDAFMaxEvaluator  
GenericUDAFMin  
GenericUDAFMin.GenericUDAFMinEvaluator  
GenericUDAFMkCollectionEvaluator  
GenericUDAFnGrams Estimates the top-k n-grams in arbitrary sequential data using a heuristic.
GenericUDAFnGrams.GenericUDAFnGramEvaluator A constant-space heuristic to estimate the top-k n-grams.
GenericUDAFNTile  
GenericUDAFNTile.GenericUDAFNTileEvaluator  
GenericUDAFPercentileApprox Computes an approximate percentile (quantile) from an approximate histogram, for very large numbers of rows where the regular percentile() UDAF might run out of memory.
GenericUDAFPercentileApprox.GenericUDAFMultiplePercentileApproxEvaluator  
GenericUDAFPercentileApprox.GenericUDAFPercentileApproxEvaluator Construct a histogram using the algorithm described by Ben-Haim and Tom-Tov, and then use it to compute an approximate percentile value.
GenericUDAFPercentileApprox.GenericUDAFSinglePercentileApproxEvaluator  
GenericUDAFPercentRank  
GenericUDAFPercentRank.GenericUDAFPercentRankEvaluator  
GenericUDAFRank  
GenericUDAFRank.GenericUDAFRankEvaluator  
GenericUDAFRowNumber  
GenericUDAFRowNumber.GenericUDAFRowNumberEvaluator  
GenericUDAFStd Compute the standard deviation by extending GenericUDAFVariance and overriding the terminate() method of the evaluator.
GenericUDAFStd.GenericUDAFStdEvaluator Compute the standard deviation by extending GenericUDAFVarianceEvaluator and overriding the terminate() method of the evaluator.
GenericUDAFStdSample Compute the sample standard deviation by extending GenericUDAFVariance and overriding the terminate() method of the evaluator.
GenericUDAFStdSample.GenericUDAFStdSampleEvaluator Compute the sample standard deviation by extending GenericUDAFVarianceEvaluator and overriding the terminate() method of the evaluator.
GenericUDAFSum GenericUDAFSum.
GenericUDAFSum.GenericUDAFSumDouble GenericUDAFSumDouble.
GenericUDAFSum.GenericUDAFSumHiveDecimal GenericUDAFSumHiveDecimal.
GenericUDAFSum.GenericUDAFSumLong GenericUDAFSumLong.
GenericUDAFVariance Compute the variance.
GenericUDAFVariance.GenericUDAFVarianceEvaluator Evaluate the variance using the algorithm described by Chan, Golub, and LeVeque in "Algorithms for computing the sample variance: analysis and recommendations" The American Statistician, 37 (1983) pp.
GenericUDAFVarianceSample Compute the sample variance by extending GenericUDAFVariance and overriding the terminate() method of the evaluator.
GenericUDAFVarianceSample.GenericUDAFVarianceSampleEvaluator Compute the sample variance by extending GenericUDAFVarianceEvaluator and overriding the terminate() method of the evaluator.
GenericUDF A Generic User-defined function (GenericUDF) for the use with Hive.
GenericUDF.DeferredJavaObject A basic dummy implementation of DeferredObject which just stores a Java Object reference.
GenericUDFAbs GenericUDFAbs.
GenericUDFArray GenericUDFArray.
GenericUDFArrayContains GenericUDFArrayContains.
GenericUDFAssertTrue GenericUDFAssertTrue
GenericUDFBaseCompare GenericUDF Base Class for operations.
GenericUDFBaseNumeric GenericUDF Base Class for operations.
GenericUDFBasePad  
GenericUDFBaseTrim  
GenericUDFBaseUnary  
GenericUDFBetween  
GenericUDFBridge GenericUDFBridge encapsulates UDF to provide the same interface as GenericUDF.
GenericUDFCase GenericUDF Class for SQL construct "CASE a WHEN b THEN c [ELSE f] END".
GenericUDFCeil  
GenericUDFCoalesce GenericUDF Class for SQL construct "COALESCE(a, b, c)".
GenericUDFConcat GenericUDFConcat.
GenericUDFConcatWS Generic UDF for string function CONCAT_WS(sep, [string | array(string)]+).
GenericUDFDate UDFDate.
GenericUDFDateAdd UDFDateAdd.
GenericUDFDateDiff UDFDateDiff.
GenericUDFDateSub UDFDateSub.
GenericUDFDecode  
GenericUDFElt Generic UDF for string function ELT(N,str1,str2,str3,...).
GenericUDFEncode  
GenericUDFEWAHBitmapAnd GenericEWAHUDFBitmapAnd.
GenericUDFEWAHBitmapEmpty  
GenericUDFEWAHBitmapOr GenericUDFEWAHBitmapOr.
GenericUDFField GenericUDFField.
GenericUDFFloor  
GenericUDFFloorCeilBase  
GenericUDFFormatNumber Generic UDF for format_number function FORMAT_NUMBER(X, D).
GenericUDFFromUtcTimestamp  
GenericUDFHash GenericUDF Class for computing hash values.
GenericUDFIf IF(expr1,expr2,expr3)
If expr1 is TRUE (expr1 <> 0 and expr1 <> NULL) then IF() returns expr2; otherwise it returns expr3.
GenericUDFIn GenericUDFIn Example usage: SELECT key FROM src WHERE key IN ("238", "1"); From MySQL page on IN(): To comply with the SQL standard, IN returns NULL not only if the expression on the left hand side is NULL, but also if no match is found in the list and one of the expressions in the list is NULL.
GenericUDFIndex GenericUDFIndex.
GenericUDFInFile IN_FILE(str, filename) returns true if 'str' appears in the file specified by 'filename'.
GenericUDFInstr Generic UDF for string function INSTR(str,substr).
GenericUDFLag  
GenericUDFLead  
GenericUDFLeadLag  
GenericUDFLocate Generic UDF for string function LOCATE(substr, str), LOCATE(substr, str, start).
GenericUDFLower UDFLower.
GenericUDFLpad UDFLpad.
GenericUDFLTrim UDFLTrim.
GenericUDFMacro GenericUDFMacro wraps a user-defined macro expression into a GenericUDF interface.
GenericUDFMap GenericUDFMap.
GenericUDFMapKeys GenericUDFMapKeys.
GenericUDFMapValues GenericUDFMapValues.
GenericUDFNamedStruct  
GenericUDFNvl  
GenericUDFOPAnd GenericUDF Class for computing and.
GenericUDFOPDivide Note that in SQL, the return type of divide is not necessarily the same as the parameters.
GenericUDFOPEqual GenericUDF Class for operation EQUAL.
GenericUDFOPEqualNS  
GenericUDFOPEqualOrGreaterThan GenericUDF Class for operation EqualOrGreaterThan.
GenericUDFOPEqualOrLessThan GenericUDF Class for operation EqualOrLessThan.
GenericUDFOPGreaterThan GenericUDF Class for operation GreaterThan.
GenericUDFOPLessThan GenericUDF Class for operation LessThan.
GenericUDFOPMinus  
GenericUDFOPMod  
GenericUDFOPMultiply  
GenericUDFOPNegative  
GenericUDFOPNot GenericUDFOPNot.
GenericUDFOPNotEqual GenericUDF Class for operation Not EQUAL.
GenericUDFOPNotNull GenericUDFOPNotNull.
GenericUDFOPNull GenericUDFOPNull.
GenericUDFOPOr GenericUDF Class for computing or.
GenericUDFOPPlus The reason that we list evaluate methods with all numeric types is for both better performance and type checking (so we know int + int is still an int instead of a double); otherwise a single method that takes (Number a, Number b) and use a.doubleValue() == b.doubleValue() is enough.
GenericUDFOPPositive  
GenericUDFPosMod class for computing positive modulo.
GenericUDFPower  
GenericUDFPrintf Generic UDF for printf function printf(String format, Obj...
GenericUDFReflect A simple generic udf to call java static functions via reflection.
GenericUDFReflect2 A simple generic udf to call java functions via reflection.
GenericUDFRound Note: rounding function permits rounding off integer digits in decimal numbers, which essentially downgrades the scale to negative territory.
GenericUDFRpad UDFRpad.
GenericUDFRTrim UDFRTrim.
GenericUDFSentences GenericUDFSentences: splits a natural language chunk of text into sentences and words.
GenericUDFSize GenericUDFSize.
GenericUDFSortArray Generic UDF for array sort SORT_ARRAY(array(obj1, obj2, obj3...)).
GenericUDFSplit GenericUDFSplit.
GenericUDFStringToMap GenericUDFStringToMap.
GenericUDFStruct  
GenericUDFTimestamp GenericUDFTimestamp Example usage: ...
GenericUDFToBinary  
GenericUDFToChar  
GenericUDFToDate GenericUDFToDate
GenericUDFToDecimal  
GenericUDFToUnixTimeStamp deterministic version of UDFUnixTimeStamp.
GenericUDFToUtcTimestamp  
GenericUDFToVarchar  
GenericUDFTranslate TRANSLATE(string input, string from, string to) is an equivalent function to translate in PostGresSQL.
GenericUDFTrim UDFTrim.
GenericUDFUnion  
GenericUDFUnixTimeStamp  
GenericUDFUpper UDFUpper.
GenericUDFUtils Util functions for GenericUDF classes.
GenericUDFUtils.ConversionHelper Convert parameters for the method if needed.
GenericUDFUtils.ReturnObjectInspectorResolver This class helps to find the return ObjectInspector for a GenericUDF.
GenericUDFUtils.StringHelper Helper class for UDFs returning string/varchar/char
GenericUDFWhen GenericUDF Class for SQL construct "CASE WHEN a THEN b WHEN c THEN d [ELSE f] END".
GenericUDTF A Generic User-defined Table Generating Function (UDTF) Generates a variable number of output rows for a single input row.
GenericUDTFExplode GenericUDTFExplode.
GenericUDTFInline  
GenericUDTFJSONTuple GenericUDTFJSONTuple: this
GenericUDTFParseUrlTuple GenericUDTFParseUrlTuple: this
GenericUDTFPosExplode PosExplode.
GenericUDTFStack Takes a row of size k of data and splits it into n rows of data.
LongNumDistinctValueEstimator  
NGramEstimator A generic, re-usable n-gram estimation class that supports partial aggregations.
NumDistinctValueEstimator  
NumericHistogram A generic, re-usable histogram class that supports partial aggregations.
RoundUtils Utility class for generic round UDF.
SimpleGenericUDAFParameterInfo A simple implementation of GenericUDAFParameterInfo.
StringNumDistinctValueEstimator  
UDFCurrentDB  
UDTFCollector UDTFCollector collects data from a GenericUDTF and passes the data to a UDTFOperator.
 

Enum Summary
GenericUDAFEvaluator.Mode Mode.
GenericUDFBaseCompare.CompareType  
 

Annotation Types Summary
GenericUDAFEvaluator.AggregationType  
 

Package org.apache.hadoop.hive.ql.udf.generic Description

Standard toolkit and framework for generic User-defined functions.



Copyright © 2014 The Apache Software Foundation. All rights reserved.