You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@hivemall.apache.org by my...@apache.org on 2019/06/10 06:51:21 UTC
[incubator-hivemall] 06/10: Revised UDF comment
This is an automated email from the ASF dual-hosted git repository.
myui pushed a commit to branch HIVEMALL-253-2
in repository https://gitbox.apache.org/repos/asf/incubator-hivemall.git
commit dde8ec9a85a914e1515b605a606061c8db48bac8
Author: Makoto Yui <my...@apache.org>
AuthorDate: Mon Jun 10 15:40:19 2019 +0900
Revised UDF comment
---
core/src/main/java/hivemall/tools/map/MapRouletteUDF.java | 5 ++---
1 file changed, 2 insertions(+), 3 deletions(-)
diff --git a/core/src/main/java/hivemall/tools/map/MapRouletteUDF.java b/core/src/main/java/hivemall/tools/map/MapRouletteUDF.java
index 6964d60..084653b 100644
--- a/core/src/main/java/hivemall/tools/map/MapRouletteUDF.java
+++ b/core/src/main/java/hivemall/tools/map/MapRouletteUDF.java
@@ -50,11 +50,10 @@ import org.apache.hadoop.hive.serde2.objectinspector.PrimitiveObjectInspector;
import org.apache.hadoop.hive.serde2.objectinspector.primitive.PrimitiveObjectInspectorUtils;
/**
- * The map_roulette() can be use to do roulette, according to each map.entry 's weight.
+ * The map_roulette returns a map key based on weighted random sampling of map values.
*/
@Description(name = "map_roulette", value = "_FUNC_(Map<K, number> map)"
- + " - Returns the key K which determine to its weight , the bigger weight is ,the more probability K will return. "
- + "Number is a probability value or a positive weight")
+ + " - Returns a map key based on weighted random sampling of map values")
@UDFType(deterministic = false, stateful = false) // it is false because it return value base on probability
public class MapRouletteUDF extends GenericUDF {