You are viewing a plain text version of this content. The canonical link for it is here.
Posted to github@arrow.apache.org by "comphead (via GitHub)" <gi...@apache.org> on 2024/01/03 18:09:08 UTC

Re: [PR] Minor: Ctrl+C Termination in CLI [arrow-datafusion]

comphead commented on code in PR #8739:
URL: https://github.com/apache/arrow-datafusion/pull/8739#discussion_r1440755999


##########
datafusion-cli/src/exec.rs:
##########
@@ -165,9 +166,15 @@ pub async fn exec_from_repl(
             }
             Ok(line) => {
                 rl.add_history_entry(line.trim_end())?;
-                match exec_and_print(ctx, print_options, line).await {
-                    Ok(_) => {}
-                    Err(err) => eprintln!("{err}"),
+                tokio::select! {
+                    res = exec_and_print(ctx, print_options, line) => match res {

Review Comment:
   Looks like CTRL+C just getting out of the loop without actual query interruption?
   
   So the machine resources is not released when the user tries to run next query after CTRL+C?



-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: github-unsubscribe@arrow.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org