Skip to content

Commit

Permalink
Return the error
Browse files Browse the repository at this point in the history
  • Loading branch information
slinkydeveloper committed May 29, 2024
1 parent 8fbcb4e commit c66ace7
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions cli/src/commands/sql.rs
Original file line number Diff line number Diff line change
Expand Up @@ -72,15 +72,15 @@ async fn run_query(env: &CliEnv, sql_opts: &Sql) -> Result<()> {
if sql_opts.json {
let mut writer = arrow::json::ArrayWriter::new(io::stdout());
for batch in resp.batches {
writer.write_batches(&[&batch]).unwrap();
writer.write_batches(&[&batch])?;
}
writer.finish().unwrap();
writer.finish()?;
} else if sql_opts.jsonl {
let mut writer = arrow::json::LineDelimitedWriter::new(io::stdout());
for batch in resp.batches {
writer.write_batches(&[&batch]).unwrap();
writer.write_batches(&[&batch])?;
}
writer.finish().unwrap();
writer.finish()?;
} else {
let format_options = FormatOptions::default().with_display_error(true);
for batch in resp.batches {
Expand Down

0 comments on commit c66ace7

Please sign in to comment.