Repository: incubator-hivemall
Updated Branches:
  refs/heads/master 389a9e331 -> 247e1aef8


Added documentation about rownum()


Project: http://git-wip-us.apache.org/repos/asf/incubator-hivemall/repo
Commit: 
http://git-wip-us.apache.org/repos/asf/incubator-hivemall/commit/247e1aef
Tree: http://git-wip-us.apache.org/repos/asf/incubator-hivemall/tree/247e1aef
Diff: http://git-wip-us.apache.org/repos/asf/incubator-hivemall/diff/247e1aef

Branch: refs/heads/master
Commit: 247e1aef87ddc789dacfb74e469263e7e2ab603e
Parents: 389a9e3
Author: myui <[email protected]>
Authored: Fri Feb 10 21:07:43 2017 +0900
Committer: myui <[email protected]>
Committed: Fri Feb 10 21:07:43 2017 +0900

----------------------------------------------------------------------
 docs/gitbook/tips/rowid.md | 16 +++++++++++++---
 1 file changed, 13 insertions(+), 3 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/incubator-hivemall/blob/247e1aef/docs/gitbook/tips/rowid.md
----------------------------------------------------------------------
diff --git a/docs/gitbook/tips/rowid.md b/docs/gitbook/tips/rowid.md
index ed6431e..3abebdc 100644
--- a/docs/gitbook/tips/rowid.md
+++ b/docs/gitbook/tips/rowid.md
@@ -20,13 +20,23 @@
 <!-- toc -->
 
 # Rowid generator provided in Hivemall
-You can use [rowid() 
function](https://github.com/myui/hivemall/blob/master/src/main/java/hivemall/tools/mapred/RowIdUDF.java)
 to generate an unique rowid in Hivemall v0.2 or later.
+You can use [rowid() 
function](https://github.com/apache/incubator-hivemall/blob/master/core/src/main/java/hivemall/tools/mapred/RowIdUDF.java)
 to generate an unique rowid in Hivemall v0.2 or later.
 ```sql
 select
-  rowid() as rowid, -- returns ${task_id}-${sequence_number}
+  rowid() as rowid, -- returns ${task_id}-${sequence_number} as string
   *
 from 
-  xxx
+  xxx;
+```
+
+Also, 
[rownum()](https://github.com/apache/incubator-hivemall/blob/master/core/src/main/java/hivemall/tools/mapred/RowNumberUDF.java)
 is supported since Hivemall v0.5-rc.1 or later.
+
+```sql
+select
+  rownum() as rowid, -- returns sprintf(`%d%04d`,sequence,taskId) as long
+  *
+from
+  xxx;
 ```
 
 # Other Rowid generation schemes using SQL

Reply via email to