[ 
https://issues.apache.org/jira/browse/IMPALA-9036?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=17043871#comment-17043871
 ] 

ASF subversion and git services commented on IMPALA-9036:
---------------------------------------------------------

Commit 0282c024b45c627695c217d2a714ee9c752fd7c1 in impala's branch 
refs/heads/master from Adam Tamas
[ https://gitbox.apache.org/repos/asf?p=impala.git;h=0282c02 ]

IMPALA-9036: Fix CTRL+C a multiline query in impala-shell

Modified the '_signal_handler()' in impala-shell.py so when a user
cancels a multiline query by hitting CTRL+C it will cancel the
query, instead of just the current line.

Testing:
-Added 'test_cancellation_mid_command()' to test_shell_interactive.py
to test if it really cancels the partial commands.
-Manually tested by giving partial commands then cancelling them.

Change-Id: Id8d8bdaee929e2655eb66e886ae92a02d3fbd83f
Reviewed-on: http://gerrit.cloudera.org:8080/15233
Reviewed-by: Impala Public Jenkins <[email protected]>
Tested-by: Impala Public Jenkins <[email protected]>


> Unable to CTRL+C an unfinished query in impala-shell
> ----------------------------------------------------
>
>                 Key: IMPALA-9036
>                 URL: https://issues.apache.org/jira/browse/IMPALA-9036
>             Project: IMPALA
>          Issue Type: Bug
>          Components: Infrastructure
>            Reporter: Gabor Kaszab
>            Assignee: Adam Tamas
>            Priority: Minor
>              Labels: impala-shell, ramp-up
>
> When the query prompts after a line break it doesn't accept CTRL+C to cancel 
> typing that query. Instead it waits for the user to terminate the query.
> {code:java}
> default> select * from random_table
>                          > ^C
>                          > ^C
>                          > ^C
>                          > ^C
>                          > ^C
>                          > ^C
>                          > ;
> {code}
> In this case it's easy to terminate as only a ';' is needed but if the user 
> messes up a complicated query involving multiple single qouotes, double 
> quotes and their escaped versions then it might be difficult to find out what 
> is missing and they won't be able to simply CTRL+C and start over.
> Note, without a line break in the query CTRL+C works fine:
> {code:java}
> default> select * from random_table^C
> default>
> {code}



--
This message was sent by Atlassian Jira
(v8.3.4#803005)

---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to