Skip to content

Apache DataFusion SQL Query Engine

nicer error messages for cli, switch to display rather than debug (#5329)

Kirk Mitchener6ec254442456
diff --git a/datafusion-cli/src/exec.rs b/datafusion-cli/src/exec.rs
index 539e75040d..7955e1e2cf 100644
--- a/datafusion-cli/src/exec.rs
+++ b/datafusion-cli/src/exec.rs
@@ -50,7 +50,7 @@ pub async fn exec_from_lines(
if line.ends_with(';') {
match exec_and_print(ctx, print_options, query).await {
Ok(_) => {}
- Err(err) => println!("{:?}", err),
+ Err(err) => println!("{err}"),
}
query = "".to_owned();
} else {
@@ -67,7 +67,7 @@ pub async fn exec_from_lines(
if !query.is_empty() {
match exec_and_print(ctx, print_options, query).await {
Ok(_) => {}
- Err(err) => println!("{:?}", err),
+ Err(err) => println!("{err}"),
}
}
}
@@ -138,7 +138,7 @@ pub async fn exec_from_repl(
rl.add_history_entry(line.trim_end());
match exec_and_print(ctx, &print_options, line).await {
Ok(_) => {}
- Err(err) => eprintln!("{:?}", err),
+ Err(err) => eprintln!("{err}"),
}
}
Err(ReadlineError::Interrupted) => {