[
https://issues.apache.org/jira/browse/IMPALA-992?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
]
Tianyi Wang resolved IMPALA-992.
--------------------------------
Resolution: Fixed
Fix Version/s: Impala 2.10.0
IMPALA-992: Rerun past queries from history in shell
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 <[email protected]>
Tested-by: Impala Public Jenkins
> rerun past queries from history
> -------------------------------
>
> Key: IMPALA-992
> URL: https://issues.apache.org/jira/browse/IMPALA-992
> Project: IMPALA
> Issue Type: New Feature
> Components: Clients
> Affects Versions: Impala 1.3
> Reporter: Kaufman Ng
> Assignee: Tianyi Wang
> Priority: Minor
> Labels: newbie, shell
> Fix For: Impala 2.10.0
>
>
> With the history command in impala shell shows user's query history with
> numbers, it would be nice to allow user to rerun past queries specified by
> the command history number.
> One idea we can borrow from is linux/unix history command: user rerun the
> command by typing exclaimation mark and the history number, e.g. "!100"
--
This message was sent by Atlassian JIRA
(v6.4.14#64029)