Skip to content

Commit a4e7a38

Browse files
authored
Fix sql exec time (#24)
1 parent cd742f4 commit a4e7a38

File tree

2 files changed

+3
-2
lines changed

2 files changed

+3
-2
lines changed

Cargo.toml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@ repository = "https://github.com/sundy-li/arrow_cli"
77
edition = "2024"
88
license = "Apache-2.0"
99
name = "arrow_cli"
10-
version = "0.2.0"
10+
version = "0.2.1"
1111

1212

1313
[dependencies]

src/session.rs

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -124,6 +124,7 @@ impl Session {
124124
let start = Instant::now();
125125
let mut stmt = self.client.prepare(query.to_string(), None).await?;
126126
let flight_info = stmt.execute().await?;
127+
let sql_exec_duration = start.elapsed();
127128
let mut batches: Vec<RecordBatch> = Vec::new();
128129

129130
let mut handles = Vec::with_capacity(flight_info.endpoint.len());
@@ -157,7 +158,7 @@ impl Session {
157158
println!(
158159
"{} rows in set ({:.3} sec)",
159160
rows,
160-
start.elapsed().as_secs_f64()
161+
sql_exec_duration.as_secs_f64()
161162
);
162163
println!();
163164
} else {

0 commit comments

Comments
 (0)