Skip to content
This repository has been archived by the owner on Oct 8, 2019. It is now read-only.

Commit

Permalink
Added null check for arguments
Browse files Browse the repository at this point in the history
  • Loading branch information
myui committed Oct 18, 2013
1 parent 138cd80 commit e7759d9
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 0 deletions.
Expand Up @@ -28,6 +28,13 @@
public class ArrayPrefixedHashValuesUDF extends UDF {

public List<String> evaluate(List<String> values, String prefix) {
if(values == null) {
return null;
}
if(prefix == null) {
prefix = "";
}

List<Integer> hashValues = ArrayHashValuesUDF.hashValues(values, null, MurmurHash3UDF.DEFAULT_NUM_FEATURES);
final int len = hashValues.size();
final String[] stringValues = new String[len];
Expand Down
Binary file modified target/hivemall.jar
Binary file not shown.

0 comments on commit e7759d9

Please sign in to comment.