You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@hawq.apache.org by rl...@apache.org on 2018/01/03 05:44:23 UTC

incubator-hawq git commit: HAWQ-1125. Running pl/python related feature_test cases in parallel

Repository: incubator-hawq
Updated Branches:
  refs/heads/master 4fd7565ed -> 511d2a98a


HAWQ-1125. Running pl/python related feature_test cases in parallel

Prior commit: dc14ecbafc368a45cda5806ef7680ffe0825aef1


Project: http://git-wip-us.apache.org/repos/asf/incubator-hawq/repo
Commit: http://git-wip-us.apache.org/repos/asf/incubator-hawq/commit/511d2a98
Tree: http://git-wip-us.apache.org/repos/asf/incubator-hawq/tree/511d2a98
Diff: http://git-wip-us.apache.org/repos/asf/incubator-hawq/diff/511d2a98

Branch: refs/heads/master
Commit: 511d2a98ad9db9b484cee25227b6af104067ce48
Parents: 4fd7565
Author: Kuien Liu <ku...@alibaba-inc.com>
Authored: Thu Dec 28 16:16:17 2017 +0800
Committer: rlei <rl...@pivotal.io>
Committed: Wed Jan 3 13:43:50 2018 +0800

----------------------------------------------------------------------
 src/test/feature/planner/ans/subplan.ans  |  5 -----
 src/test/feature/planner/sql/subplan.sql  |  3 ---
 src/test/feature/planner/test_subplan.cpp | 16 +++++++++++++---
 3 files changed, 13 insertions(+), 11 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/incubator-hawq/blob/511d2a98/src/test/feature/planner/ans/subplan.ans
----------------------------------------------------------------------
diff --git a/src/test/feature/planner/ans/subplan.ans b/src/test/feature/planner/ans/subplan.ans
index 7335b90..bb3df84 100644
--- a/src/test/feature/planner/ans/subplan.ans
+++ b/src/test/feature/planner/ans/subplan.ans
@@ -31,11 +31,6 @@ insert into i4 values(null,null);
 INSERT 0 1
 insert into i4 select i, i-10 from generate_series(-5,0)i;
 INSERT 0 6
-DROP LANGUAGE IF EXISTS plpythonu CASCADE;
-psql:/tmp/TestSubplan_TestSubplanAll.sql:27: NOTICE:  language "plpythonu" does not exist, skipping
-DROP LANGUAGE
-CREATE LANGUAGE plpythonu;
-CREATE LANGUAGE
 create or replace function twice(int) returns int as $$
        select 2 * $1;
 $$ language sql;

http://git-wip-us.apache.org/repos/asf/incubator-hawq/blob/511d2a98/src/test/feature/planner/sql/subplan.sql
----------------------------------------------------------------------
diff --git a/src/test/feature/planner/sql/subplan.sql b/src/test/feature/planner/sql/subplan.sql
index a1ffb6c..eb4619b 100644
--- a/src/test/feature/planner/sql/subplan.sql
+++ b/src/test/feature/planner/sql/subplan.sql
@@ -21,9 +21,6 @@ create table i4(a int, b int) distributed by (a);
 insert into i4 values(null,null);
 insert into i4 select i, i-10 from generate_series(-5,0)i;
 
-DROP LANGUAGE IF EXISTS plpythonu CASCADE;
-CREATE LANGUAGE plpythonu;
-
 create or replace function twice(int) returns int as $$
        select 2 * $1;
 $$ language sql;

http://git-wip-us.apache.org/repos/asf/incubator-hawq/blob/511d2a98/src/test/feature/planner/test_subplan.cpp
----------------------------------------------------------------------
diff --git a/src/test/feature/planner/test_subplan.cpp b/src/test/feature/planner/test_subplan.cpp
index 2f504d4..d342ace 100644
--- a/src/test/feature/planner/test_subplan.cpp
+++ b/src/test/feature/planner/test_subplan.cpp
@@ -27,7 +27,17 @@ class TestSubplan : public ::testing::Test {
 };
 
 TEST_F(TestSubplan, TestSubplanAll) {
- hawq::test::SQLUtility util;
- util.execSQLFile("planner/sql/subplan.sql",
-                  "planner/ans/subplan.ans");
+    hawq::test::SQLUtility util;
+    // enable plpythonu language if it is absent
+    if (util.getQueryResult("SELECT lanname FROM pg_language WHERE lanname = 'plpythonu'") != "plpythonu")
+    {
+        util.execute("CREATE LANGUAGE plpythonu", false);
+    }
+
+    // run test if plpythonu language is enabled
+    if (util.getQueryResult("SELECT lanname FROM pg_language WHERE lanname = 'plpythonu'") == "plpythonu")
+    {
+        util.execSQLFile("planner/sql/subplan.sql",
+                         "planner/ans/subplan.ans");
+    }
 }