myui/hivemall

Fixed a corner case bug in mf_predict

Closed this issue · 1 comments

myui commented

mf_predict UDF should be GenericUDF to cope with this issue.

hive> select mf_predict(null,null,0.0,0.0);

0.0

select mf_predict(null,null,0.0,null);

FAILED: SemanticException [Error 10014]: Line 1:7 Wrong arguments 'TOK_NULL': org.apache.hadoop.hive.ql.metadata.HiveException: Unable to execute method public org.apache.hadoop.io.FloatWritable hivemall.mf.MFPredictionUDF.evaluate(java.util.List,java.util.List,double,double) throws org.apache.hadoop.hive.ql.metadata.HiveException on object hivemall.mf.MFPredictionUDF of class hivemall.mf.MFPredictionUDF with arguments {null, null, 0.0:java.lang.Double, null} of size 4

myui commented

Fixed in PR #311 [4282b6a]