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] [Updated] (HIVEMALL-293) Fix l2_norm UDAF to return DoubleWritable instead of Java double
Date Tue, 28 Jan 2020 05:59:00 GMT

     [ https://issues.apache.org/jira/browse/HIVEMALL-293?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
]

Makoto Yui updated HIVEMALL-293:
--------------------------------
    Description: 
 
{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}
 

 

 

  was:
 
{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}
 

 

 


> 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
>            Priority: Minor
>             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)

Mime
View raw message