This is an automated email from the ASF dual-hosted git repository. fmcquillan pushed a commit to branch master in repository https://gitbox.apache.org/repos/asf/madlib.git
The following commit(s) were added to refs/heads/master by this push: new f29674b move notes to bottom of page for consistency in user docs f29674b is described below commit f29674b8bf3d500b3dcca38e81356a4a39591bec Author: Frank McQuillan <fmcquil...@pivotal.io> AuthorDate: Mon Feb 8 12:58:26 2021 -0800 move notes to bottom of page for consistency in user docs --- src/ports/postgres/modules/graph/apsp.sql_in | 26 +++++++++++----------- src/ports/postgres/modules/graph/bfs.sql_in | 28 ++++++++++++------------ src/ports/postgres/modules/graph/hits.sql_in | 22 +++++++++---------- src/ports/postgres/modules/graph/pagerank.sql_in | 10 ++++++--- src/ports/postgres/modules/graph/sssp.sql_in | 28 ++++++++++++------------ src/ports/postgres/modules/graph/wcc.sql_in | 7 ++++++ 6 files changed, 66 insertions(+), 55 deletions(-) diff --git a/src/ports/postgres/modules/graph/apsp.sql_in b/src/ports/postgres/modules/graph/apsp.sql_in index 893cd79..bab6d83 100644 --- a/src/ports/postgres/modules/graph/apsp.sql_in +++ b/src/ports/postgres/modules/graph/apsp.sql_in @@ -34,8 +34,8 @@ m4_include(`SQLCommon.m4') <div class="toc"><b>Contents</b> <ul> <li><a href="#apsp">APSP</a></li> -<li><a href="#notes">Notes</a></li> <li><a href="#examples">Examples</a></li> +<li><a href="#notes">Notes</a></li> <li><a href="#literature">Literature</a></li> </ul> </div> @@ -159,18 +159,6 @@ It contains a row for every group and has the following columns: </dl> -@anchor notes -@par Notes - -Graphs with negative edges are supported but graphs with negative cycles are not. - -The implementation is analogous to a matrix multiplication procedure. -Please refer to the MADlib design document and references [1] and [2] -for more details. - -Also see the Grail project [3] for more background on graph analytics processing -in relational databases. - @anchor examples @examp @@ -369,6 +357,18 @@ SELECT * FROM out_gr_path ORDER BY grp; 1 | {0,4,5} </pre> +@anchor notes +@par Notes + +1. Graphs with negative edges are supported but graphs with negative cycles are not. + +2. The implementation for APSP is analogous to a matrix multiplication operation. +Please refer to the MADlib design document and references [1] and [2] +for more details. + +3. Also see the Grail project [3] for more background on graph analytics processing +in relational databases. + @anchor literature @par Literature diff --git a/src/ports/postgres/modules/graph/bfs.sql_in b/src/ports/postgres/modules/graph/bfs.sql_in index f9507d9..d2474f0 100644 --- a/src/ports/postgres/modules/graph/bfs.sql_in +++ b/src/ports/postgres/modules/graph/bfs.sql_in @@ -33,8 +33,8 @@ m4_include(`SQLCommon.m4') <div class="toc"><b>Contents</b> <ul> <li><a href="#bfs">Breadth-First Search</a></li> -<li><a href="#notes">Notes</a></li> <li><a href="#examples">Examples</a></li> +<li><a href="#notes">Notes</a></li> <li><a href="#literature">Literature</a></li> </ul> </div> @@ -130,19 +130,6 @@ and a single BFS result is generated. </dl> -@note On a Greenplum cluster, the edge table should be distributed -by the source vertex id column for better performance. - -@anchor notes -@par Notes - -The graph_bfs function is a SQL implementation of the well-known breadth-first -search algorithm [1] modified appropriately for a relational database. It will -find any node in the graph reachable from the source_vertex only once. If a node -is reachable by many different paths from the source_vertex (i.e. has more than -one parent), then only one of those parents is present in the output table. -The BFS result will, in general, be different for different choices of source_vertex. - @anchor examples @examp @@ -388,6 +375,19 @@ SELECT * FROM out_gr ORDER BY g1,g2,dist,id; (7 rows) </pre> +@anchor notes +@par Notes + +1. On a Greenplum cluster, the edge table should be distributed +by the source vertex id column for better performance. + +2. The graph_bfs function is a SQL implementation of the well-known breadth-first +search algorithm [1] modified appropriately for a relational database. It will +find any node in the graph reachable from the 'source_vertex' only once. If a node +is reachable by many different paths from the 'source_vertex' (i.e. has more than +one parent), then only one of those parents is present in the output table. +The BFS result will, in general, be different for different choices of 'source_vertex'. + @anchor literature @par Literature diff --git a/src/ports/postgres/modules/graph/hits.sql_in b/src/ports/postgres/modules/graph/hits.sql_in index d2d6cfc..6f140c8 100644 --- a/src/ports/postgres/modules/graph/hits.sql_in +++ b/src/ports/postgres/modules/graph/hits.sql_in @@ -34,13 +34,13 @@ m4_include(`SQLCommon.m4') <div class="toc"><b>Contents</b> <ul> <li><a href="#hits">HITS</a></li> -<li><a href="#notes">Notes</a></li> <li><a href="#examples">Examples</a></li> +<li><a href="#notes">Notes</a></li> <li><a href="#literature">Literature</a></li> </ul> </div> -@brief Find the HITS scores(authority and hub) of all vertices in a directed +@brief Find the HITS scores (authority and hub) of all vertices in a directed graph. Given a graph, the HITS (Hyperlink-Induced Topic Search) algorithm outputs the @@ -127,15 +127,6 @@ parameter. </dl> -@note On a Greenplum cluster, the edge table should be distributed -by the source vertex id column for better performance. - -@anchor notes -@par Notes - -This algorithm supports multigraph and each duplicated edge is considered -for counting when calculating authority and hub scores. - @anchor examples @examp @@ -369,6 +360,15 @@ SELECT * FROM hits_out_summary order by user_id; (2 rows) </pre> +@anchor notes +@par Notes + +1. On a Greenplum cluster, the edge table should be distributed +by the source vertex id column for better performance. + +2. This implementation of the HITS algorithm supports multigraph and each duplicated edge is considered +for counting when calculating authority and hub scores. + @anchor literature @par Literature diff --git a/src/ports/postgres/modules/graph/pagerank.sql_in b/src/ports/postgres/modules/graph/pagerank.sql_in index 8338fb6..9adf844 100644 --- a/src/ports/postgres/modules/graph/pagerank.sql_in +++ b/src/ports/postgres/modules/graph/pagerank.sql_in @@ -36,6 +36,7 @@ m4_include(`SQLCommon.m4') <ul> <li><a href="#pagerank">PageRank</a></li> <li><a href="#examples">Examples</a></li> +<li><a href="#notes">Notes</a></li> <li><a href="#literature">Literature</a></li> </ul> </div> @@ -132,9 +133,6 @@ for personalized PageRank. When this parameter is provided, personalized PageRan will run. In the absence of this parameter, regular PageRank will run. </dl> -@note On a Greenplum cluster, the edge table should be distributed -by the source vertex id column for better performance. - @anchor examples @examp @@ -326,6 +324,12 @@ SELECT * FROM pagerank_out_summary; (1 row) </pre> +@anchor notes +@par Notes + +1. On a Greenplum cluster, the edge table should be distributed +by the source vertex id column for better performance. + @anchor literature @par Literature diff --git a/src/ports/postgres/modules/graph/sssp.sql_in b/src/ports/postgres/modules/graph/sssp.sql_in index 195759d..48b3c7d 100644 --- a/src/ports/postgres/modules/graph/sssp.sql_in +++ b/src/ports/postgres/modules/graph/sssp.sql_in @@ -35,8 +35,8 @@ m4_include(`SQLCommon.m4') <div class="toc"><b>Contents</b> <ul> <li><a href="#sssp">SSSP</a></li> -<li><a href="#notes">Notes</a></li> <li><a href="#examples">Examples</a></li> +<li><a href="#notes">Notes</a></li> <li><a href="#literature">Literature</a></li> </ul> </div> @@ -104,9 +104,6 @@ A summary table named <out_table>_summary is also created. This is an internal t <dd>TEXT, default = NULL. List of columns used to group the input into discrete subgraphs. These columns must exist in the edge table. When this value is null, no grouping is used and a single SSSP result is generated. </dd> </dl> -@note On a Greenplum cluster, the edge table should be distributed -by the source vertex id column for better performance. - @par Path Retrieval The path retrieval function returns the shortest path from the @@ -136,16 +133,6 @@ It contains a row for every group and has the following columns: </dl> -@anchor notes -@par Notes - -The Bellman-Ford algorithm [1] is used to implement SSSP. This algorithm allows -negative edges but not negative cycles. In the case of graphs with -negative cycles, an error will be given and no output table will be generated. - -Also see the Grail project [2] for more background on graph analytics processing -in relational databases. - @anchor examples @examp @@ -316,6 +303,19 @@ SELECT * FROM out_gr_path ORDER BY grp; 1 | {0,4,5} </pre> +@anchor notes +@par Notes + +1. On a Greenplum cluster, the edge table should be distributed +by the source vertex id column for better performance. + +2. The Bellman-Ford algorithm [1] is used to implement SSSP. This algorithm allows +negative edges but not negative cycles. In the case of graphs with +negative cycles, an error will be given and no output table will be generated. + +3. Also see the Grail project [2] for more background on graph analytics processing +in relational databases. + @anchor literature @par Literature diff --git a/src/ports/postgres/modules/graph/wcc.sql_in b/src/ports/postgres/modules/graph/wcc.sql_in index ad70e3f..8d4cb87 100644 --- a/src/ports/postgres/modules/graph/wcc.sql_in +++ b/src/ports/postgres/modules/graph/wcc.sql_in @@ -41,6 +41,7 @@ m4_include(`SQLCommon.m4') <li><a href="#reach">Retrieve Reachable Vertices</a></li> <li><a href="#count">Count Connected Components</a></li> <li><a href="#examples">Examples</a></li> +<li><a href="#notes">Notes</a></li> </ul> </div> @@ -488,6 +489,12 @@ SELECT * FROM count_table; (2 rows) </pre> +@anchor notes +@par Notes + +1. On a Greenplum cluster, the edge table should be distributed +by the source vertex id column for better performance. + */ -------------------------------------------------------------------------