Github user myui commented on a diff in the pull request:

    https://github.com/apache/incubator-hivemall/pull/52#discussion_r103389250
  
    --- Diff: core/src/main/java/hivemall/evaluation/AUCUDAF.java ---
    @@ -49,35 +50,251 @@
     @SuppressWarnings("deprecation")
     @Description(
             name = "auc",
    -        value = "_FUNC_(array rankItems, array correctItems [, const int 
recommendSize = rankItems.size])"
    +        value = "_FUNC_(array rankItems | double score, array correctItems 
| double label "
    +                + "[, const int recommendSize = rankItems.size ])"
                     + " - Returns AUC")
     public final class AUCUDAF extends AbstractGenericUDAFResolver {
     
    -    // prevent instantiation
    -    private AUCUDAF() {}
    -
         @Override
         public GenericUDAFEvaluator getEvaluator(@Nonnull TypeInfo[] typeInfo) 
throws SemanticException {
             if (typeInfo.length != 2 && typeInfo.length != 3) {
                 throw new UDFArgumentTypeException(typeInfo.length - 1,
                     "_FUNC_ takes two or three arguments");
             }
     
    -        ListTypeInfo arg1type = HiveUtils.asListTypeInfo(typeInfo[0]);
    -        if 
(!HiveUtils.isPrimitiveTypeInfo(arg1type.getListElementTypeInfo())) {
    -            throw new UDFArgumentTypeException(0,
    -                "The first argument `array rankItems` is invalid form: " + 
typeInfo[0]);
    +        if (HiveUtils.isNumberTypeInfo(typeInfo[0]) && 
HiveUtils.isNumberTypeInfo(typeInfo[1])) {
    --- End diff --
    
    `&& HiveUtils.isIntegerTypeInfo(typeInfo[1])`


---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at [email protected] or file a JIRA ticket
with INFRA.
---

Reply via email to