Skip to content

Commit 97bdf79

Browse files
committed
core/tests/flight: add a workaround for df.count()
1 parent 6f36f99 commit 97bdf79

1 file changed

Lines changed: 9 additions & 4 deletions

File tree

core/tests/flight/mod.rs

Lines changed: 9 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -213,10 +213,15 @@ async fn test_flight_sql_data_source() -> datafusion::common::Result<()> {
213213
.await
214214
.unwrap();
215215
let df = ctx.sql("select col1 from fsql").await.unwrap();
216-
assert_eq!(
217-
df.count().await.unwrap(),
218-
rows_per_partition * num_partitions
219-
);
216+
217+
let row_count: usize = df
218+
.collect()
219+
.await
220+
.unwrap()
221+
.iter()
222+
.map(|b| b.num_rows())
223+
.sum();
224+
assert_eq!(row_count, rows_per_partition * num_partitions);
220225
let df = ctx.sql("select sum(col2) from fsql").await?;
221226
let rb = df
222227
.collect()

0 commit comments

Comments
 (0)