Description
54 GenericUDF derived classes have very similar getDisplayString impl which returns "fname(child1, child2, childn)"
instr() and locate() have bugs in their implementation (no comma btw children)
Instead of having 54 implementations of the same method it's better to move standard implementation to the base class.
affected UDF classes:
contrib/src/java/org/apache/hadoop/hive/contrib/genericudf/example/GenericUDFDBOutput.java itests/util/src/main/java/org/apache/hadoop/hive/ql/udf/generic/GenericUDFEvaluateNPE.java itests/util/src/main/java/org/apache/hadoop/hive/ql/udf/generic/GenericUDFTestGetJavaBoolean.java itests/util/src/main/java/org/apache/hadoop/hive/ql/udf/generic/GenericUDFTestGetJavaString.java itests/util/src/main/java/org/apache/hadoop/hive/ql/udf/generic/GenericUDFTestTranslate.java ql/src/java/org/apache/hadoop/hive/ql/udf/generic/AbstractGenericUDFEWAHBitmapBop.java ql/src/java/org/apache/hadoop/hive/ql/udf/generic/AbstractGenericUDFReflect.java ql/src/java/org/apache/hadoop/hive/ql/udf/generic/GenericUDF.java ql/src/java/org/apache/hadoop/hive/ql/udf/generic/GenericUDFAbs.java ql/src/java/org/apache/hadoop/hive/ql/udf/generic/GenericUDFAddMonths.java ql/src/java/org/apache/hadoop/hive/ql/udf/generic/GenericUDFArray.java ql/src/java/org/apache/hadoop/hive/ql/udf/generic/GenericUDFAssertTrue.java ql/src/java/org/apache/hadoop/hive/ql/udf/generic/GenericUDFBaseNumeric.java ql/src/java/org/apache/hadoop/hive/ql/udf/generic/GenericUDFBasePad.java ql/src/java/org/apache/hadoop/hive/ql/udf/generic/GenericUDFBaseTrim.java ql/src/java/org/apache/hadoop/hive/ql/udf/generic/GenericUDFCoalesce.java ql/src/java/org/apache/hadoop/hive/ql/udf/generic/GenericUDFConcat.java ql/src/java/org/apache/hadoop/hive/ql/udf/generic/GenericUDFConcatWS.java ql/src/java/org/apache/hadoop/hive/ql/udf/generic/GenericUDFDate.java ql/src/java/org/apache/hadoop/hive/ql/udf/generic/GenericUDFDateAdd.java ql/src/java/org/apache/hadoop/hive/ql/udf/generic/GenericUDFDateDiff.java ql/src/java/org/apache/hadoop/hive/ql/udf/generic/GenericUDFDateSub.java ql/src/java/org/apache/hadoop/hive/ql/udf/generic/GenericUDFDecode.java ql/src/java/org/apache/hadoop/hive/ql/udf/generic/GenericUDFEWAHBitmapEmpty.java ql/src/java/org/apache/hadoop/hive/ql/udf/generic/GenericUDFElt.java ql/src/java/org/apache/hadoop/hive/ql/udf/generic/GenericUDFEncode.java ql/src/java/org/apache/hadoop/hive/ql/udf/generic/GenericUDFField.java ql/src/java/org/apache/hadoop/hive/ql/udf/generic/GenericUDFFloorCeilBase.java ql/src/java/org/apache/hadoop/hive/ql/udf/generic/GenericUDFFormatNumber.java ql/src/java/org/apache/hadoop/hive/ql/udf/generic/GenericUDFGreatest.java ql/src/java/org/apache/hadoop/hive/ql/udf/generic/GenericUDFHash.java ql/src/java/org/apache/hadoop/hive/ql/udf/generic/GenericUDFIf.java ql/src/java/org/apache/hadoop/hive/ql/udf/generic/GenericUDFInFile.java ql/src/java/org/apache/hadoop/hive/ql/udf/generic/GenericUDFInitCap.java ql/src/java/org/apache/hadoop/hive/ql/udf/generic/GenericUDFInstr.java ql/src/java/org/apache/hadoop/hive/ql/udf/generic/GenericUDFLastDay.java ql/src/java/org/apache/hadoop/hive/ql/udf/generic/GenericUDFLeadLag.java ql/src/java/org/apache/hadoop/hive/ql/udf/generic/GenericUDFLocate.java ql/src/java/org/apache/hadoop/hive/ql/udf/generic/GenericUDFLower.java ql/src/java/org/apache/hadoop/hive/ql/udf/generic/GenericUDFMacro.java ql/src/java/org/apache/hadoop/hive/ql/udf/generic/GenericUDFMapKeys.java ql/src/java/org/apache/hadoop/hive/ql/udf/generic/GenericUDFMapValues.java ql/src/java/org/apache/hadoop/hive/ql/udf/generic/GenericUDFNamedStruct.java ql/src/java/org/apache/hadoop/hive/ql/udf/generic/GenericUDFPower.java ql/src/java/org/apache/hadoop/hive/ql/udf/generic/GenericUDFPrintf.java ql/src/java/org/apache/hadoop/hive/ql/udf/generic/GenericUDFRound.java ql/src/java/org/apache/hadoop/hive/ql/udf/generic/GenericUDFSentences.java ql/src/java/org/apache/hadoop/hive/ql/udf/generic/GenericUDFSize.java ql/src/java/org/apache/hadoop/hive/ql/udf/generic/GenericUDFSortArray.java ql/src/java/org/apache/hadoop/hive/ql/udf/generic/GenericUDFSplit.java ql/src/java/org/apache/hadoop/hive/ql/udf/generic/GenericUDFStringToMap.java ql/src/java/org/apache/hadoop/hive/ql/udf/generic/GenericUDFStruct.java ql/src/java/org/apache/hadoop/hive/ql/udf/generic/GenericUDFTranslate.java ql/src/java/org/apache/hadoop/hive/ql/udf/generic/GenericUDFUpper.java
Attachments
Attachments
Issue Links
- links to