You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@hivemall.apache.org by "Makoto Yui (Jira)" <ji...@apache.org> on 2020/01/28 05:58:00 UTC

[jira] [Created] (HIVEMALL-293) Fix l2_norm UDAF to return DoubleWritable instead of Java double

Makoto Yui created HIVEMALL-293:
-----------------------------------

             Summary: Fix l2_norm UDAF to return DoubleWritable instead of Java double
                 Key: HIVEMALL-293
                 URL: https://issues.apache.org/jira/browse/HIVEMALL-293
             Project: Hivemall
          Issue Type: Bug
    Affects Versions: 0.6.0
            Reporter: Makoto Yui
            Assignee: Makoto Yui
             Fix For: 0.6.2


 
{noformat}
SELECT   
  nvl(nullif(l2_norm(score),0.0),1.0) AS norm 
FROM   
  access_log {noformat}
l2_norm return Java double then [nullif UDF|[https://github.com/apache/hive/blob/master/ql/src/java/org/apache/hadoop/hive/ql/udf/generic/GenericUDFNullif.java]] throws the following error
{code:java}
Caused by: java.lang.ClassCastException: java.lang.Double cannot be cast to org.apache.hadoop.hive.serde2.io.DoubleWritable
	at org.apache.hadoop.hive.serde2.objectinspector.primitive.WritableDoubleObjectInspector.get(WritableDoubleObjectInspector.java:36)
	at org.apache.hadoop.hive.serde2.objectinspector.primitive.PrimitiveObjectInspectorUtils.comparePrimitiveObjects(PrimitiveObjectInspectorUtils.java:403)
	at org.apache.hadoop.hive.ql.udf.generic.GenericUDFNullif.evaluate(GenericUDFNullif.java:95)
	at 
{code}
 

 

 



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