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 2018/03/09 01:20:31 UTC

impala git commit: IMPALA-6615: CTE query in Impala shell does not show query web links

Repository: impala
Updated Branches:
  refs/heads/2.x 1f573e08b -> 9c43b38e5


IMPALA-6615: CTE query in Impala shell does not show query web links

This patch is to show query submitted and query progress web links in
Impala shell for CTE queries.

Testing:
- Ran end-to-end shell tests

Change-Id: Ie3352406e3b048be395a20405c8e6b911e663164
Reviewed-on: http://gerrit.cloudera.org:8080/9537
Reviewed-by: Alex Behm <al...@cloudera.com>
Tested-by: Impala Public Jenkins


Project: http://git-wip-us.apache.org/repos/asf/impala/repo
Commit: http://git-wip-us.apache.org/repos/asf/impala/commit/9c43b38e
Tree: http://git-wip-us.apache.org/repos/asf/impala/tree/9c43b38e
Diff: http://git-wip-us.apache.org/repos/asf/impala/diff/9c43b38e

Branch: refs/heads/2.x
Commit: 9c43b38e533848fb6a5c8fa46190fc1b991b2088
Parents: 1f573e0
Author: Fredy wijaya <fw...@cloudera.com>
Authored: Wed Mar 7 13:11:18 2018 -0800
Committer: Impala Public Jenkins <im...@gerrit.cloudera.org>
Committed: Thu Mar 8 14:03:14 2018 +0000

----------------------------------------------------------------------
 shell/impala_shell.py                 | 2 +-
 tests/shell/test_shell_commandline.py | 8 +++++++-
 2 files changed, 8 insertions(+), 2 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/impala/blob/9c43b38e/shell/impala_shell.py
----------------------------------------------------------------------
diff --git a/shell/impala_shell.py b/shell/impala_shell.py
index 2aca26b..0401d8f 100755
--- a/shell/impala_shell.py
+++ b/shell/impala_shell.py
@@ -1125,7 +1125,7 @@ class ImpalaShell(object, cmd.Cmd):
     is_dml = False
     tokens = list(lexer)
     if filter(self.DML_REGEX.match, tokens): is_dml = True
-    return self._execute_stmt(query, is_dml=is_dml)
+    return self._execute_stmt(query, is_dml=is_dml, print_web_link=True)
 
   def do_use(self, args):
     """Executes a USE... query"""

http://git-wip-us.apache.org/repos/asf/impala/blob/9c43b38e/tests/shell/test_shell_commandline.py
----------------------------------------------------------------------
diff --git a/tests/shell/test_shell_commandline.py b/tests/shell/test_shell_commandline.py
index 513abdc..f5f67c0 100644
--- a/tests/shell/test_shell_commandline.py
+++ b/tests/shell/test_shell_commandline.py
@@ -517,7 +517,7 @@ class TestImpalaShell(ImpalaTestSuite):
         unique_database)
     self._validate_shell_messages(results.stderr, shell_messages, should_exist=False)
 
-    # SELECT, INSERT and CTAS queries should print the query time message and webserver
+    # SELECT, INSERT, CTAS, CTE queries should print the query time message and webserver
     # address.
     results = run_impala_shell_cmd('--query="insert into %s.shell_msg_test values (1)"' %
         unique_database)
@@ -528,6 +528,12 @@ class TestImpalaShell(ImpalaTestSuite):
     results = run_impala_shell_cmd('--query="create table %s.shell_msg_ctas_test as \
         select * from %s.shell_msg_test"' % (unique_database, unique_database))
     self._validate_shell_messages(results.stderr, shell_messages, should_exist=True)
+    results = run_impala_shell_cmd('--query="create table %s.shell_msg_cte_test(i int); '
+                                   'with abc as (select 1) '
+                                   'insert overwrite %s.shell_msg_cte_test '
+                                   'select * from %s.shell_msg_cte_test;"' %
+                                   (unique_database, unique_database, unique_database))
+    self._validate_shell_messages(results.stderr, shell_messages, should_exist=True)
 
     # DROP statements should not print query time and webserver address.
     results = run_impala_shell_cmd('--query="drop table %s.shell_msg_test"' %