This is an automated email from the ASF dual-hosted git repository. joemcdonnell pushed a commit to branch master in repository https://gitbox.apache.org/repos/asf/impala.git
commit cf5eaae17634edd99f40bd40e83ea1f1248e4bf1 Author: Riza Suminto <[email protected]> AuthorDate: Thu May 19 21:12:32 2022 -0700 IMPALA-11305: Fix TypeError in impala-shell summary progress impala-shell fail with TypeError when installed with python3. This is due to behavior change of division operator ('/') between python2 vs python3. This patch fix the issue by changing the operator with floor division ('//') that result in integer type as described in https://peps.python.org/pep-0238/. Testing: - Manually install impala-shell with from pip with python3 and verify the fix works. Change-Id: Ifbe4df6a7a4136e590f383fc6475e2283e35eadc Reviewed-on: http://gerrit.cloudera.org:8080/18546 Reviewed-by: Impala Public Jenkins <[email protected]> Reviewed-by: Michael Smith <[email protected]> Tested-by: Impala Public Jenkins <[email protected]> --- shell/impala_shell.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/shell/impala_shell.py b/shell/impala_shell.py index a2bd4fb2d..50ad5eaa1 100755 --- a/shell/impala_shell.py +++ b/shell/impala_shell.py @@ -1245,7 +1245,7 @@ class ImpalaShell(cmd.Cmd, object): return if self.live_progress and progress.total_scan_ranges > 0: - val = ((summary.progress.num_completed_scan_ranges * 100) / + val = ((summary.progress.num_completed_scan_ranges * 100) // summary.progress.total_scan_ranges) fragment_text = "[%s%s] %s%%\n" % ("#" * val, " " * (100 - val), val) data += fragment_text
