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/10/23 09:45:04 UTC
[incubator-hivemall] branch master updated: Remove
rand_gid/rand_gid2 macro
This is an automated email from the ASF dual-hosted git repository.
myui pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/incubator-hivemall.git
The following commit(s) were added to refs/heads/master by this push:
new 58a42b5 Remove rand_gid/rand_gid2 macro
58a42b5 is described below
commit 58a42b5ac5a831ceeb773b845c8d659cfa189c83
Author: Makoto Yui <my...@apache.org>
AuthorDate: Wed Oct 23 18:44:41 2019 +0900
Remove rand_gid/rand_gid2 macro
## What changes were proposed in this pull request?
Remove rand_gid/rand_gid2 macro
## What type of PR is it?
Hot Fix
## What is the Jira issue?
https://issues.apache.org/jira/browse/HIVEMALL-270
Author: Makoto Yui <my...@apache.org>
Closes #204 from myui/HIVEMALL-270.
---
docs/gitbook/recommend/movielens_cv.md | 2 +-
resources/ddl/define-all.hive | 6 ------
resources/ddl/define-macros.hive | 6 ------
3 files changed, 1 insertion(+), 13 deletions(-)
diff --git a/docs/gitbook/recommend/movielens_cv.md b/docs/gitbook/recommend/movielens_cv.md
index d5e4ca7..4727cb5 100644
--- a/docs/gitbook/recommend/movielens_cv.md
+++ b/docs/gitbook/recommend/movielens_cv.md
@@ -33,7 +33,7 @@ drop table ratings_groupded;
create table ratings_groupded
as
select
- rand_gid2(${kfold}, ${seed}) gid, -- generates group id ranging from 1 to 10
+ floor(rand(${seed})*${kfold}) gid, -- generates group id ranging from 1 to 10
userid,
movieid,
rating
diff --git a/resources/ddl/define-all.hive b/resources/ddl/define-all.hive
index 2658e5e..4efae3a 100644
--- a/resources/ddl/define-all.hive
+++ b/resources/ddl/define-all.hive
@@ -892,12 +892,6 @@ if(x>y,x,y);
create temporary macro min2(x DOUBLE, y DOUBLE)
if(x<y,x,y);
-create temporary macro rand_gid(k INT)
-floor(rand()*k);
-
-create temporary macro rand_gid2(k INT, seed INT)
-floor(rand(seed)*k);
-
--------------------------
-- Statistics functions --
--------------------------
diff --git a/resources/ddl/define-macros.hive b/resources/ddl/define-macros.hive
index b902c8f..ff36a44 100644
--- a/resources/ddl/define-macros.hive
+++ b/resources/ddl/define-macros.hive
@@ -18,12 +18,6 @@ if(x>y,x,y);
create temporary macro min2(x DOUBLE, y DOUBLE)
if(x<y,x,y);
-create temporary macro rand_gid(k INT)
-floor(rand()*k);
-
-create temporary macro rand_gid2(k INT, seed INT)
-floor(rand(seed)*k);
-
--------------------------
-- Statistics functions --
--------------------------