mirror of
https://github.com/apache/impala.git
synced 2025-12-30 03:01:44 -05:00
This patch adds a new command "rerun" and a shortcut "@" to impala-shell . Users can rerun a certain query by its index given by history command. A valid index is an integer in [1, history_length] or [-history_length, -1]. Negative values index history in reverse order. For example, "@1;" or "rerun 1;" reruns the first query shown in history and "@-1;" reruns the last query. The rerun command itself won't appear in history. The history index is 1-based and increasing. Old entries might be truncated when impala-shell starts, and the indexes will be realigned to 1, so the same index may refer to different commands among multiple impala-shell instances. Testing: A test case test_rerun is added to shell/test_shell_interactive.py Change-Id: Ifc28e8ce07845343267224c3b9ccb71b29a524d2 Reviewed-on: http://gerrit.cloudera.org:8080/7674 Reviewed-by: Sailesh Mukil <sailesh@cloudera.com> Tested-by: Impala Public Jenkins