You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@arrow.apache.org by al...@apache.org on 2021/12/02 22:53:32 UTC
[arrow-datafusion] branch master updated: Make cli handle multiple whitespaces (#1388)
This is an automated email from the ASF dual-hosted git repository.
alamb pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/arrow-datafusion.git
The following commit(s) were added to refs/heads/master by this push:
new 069449f Make cli handle multiple whitespaces (#1388)
069449f is described below
commit 069449f754c92765a2d0dbbf62cd7bac76257892
Author: Jason Tianyi Wang <ca...@gmail.com>
AuthorDate: Fri Dec 3 07:53:28 2021 +0900
Make cli handle multiple whitespaces (#1388)
---
datafusion-cli/src/exec.rs | 3 ++-
1 file changed, 2 insertions(+), 1 deletion(-)
diff --git a/datafusion-cli/src/exec.rs b/datafusion-cli/src/exec.rs
index 45136de..17b7197 100644
--- a/datafusion-cli/src/exec.rs
+++ b/datafusion-cli/src/exec.rs
@@ -91,7 +91,8 @@ pub async fn exec_from_repl(ctx: &mut Context, print_options: &mut PrintOptions)
match rl.readline("❯ ") {
Ok(line) if line.starts_with('\\') => {
rl.add_history_entry(line.trim_end());
- if let Ok(cmd) = &line[1..].parse::<Command>() {
+ let command = line.split_whitespace().collect::<Vec<_>>().join(" ");
+ if let Ok(cmd) = &command[1..].parse::<Command>() {
match cmd {
Command::Quit => break,
Command::OutputFormat(subcommand) => {