You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@madlib.apache.org by nk...@apache.org on 2020/03/24 20:06:33 UTC

[madlib] 02/05: Graph: Add select statements to graph tests

This is an automated email from the ASF dual-hosted git repository.

nkak pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/madlib.git

commit ef763f15c4f008a3ec9cf69b9898bf2918d4f9cf
Author: Nikhil Kak <nk...@pivotal.io>
AuthorDate: Wed Mar 18 17:23:42 2020 -0700

    Graph: Add select statements to graph tests
    
    JIRA: MADLIB-1411
    
    A previous commit https://github.com/apache/madlib/commit/5e05f25e5ab93ff56121336c976523e248876e0a added tests for schema qualified output tables for all graph functions. This commit adds a select statement for the output tables to make sure that the right tables were created.
---
 src/ports/postgres/modules/graph/test/bfs.sql_in      | 2 ++
 src/ports/postgres/modules/graph/test/hits.sql_in     | 2 ++
 src/ports/postgres/modules/graph/test/pagerank.sql_in | 2 ++
 src/ports/postgres/modules/graph/test/sssp.sql_in     | 1 +
 src/ports/postgres/modules/graph/test/wcc.sql_in      | 2 ++
 5 files changed, 9 insertions(+)

diff --git a/src/ports/postgres/modules/graph/test/bfs.sql_in b/src/ports/postgres/modules/graph/test/bfs.sql_in
index 7d04a86..46f97fb 100644
--- a/src/ports/postgres/modules/graph/test/bfs.sql_in
+++ b/src/ports/postgres/modules/graph/test/bfs.sql_in
@@ -296,6 +296,8 @@ CREATE TABLE e2 AS SELECT "SRC"::bigint, dest::bigint, weight FROM "EDGE";
 
 DROP TABLE IF EXISTS pg_temp.out2, pg_temp.out2_summary;
 SELECT graph_bfs('v2',NULL,'e2','src="SRC"',3,'pg_temp.out2');
+SELECT count(*) from pg_temp.out2;
+SELECT * from pg_temp.out2_summary;
 
 -- Test for infinite paths
 DROP TABLE IF EXISTS out, out_summary, out_path;
diff --git a/src/ports/postgres/modules/graph/test/hits.sql_in b/src/ports/postgres/modules/graph/test/hits.sql_in
index 5e474c6..2ef4d63 100644
--- a/src/ports/postgres/modules/graph/test/hits.sql_in
+++ b/src/ports/postgres/modules/graph/test/hits.sql_in
@@ -178,3 +178,5 @@ CREATE TABLE e2 AS SELECT src::bigint, dest::bigint FROM edge;
 
 DROP TABLE IF EXISTS pg_temp.out2, pg_temp.out2_summary;
 SELECT hits('v2',NULL,'e2',NULL,'pg_temp.out2');
+SELECT count(*) from pg_temp.out2;
+SELECT * from pg_temp.out2_summary;
diff --git a/src/ports/postgres/modules/graph/test/pagerank.sql_in b/src/ports/postgres/modules/graph/test/pagerank.sql_in
index c560d4a..22794e9 100644
--- a/src/ports/postgres/modules/graph/test/pagerank.sql_in
+++ b/src/ports/postgres/modules/graph/test/pagerank.sql_in
@@ -214,3 +214,5 @@ CREATE TABLE e2 AS SELECT src::bigint, dest::bigint FROM "EDGE";
 
 DROP TABLE IF EXISTS pg_temp.out2, pg_temp.out2_summary;
 SELECT pagerank('v2',NULL,'e2',NULL,'pg_temp.out2');
+SELECT count(*) from pg_temp.out2;
+SELECT * from pg_temp.out2_summary;
diff --git a/src/ports/postgres/modules/graph/test/sssp.sql_in b/src/ports/postgres/modules/graph/test/sssp.sql_in
index af0eb48..1a01c55 100644
--- a/src/ports/postgres/modules/graph/test/sssp.sql_in
+++ b/src/ports/postgres/modules/graph/test/sssp.sql_in
@@ -163,6 +163,7 @@ CREATE TABLE e2 AS SELECT src::bigint, dest::bigint, weight FROM "EDGE";
 
 DROP TABLE IF EXISTS pg_temp.out2, pg_temp.out2_summary, pg_temp.out2_path;
 SELECT graph_sssp('v2',NULL,'e2',NULL,0,'pg_temp.out2');
+SELECT count(*) from pg_temp.out2;
 SELECT graph_sssp_get_path('pg_temp.out2',5,'pg_temp.out2_path');
 
 -- Test for infinite paths
diff --git a/src/ports/postgres/modules/graph/test/wcc.sql_in b/src/ports/postgres/modules/graph/test/wcc.sql_in
index 7e495cf..6dc5e7f 100644
--- a/src/ports/postgres/modules/graph/test/wcc.sql_in
+++ b/src/ports/postgres/modules/graph/test/wcc.sql_in
@@ -181,3 +181,5 @@ CREATE TABLE e2 AS SELECT src_node::bigint, dest_node::bigint FROM "EDGE";
 
 DROP TABLE IF EXISTS pg_temp.out2, pg_temp.out2_summary;
 SELECT weakly_connected_components('v2',NULL,'e2','src=src_node,dest=dest_node','pg_temp.out2');
+SELECT count(*) from pg_temp.out2;
+SELECT count(*) from pg_temp.out2_summary;