Repository: incubator-madlib Updated Branches: refs/heads/master 0d815f2ba -> 0cdd644a9
Multiple: Fix PCA IC bug - Add comments for disabled IC tests. - Simplify SSSP code. Project: http://git-wip-us.apache.org/repos/asf/incubator-madlib/repo Commit: http://git-wip-us.apache.org/repos/asf/incubator-madlib/commit/0cdd644a Tree: http://git-wip-us.apache.org/repos/asf/incubator-madlib/tree/0cdd644a Diff: http://git-wip-us.apache.org/repos/asf/incubator-madlib/diff/0cdd644a Branch: refs/heads/master Commit: 0cdd644a9d07fdbd0f9ddfdf84964aac8d8fd791 Parents: 0d815f2 Author: Orhan Kislal <okis...@pivotal.io> Authored: Fri Apr 21 13:18:58 2017 -0700 Committer: Orhan Kislal <okis...@pivotal.io> Committed: Fri Apr 21 13:18:58 2017 -0700 ---------------------------------------------------------------------- .../test/elastic_net_install_check.sql_in | 2 + src/ports/postgres/modules/graph/sssp.py_in | 14 +++--- .../postgres/modules/graph/test/pagerank.sql_in | 4 ++ src/ports/postgres/modules/pca/test/pca.sql_in | 52 ++++++++++---------- .../validation/test/cross_validation.sql_in | 3 ++ 5 files changed, 42 insertions(+), 33 deletions(-) ---------------------------------------------------------------------- http://git-wip-us.apache.org/repos/asf/incubator-madlib/blob/0cdd644a/src/ports/postgres/modules/elastic_net/test/elastic_net_install_check.sql_in ---------------------------------------------------------------------- diff --git a/src/ports/postgres/modules/elastic_net/test/elastic_net_install_check.sql_in b/src/ports/postgres/modules/elastic_net/test/elastic_net_install_check.sql_in index cda7549..077afbb 100644 --- a/src/ports/postgres/modules/elastic_net/test/elastic_net_install_check.sql_in +++ b/src/ports/postgres/modules/elastic_net/test/elastic_net_install_check.sql_in @@ -840,6 +840,8 @@ SELECT elastic_net_train( SELECT * FROM house_en; SELECT * FROM house_en_summary; +-- This test has been temporarily removed for GPDB5 alpha support + -- DROP TABLE if exists house_en, house_en_summary, house_en_cv; -- SELECT elastic_net_train( -- 'lin_housing_wi', http://git-wip-us.apache.org/repos/asf/incubator-madlib/blob/0cdd644a/src/ports/postgres/modules/graph/sssp.py_in ---------------------------------------------------------------------- diff --git a/src/ports/postgres/modules/graph/sssp.py_in b/src/ports/postgres/modules/graph/sssp.py_in index 4dbd1b1..a8339a8 100644 --- a/src/ports/postgres/modules/graph/sssp.py_in +++ b/src/ports/postgres/modules/graph/sssp.py_in @@ -316,10 +316,9 @@ def graph_sssp(schema_madlib, vertex_table, vertex_id, edge_table, SELECT {grp_comma} id, {weight}, parent FROM {oldupdate}; """ plpy.execute(sql.format(**locals())) - sql = "DROP TABLE {out_table}" - plpy.execute(sql.format(**locals())) - sql = "ALTER TABLE {temp_table} RENAME TO {out_table}" - plpy.execute(sql.format(**locals())) + plpy.execute("DROP TABLE {0}".format(out_table)) + plpy.execute("ALTER TABLE {0} RENAME TO {1}". + format(temp_table,out_table)) sql = """ CREATE TABLE {temp_table} AS ( SELECT * FROM {out_table} LIMIT 0) {distribution};""" @@ -435,10 +434,9 @@ def graph_sssp(schema_madlib, vertex_table, vertex_id, edge_table, WHERE {checkg_oo_sub} );""" plpy.execute(sql_del.format(**locals())) - sql_del = "DROP TABLE {out_table}" - plpy.execute(sql_del.format(**locals())) - sql_del = "ALTER TABLE {temp_table} RENAME TO {out_table};" - plpy.execute(sql_del.format(**locals())) + plpy.execute("DROP TABLE {0}".format(out_table)) + plpy.execute("ALTER TABLE {0} RENAME TO {1}". + format(temp_table,out_table)) else: sql_del = """ DELETE FROM {out_table} USING {oldupdate} AS oldupdate http://git-wip-us.apache.org/repos/asf/incubator-madlib/blob/0cdd644a/src/ports/postgres/modules/graph/test/pagerank.sql_in ---------------------------------------------------------------------- diff --git a/src/ports/postgres/modules/graph/test/pagerank.sql_in b/src/ports/postgres/modules/graph/test/pagerank.sql_in index 4c02df3..3ccfdd1 100644 --- a/src/ports/postgres/modules/graph/test/pagerank.sql_in +++ b/src/ports/postgres/modules/graph/test/pagerank.sql_in @@ -93,6 +93,10 @@ SELECT assert(relative_error(SUM(pagerank), 1) < 0.00001, SELECT assert(relative_error(SUM(pagerank), 1) < 0.00001, 'PageRank: Scores do not sum up to 1 for group 2.' ) FROM pagerank_gr_out WHERE user_id=2; + + +-- These tests have been temporarily removed for GPDB5 alpha support + -- SELECT assert(relative_error(__iterations__, 27) = 0, -- 'PageRank: Incorrect iterations for group 1.' -- ) FROM pagerank_gr_out_summary WHERE user_id=1; http://git-wip-us.apache.org/repos/asf/incubator-madlib/blob/0cdd644a/src/ports/postgres/modules/pca/test/pca.sql_in ---------------------------------------------------------------------- diff --git a/src/ports/postgres/modules/pca/test/pca.sql_in b/src/ports/postgres/modules/pca/test/pca.sql_in index fe397fc..f2e5192 100644 --- a/src/ports/postgres/modules/pca/test/pca.sql_in +++ b/src/ports/postgres/modules/pca/test/pca.sql_in @@ -119,31 +119,33 @@ select * from result_table_214712398172490837; select * from result_table_214712398172490838; -- Test dense data with grouping --- DROP TABLE IF EXISTS mat; --- CREATE TABLE mat ( --- id integer, --- row_vec double precision[], --- grp integer --- ); - --- COPY mat (id, row_vec, grp) FROM stdin delimiter '|'; --- 1|{396,840,353,446,318,886,15,584,159,383}|1 --- 2|{691,58,899,163,159,533,604,582,269,390}|1 --- 3|{293,742,298,75,404,857,941,662,846,2}|1 --- 4|{462,532,787,265,982,306,600,608,212,885}|1 --- 5|{304,151,337,387,643,753,603,531,459,652}|1 --- 6|{327,946,368,943,7,516,272,24,591,204}|1 --- 7|{877,59,260,302,891,498,710,286,864,675}|1 --- 8|{458,959,774,376,228,354,300,669,718,565}|2 --- 9|{824,390,818,844,180,943,424,520,65,913}|2 --- 10|{882,761,398,688,761,405,125,484,222,873}|2 --- 11|{528,1,860,18,814,242,314,965,935,809}|2 --- 12|{492,220,576,289,321,261,173,1,44,241}|2 --- 13|{415,701,221,503,67,393,479,218,219,916}|2 --- 14|{350,192,211,633,53,783,30,444,176,932}|2 --- 15|{909,472,871,695,930,455,398,893,693,838}|2 --- 16|{739,651,678,577,273,935,661,47,373,618}|2 --- \. +DROP TABLE IF EXISTS mat; +CREATE TABLE mat ( + id integer, + row_vec double precision[], + grp integer +); + +COPY mat (id, row_vec, grp) FROM stdin delimiter '|'; +1|{396,840,353,446,318,886,15,584,159,383}|1 +2|{691,58,899,163,159,533,604,582,269,390}|1 +3|{293,742,298,75,404,857,941,662,846,2}|1 +4|{462,532,787,265,982,306,600,608,212,885}|1 +5|{304,151,337,387,643,753,603,531,459,652}|1 +6|{327,946,368,943,7,516,272,24,591,204}|1 +7|{877,59,260,302,891,498,710,286,864,675}|1 +8|{458,959,774,376,228,354,300,669,718,565}|2 +9|{824,390,818,844,180,943,424,520,65,913}|2 +10|{882,761,398,688,761,405,125,484,222,873}|2 +11|{528,1,860,18,814,242,314,965,935,809}|2 +12|{492,220,576,289,321,261,173,1,44,241}|2 +13|{415,701,221,503,67,393,479,218,219,916}|2 +14|{350,192,211,633,53,783,30,444,176,932}|2 +15|{909,472,871,695,930,455,398,893,693,838}|2 +16|{739,651,678,577,273,935,661,47,373,618}|2 +\. + +-- This test has been temporarily removed for GPDB5 alpha support -- Learn individaul PCA models based on grouping column (grp) -- drop table if exists result_table_214712398172490837; http://git-wip-us.apache.org/repos/asf/incubator-madlib/blob/0cdd644a/src/ports/postgres/modules/validation/test/cross_validation.sql_in ---------------------------------------------------------------------- diff --git a/src/ports/postgres/modules/validation/test/cross_validation.sql_in b/src/ports/postgres/modules/validation/test/cross_validation.sql_in index 3548178..e50b5de 100644 --- a/src/ports/postgres/modules/validation/test/cross_validation.sql_in +++ b/src/ports/postgres/modules/validation/test/cross_validation.sql_in @@ -1365,6 +1365,9 @@ select check_cv0(); -- select check_cv_ridge(); + +-- This test has been temporarily removed for GPDB5 alpha support + -- m4_ifdef(<!__HAWQ__!>, <!!>, <! -- CREATE TABLE houses ( -- id SERIAL NOT NULL,