Joe McDonnell has uploaded this change for review. ( http://gerrit.cloudera.org:8080/22941
Change subject: IMPALA-14087: Fix shell live_progress output display issue on Python 3 ...................................................................... IMPALA-14087: Fix shell live_progress output display issue on Python 3 When running the shell in a terminal with live_progress=true, live progress overwrites its output by using the ANSI up character to rewrite lines with updated on the query progress. On Python 3, we found that the updates to clear the live progress were overwriting the actual output in the terminal. e.g. +----------+ | count(*) | +----------+ Fetched 1 row(s) in 5.20s To avoid this, the live progress lines need to be fully flushed to stderr before starting to output the result to stdout. This adds a flush call in OverwritingStdErrOutputStream::clear() to force this. Testing: - Hand tested queries with live progress - Added test that redirects stdout and stderr to the same file and verifies that no ANSI up character comes after the query output Change-Id: Id2e21224253f76b2a04767a57b3ade49ce2c914f --- M shell/impala_shell/shell_output.py M tests/shell/test_shell_interactive.py 2 files changed, 25 insertions(+), 0 deletions(-) git pull ssh://gerrit.cloudera.org:29418/Impala-ASF refs/changes/41/22941/1 -- To view, visit http://gerrit.cloudera.org:8080/22941 To unsubscribe, visit http://gerrit.cloudera.org:8080/settings Gerrit-Project: Impala-ASF Gerrit-Branch: master Gerrit-MessageType: newchange Gerrit-Change-Id: Id2e21224253f76b2a04767a57b3ade49ce2c914f Gerrit-Change-Number: 22941 Gerrit-PatchSet: 1 Gerrit-Owner: Joe McDonnell <[email protected]>
