hivemall-issues mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Makoto Yui (Jira)" <j...@apache.org>
Subject [jira] [Created] (HIVEMALL-295) transpose_and_dot throws UDFArgumentException for 0 rows input
Date Mon, 11 May 2020 05:06:00 GMT
Makoto Yui created HIVEMALL-295:
-----------------------------------

             Summary: transpose_and_dot throws UDFArgumentException for 0 rows input
                 Key: HIVEMALL-295
                 URL: https://issues.apache.org/jira/browse/HIVEMALL-295
             Project: Hivemall
          Issue Type: Bug
    Affects Versions: 0.6.0
            Reporter: Makoto Yui
            Assignee: Makoto Yui
             Fix For: 0.6.2


transpose_and_dot throws UDFArgumentException for 0 rows input.

{code:java}
WITH INPUT AS(
  SELECT 
    ARRAY(1.0,2.0,3.0) AS X,
    ARRAY(0,1) AS Y
)
SELECT 
  transpose_and_dot(Y,X) AS observed
FROM
  INPUT
WHERE false

Caused by: org.apache.hadoop.hive.ql.metadata.HiveException: org.apache.hadoop.hive.ql.exec.UDFArgumentException
        at org.apache.hadoop.hive.ql.exec.GroupByOperator.closeOp(GroupByOperator.java:1126)
        at org.apache.hadoop.hive.ql.exec.Operator.close(Operator.java:697)
        at org.apache.hadoop.hive.ql.exec.Operator.close(Operator.java:711)
        at org.apache.hadoop.hive.ql.exec.Operator.close(Operator.java:711)
        at org.apache.hadoop.hive.ql.exec.Operator.close(Operator.java:711)
        at org.apache.hadoop.hive.ql.exec.Operator.close(Operator.java:711)
        at org.apache.hadoop.hive.ql.exec.tez.MapRecordProcessor.close(MapRecordProcessor.java:464)
        ... 15 more
Caused by: org.apache.hadoop.hive.ql.exec.UDFArgumentException
        at sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method)
        at sun.reflect.NativeConstructorAccessorImpl.newInstance(NativeConstructorAccessorImpl.java:62)
        at sun.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingConstructorAccessorImpl.java:45)
        at java.lang.reflect.Constructor.newInstance(Constructor.java:423)
        at java.lang.Class.newInstance(Class.java:442)
        at hivemall.utils.lang.Preconditions.checkNotNull(Preconditions.java:43)
        at hivemall.tools.matrix.TransposeAndDotUDAF$TransposeAndDotUDAFEvaluator.iterate(TransposeAndDotUDAF.java:172)
        at org.apache.hadoop.hive.ql.udf.generic.GenericUDAFEvaluator.aggregate(GenericUDAFEvaluator.java:192)
        at org.apache.hadoop.hive.ql.exec.GroupByOperator.closeOp(GroupByOperator.java:1117)
        ... 21 more
{code}

UDAFs need to care about 0 row.
https://github.com/apache/hive/blob/rel/release-2.3.2/ql/src/java/org/apache/hadoop/hive/ql/exec/GroupByOperator.java#L1102




--
This message was sent by Atlassian Jira
(v8.3.4#803005)

Mime
View raw message