Skip to content

Commit

Permalink
allow datafusion cli to take -- comments
Browse files Browse the repository at this point in the history
  • Loading branch information
Jiayu Liu committed May 9, 2021
1 parent d0a4552 commit 2dd4c5d
Showing 1 changed file with 6 additions and 0 deletions.
6 changes: 6 additions & 0 deletions datafusion-cli/src/main.rs
Original file line number Diff line number Diff line change
Expand Up @@ -96,6 +96,9 @@ async fn exec_from_lines(

for line in reader.lines() {
match line {
Ok(line) if line.starts_with("--") => {
continue;
}
Ok(line) => {
let line = line.trim_end();
query.push_str(line);
Expand Down Expand Up @@ -136,6 +139,9 @@ async fn exec_from_repl(execution_config: ExecutionConfig) {
Ok(ref line) if is_exit_command(line) && query.is_empty() => {
break;
}
Ok(ref line) if line.starts_with("--") => {
continue;
}
Ok(ref line) if line.trim_end().ends_with(';') => {
query.push_str(line.trim_end());
rl.add_history_entry(query.clone());
Expand Down

0 comments on commit 2dd4c5d

Please sign in to comment.