mirror of
https://github.com/apache/impala.git
synced 2025-12-23 21:08:39 -05:00
Fix return status of summary within impala shell
Follow up fix to IMPALA-1153. Ensure that the correct CmdStatus is returned by the summary command. (ERROR for invalid queries and SUCCESS even if summary is not available.) Change-Id: Icf67164dc82f202ec15071541f6ed3b26e3ad7fb Reviewed-on: http://gerrit.sjc.cloudera.com:8080/4089 Reviewed-by: Abdullah Yousufi <abdullah.yousufi@cloudera.com> Tested-by: jenkins
This commit is contained in:
committed by
Lenni Kuff
parent
9853f74db1
commit
f11de455a0
@@ -387,10 +387,10 @@ class ImpalaShell(cmd.Cmd):
|
||||
pass
|
||||
if summary is None:
|
||||
print_to_stderr("Could not retrieve summary for query.")
|
||||
return True
|
||||
return CmdStatus.ERROR
|
||||
if summary.nodes is None:
|
||||
print_to_stderr("Summary not available")
|
||||
return True
|
||||
return CmdStatus.SUCCESS
|
||||
output = []
|
||||
table = self.construct_table_header(["Operator", "#Hosts", "Avg Time", "Max Time",
|
||||
"#Rows", "Est. #Rows", "Peak Mem",
|
||||
|
||||
@@ -258,7 +258,7 @@ class TestImpalaShell(object):
|
||||
assert "03:AGGREGATE" in result_set.stdout
|
||||
|
||||
args = "-q 'summary;'"
|
||||
result_set = run_impala_shell_cmd(args)
|
||||
result_set = run_impala_shell_cmd(args, expect_success=False)
|
||||
assert "Could not retrieve summary for query" in result_set.stderr
|
||||
|
||||
args = "-q 'show tables; summary;'"
|
||||
|
||||
Reference in New Issue
Block a user