You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@impala.apache.org by ta...@apache.org on 2016/10/18 16:43:37 UTC
[14/32] incubator-impala git commit: IMPALA-2905: Handle coordinator
fragment lifecycle like all others
http://git-wip-us.apache.org/repos/asf/incubator-impala/blob/9f61397f/testdata/workloads/functional-planner/queries/PlannerTest/with-clause.test
----------------------------------------------------------------------
diff --git a/testdata/workloads/functional-planner/queries/PlannerTest/with-clause.test b/testdata/workloads/functional-planner/queries/PlannerTest/with-clause.test
index 639f73c..e0d2d8c 100644
--- a/testdata/workloads/functional-planner/queries/PlannerTest/with-clause.test
+++ b/testdata/workloads/functional-planner/queries/PlannerTest/with-clause.test
@@ -1,9 +1,13 @@
# Basic test with a single with-clause view.
with t as (select int_col x, bigint_col y from functional.alltypes) select x, y from t
---- PLAN
+PLAN-ROOT SINK
+|
00:SCAN HDFS [functional.alltypes]
partitions=24/24 files=24 size=478.45KB
---- DISTRIBUTEDPLAN
+PLAN-ROOT SINK
+|
01:EXCHANGE [UNPARTITIONED]
|
00:SCAN HDFS [functional.alltypes]
@@ -13,9 +17,13 @@ with t as (select int_col x, bigint_col y from functional.alltypes) select x, y
with t as (select int_col x, bigint_col y from functional.alltypes_view)
select x, y from t
---- PLAN
+PLAN-ROOT SINK
+|
00:SCAN HDFS [functional.alltypes]
partitions=24/24 files=24 size=478.45KB
---- DISTRIBUTEDPLAN
+PLAN-ROOT SINK
+|
01:EXCHANGE [UNPARTITIONED]
|
00:SCAN HDFS [functional.alltypes]
@@ -26,9 +34,13 @@ with t1 as (select int_col x, bigint_col y from functional.alltypes),
t2 as (select 1 x , 10 y), t3 as (values(2 x , 20 y), (3, 30))
select x, y from t2
---- PLAN
+PLAN-ROOT SINK
+|
00:UNION
constant-operands=1
---- DISTRIBUTEDPLAN
+PLAN-ROOT SINK
+|
00:UNION
constant-operands=1
====
@@ -37,6 +49,8 @@ with t1 as (select int_col x, bigint_col y from functional.alltypes),
t2 as (select 1 x , 10 y), t3 as (values(2 x , 20 y), (3, 30))
select * from t1 union all select * from t2 union all select * from t3
---- PLAN
+PLAN-ROOT SINK
+|
00:UNION
|
|--03:UNION
@@ -48,6 +62,8 @@ select * from t1 union all select * from t2 union all select * from t3
01:SCAN HDFS [functional.alltypes]
partitions=24/24 files=24 size=478.45KB
---- DISTRIBUTEDPLAN
+PLAN-ROOT SINK
+|
06:EXCHANGE [UNPARTITIONED]
|
00:UNION
@@ -71,6 +87,8 @@ t2 as (select int_col x, bigint_col y from functional.alltypestiny),
t3 as (select int_col x, bigint_col y from functional.alltypessmall)
select * from t1, t2, t3 where t1.x = t2.x and t2.x = t3.x
---- PLAN
+PLAN-ROOT SINK
+|
04:HASH JOIN [INNER JOIN]
| hash predicates: int_col = int_col
| runtime filters: RF000 <- int_col
@@ -90,6 +108,8 @@ select * from t1, t2, t3 where t1.x = t2.x and t2.x = t3.x
partitions=24/24 files=24 size=478.45KB
runtime filters: RF000 -> functional.alltypes.int_col, RF001 -> int_col
---- DISTRIBUTEDPLAN
+PLAN-ROOT SINK
+|
07:EXCHANGE [UNPARTITIONED]
|
04:HASH JOIN [INNER JOIN, BROADCAST]
@@ -134,6 +154,8 @@ where c1 > 0
order by c3, c1 desc
limit 3
---- PLAN
+PLAN-ROOT SINK
+|
05:TOP-N [LIMIT=3]
| order by: c3 ASC, c1 DESC
|
@@ -155,6 +177,8 @@ limit 3
00:SCAN HDFS [functional.alltypessmall]
partitions=4/4 files=4 size=6.32KB
---- DISTRIBUTEDPLAN
+PLAN-ROOT SINK
+|
05:TOP-N [LIMIT=3]
| order by: c3 ASC, c1 DESC
|
@@ -191,6 +215,8 @@ limit 3
with t as (select int_col x, bigint_col y from functional.alltypestiny)
select * from t t1 inner join t t2 on (t1.x = t2.x) inner join t t3 on (t2.x = t3.x)
---- PLAN
+PLAN-ROOT SINK
+|
04:HASH JOIN [INNER JOIN]
| hash predicates: int_col = int_col
| runtime filters: RF000 <- int_col
@@ -210,6 +236,8 @@ select * from t t1 inner join t t2 on (t1.x = t2.x) inner join t t3 on (t2.x = t
partitions=4/4 files=4 size=460B
runtime filters: RF000 -> functional.alltypestiny.int_col, RF001 -> int_col
---- DISTRIBUTEDPLAN
+PLAN-ROOT SINK
+|
08:EXCHANGE [UNPARTITIONED]
|
04:HASH JOIN [INNER JOIN, PARTITIONED]
@@ -242,6 +270,8 @@ select * from t t1 inner join t t2 on (t1.x = t2.x) inner join t t3 on (t2.x = t
with t as (select int_col x, bigint_col y from functional.alltypestiny)
select * from t t1 inner join t t2 using(x) inner join t t3 using(x)
---- PLAN
+PLAN-ROOT SINK
+|
04:HASH JOIN [INNER JOIN]
| hash predicates: int_col = int_col
| runtime filters: RF000 <- int_col
@@ -261,6 +291,8 @@ select * from t t1 inner join t t2 using(x) inner join t t3 using(x)
partitions=4/4 files=4 size=460B
runtime filters: RF000 -> functional.alltypestiny.int_col, RF001 -> int_col
---- DISTRIBUTEDPLAN
+PLAN-ROOT SINK
+|
08:EXCHANGE [UNPARTITIONED]
|
04:HASH JOIN [INNER JOIN, PARTITIONED]
@@ -293,6 +325,8 @@ select * from t t1 inner join t t2 using(x) inner join t t3 using(x)
with t as (select int_col x, bigint_col y from functional.alltypestiny)
select * from t t1 left outer join t t2 using(x) full outer join t t3 using(x)
---- PLAN
+PLAN-ROOT SINK
+|
04:HASH JOIN [FULL OUTER JOIN]
| hash predicates: int_col = int_col
|
@@ -308,6 +342,8 @@ select * from t t1 left outer join t t2 using(x) full outer join t t3 using(x)
00:SCAN HDFS [functional.alltypestiny]
partitions=4/4 files=4 size=460B
---- DISTRIBUTEDPLAN
+PLAN-ROOT SINK
+|
08:EXCHANGE [UNPARTITIONED]
|
04:HASH JOIN [FULL OUTER JOIN, PARTITIONED]
@@ -338,6 +374,8 @@ select * from t t1 left outer join t t2 using(x) full outer join t t3 using(x)
with t as (select int_col x, bigint_col y from functional.alltypestiny)
select * from t t1 inner join [broadcast] t t2 using(x) inner join [shuffle] t t3 using(x)
---- PLAN
+PLAN-ROOT SINK
+|
04:HASH JOIN [INNER JOIN]
| hash predicates: int_col = int_col
| runtime filters: RF000 <- int_col
@@ -357,6 +395,8 @@ select * from t t1 inner join [broadcast] t t2 using(x) inner join [shuffle] t t
partitions=4/4 files=4 size=460B
runtime filters: RF000 -> functional.alltypestiny.int_col, RF001 -> int_col
---- DISTRIBUTEDPLAN
+PLAN-ROOT SINK
+|
08:EXCHANGE [UNPARTITIONED]
|
04:HASH JOIN [INNER JOIN, PARTITIONED]
@@ -389,6 +429,8 @@ with t1 as (values('a', 'b'))
(with t2 as (values('c', 'd')) select * from t2) union all
(with t3 as (values('e', 'f')) select * from t3) order by 1 limit 1
---- PLAN
+PLAN-ROOT SINK
+|
03:TOP-N [LIMIT=1]
| order by: 'c' ASC
|
@@ -400,6 +442,8 @@ with t1 as (values('a', 'b'))
01:UNION
constant-operands=1
---- DISTRIBUTEDPLAN
+PLAN-ROOT SINK
+|
03:TOP-N [LIMIT=1]
| order by: 'c' ASC
|
@@ -416,6 +460,8 @@ with t1 as (values('a', 'b'))
(with t2 as (values('c', 'd')) select * from t2) union all
(with t3 as (values('e', 'f')) select * from t3) order by 1 limit 1
---- PLAN
+PLAN-ROOT SINK
+|
03:TOP-N [LIMIT=1]
| order by: 'c' ASC
|
@@ -427,6 +473,8 @@ with t1 as (values('a', 'b'))
01:UNION
constant-operands=1
---- DISTRIBUTEDPLAN
+PLAN-ROOT SINK
+|
03:TOP-N [LIMIT=1]
| order by: 'c' ASC
|
@@ -493,6 +541,8 @@ with t1 as (
from functional.alltypestiny)
select * from t1 where bigint_col = bigint_col2
---- PLAN
+PLAN-ROOT SINK
+|
00:SCAN HDFS [functional.alltypestiny]
partitions=4/4 files=4 size=460B
predicates: bigint_col = bigint_col
@@ -503,6 +553,8 @@ select pos from functional.allcomplextypes t inner join
select pos from w) v
on v.pos = t.id
---- PLAN
+PLAN-ROOT SINK
+|
01:SUBPLAN
|
|--04:NESTED LOOP JOIN [INNER JOIN]
@@ -520,6 +572,8 @@ select pos from functional.allcomplextypes t inner join
(with w1 as (with w2 as (select pos from t.int_array_col) select * from w2)
select pos from w1) v
---- PLAN
+PLAN-ROOT SINK
+|
01:SUBPLAN
|
|--04:NESTED LOOP JOIN [CROSS JOIN]
@@ -536,6 +590,8 @@ with w1 as (select pos from functional.allcomplextypes t,
(with w2 as (select pos from t.int_array_col) select * from w2) v)
select * from w1
---- PLAN
+PLAN-ROOT SINK
+|
01:SUBPLAN
|
|--04:NESTED LOOP JOIN [CROSS JOIN]
@@ -553,6 +609,8 @@ select pos from functional.allcomplextypes t inner join
w2 as (select key, value from t.map_map_col.value)
select a1.*, m2.* from w1 a1, w1 a2, w2 m1, w2 m2) v on v.value = t.id
---- PLAN
+PLAN-ROOT SINK
+|
01:SUBPLAN
|
|--10:NESTED LOOP JOIN [INNER JOIN]
http://git-wip-us.apache.org/repos/asf/incubator-impala/blob/9f61397f/tests/custom_cluster/test_client_ssl.py
----------------------------------------------------------------------
diff --git a/tests/custom_cluster/test_client_ssl.py b/tests/custom_cluster/test_client_ssl.py
index f3ac523..4bc7bea 100644
--- a/tests/custom_cluster/test_client_ssl.py
+++ b/tests/custom_cluster/test_client_ssl.py
@@ -96,6 +96,7 @@ class TestClientSsl(CustomClusterTestSuite):
@CustomClusterTestSuite.with_args(impalad_args=SSL_WILDCARD_ARGS,
statestored_args=SSL_WILDCARD_ARGS,
catalogd_args=SSL_WILDCARD_ARGS)
+ @pytest.mark.xfail(run=True, reason="IMPALA-4295 on Centos6")
def test_wildcard_ssl(self, vector):
""" Test for IMPALA-3159: Test with a certificate which has a wildcard for the
CommonName.
http://git-wip-us.apache.org/repos/asf/incubator-impala/blob/9f61397f/tests/failure/test_failpoints.py
----------------------------------------------------------------------
diff --git a/tests/failure/test_failpoints.py b/tests/failure/test_failpoints.py
index 1468f79..512d6f7 100644
--- a/tests/failure/test_failpoints.py
+++ b/tests/failure/test_failpoints.py
@@ -122,7 +122,7 @@ class TestFailpoints(ImpalaTestSuite):
for node_id in node_ids:
debug_action = '%d:%s:%s' % (node_id, location, FAILPOINT_ACTION_MAP[action])
- LOG.info('Current dubug action: SET DEBUG_ACTION=%s' % debug_action)
+ LOG.info('Current debug action: SET DEBUG_ACTION=%s' % debug_action)
vector.get_value('exec_option')['debug_action'] = debug_action
if action == 'CANCEL':
http://git-wip-us.apache.org/repos/asf/incubator-impala/blob/9f61397f/tests/hs2/test_hs2.py
----------------------------------------------------------------------
diff --git a/tests/hs2/test_hs2.py b/tests/hs2/test_hs2.py
index 20bc9c7..6912b69 100644
--- a/tests/hs2/test_hs2.py
+++ b/tests/hs2/test_hs2.py
@@ -291,12 +291,16 @@ class TestHS2(HS2TestSuite):
execute_statement_resp = self.hs2_client.ExecuteStatement(execute_statement_req)
TestHS2.check_response(execute_statement_resp)
- # Fetch results to make sure errors are generated
- fetch_results_req = TCLIService.TFetchResultsReq()
- fetch_results_req.operationHandle = execute_statement_resp.operationHandle
- fetch_results_req.maxRows = 100
- fetch_results_resp = self.hs2_client.FetchResults(fetch_results_req)
- TestHS2.check_response(fetch_results_resp)
+ # Fetch results to make sure errors are generated. Errors are only guaranteed to be
+ # seen by the coordinator after FetchResults() returns eos.
+ has_more_results = True
+ while has_more_results:
+ fetch_results_req = TCLIService.TFetchResultsReq()
+ fetch_results_req.operationHandle = execute_statement_resp.operationHandle
+ fetch_results_req.maxRows = 100
+ fetch_results_resp = self.hs2_client.FetchResults(fetch_results_req)
+ TestHS2.check_response(fetch_results_resp)
+ has_more_results = fetch_results_resp.hasMoreRows
get_log_req = TCLIService.TGetLogReq()
get_log_req.operationHandle = execute_statement_resp.operationHandle
http://git-wip-us.apache.org/repos/asf/incubator-impala/blob/9f61397f/tests/hs2/test_json_endpoints.py
----------------------------------------------------------------------
diff --git a/tests/hs2/test_json_endpoints.py b/tests/hs2/test_json_endpoints.py
index 3053547..a5e73da 100644
--- a/tests/hs2/test_json_endpoints.py
+++ b/tests/hs2/test_json_endpoints.py
@@ -68,6 +68,10 @@ class TestJsonEndpoints(HS2TestSuite):
fetch_results_req.maxRows = 100
fetch_results_resp = self.hs2_client.FetchResults(fetch_results_req)
TestJsonEndpoints.check_response(fetch_results_resp)
+ # Fetch one more time to ensure that query is at EOS (first fetch might return 0-size
+ # row batch)
+ fetch_results_resp = self.hs2_client.FetchResults(fetch_results_req)
+ TestJsonEndpoints.check_response(fetch_results_resp)
queries_json = self._get_json_queries(http_addr)
assert len(queries_json["in_flight_queries"]) == 1
assert queries_json["num_in_flight_queries"] == 1
http://git-wip-us.apache.org/repos/asf/incubator-impala/blob/9f61397f/tests/shell/util.py
----------------------------------------------------------------------
diff --git a/tests/shell/util.py b/tests/shell/util.py
index cb0b3ea..4507706 100755
--- a/tests/shell/util.py
+++ b/tests/shell/util.py
@@ -91,9 +91,10 @@ def run_impala_shell_cmd(shell_args, expect_success=True, stdin_input=None):
"""
result = run_impala_shell_cmd_no_expect(shell_args, stdin_input)
if expect_success:
- assert result.rc == 0, "Cmd %s was expected to succeed: %s" % (cmd, result.stderr)
+ assert result.rc == 0, "Cmd %s was expected to succeed: %s" % (shell_args,
+ result.stderr)
else:
- assert result.rc != 0, "Cmd %s was expected to fail" % cmd
+ assert result.rc != 0, "Cmd %s was expected to fail" % shell_args
return result
def run_impala_shell_cmd_no_expect(shell_args, stdin_input=None):