Skip to content

Commit

Permalink
remove another case of executing the logical plan
Browse files Browse the repository at this point in the history
  • Loading branch information
andygrove committed Oct 5, 2019
1 parent 65fbbd9 commit 0b81550
Showing 1 changed file with 5 additions and 3 deletions.
8 changes: 5 additions & 3 deletions rust/datafusion/tests/sql.rs
Original file line number Diff line number Diff line change
Expand Up @@ -99,9 +99,11 @@ fn parquet_single_nan_schema() {
ctx.register_parquet("single_nan", &format!("{}/single_nan.parquet", testdata))
.unwrap();
let sql = "SELECT mycol FROM single_nan";
let relation = ctx.sql(&sql, 1024 * 1024).unwrap();
let mut results = relation.borrow_mut();
while let Some(batch) = results.next().unwrap() {
let plan = ctx.create_logical_plan(&sql).unwrap();
let plan = ctx.optimize(&plan).unwrap();
let plan = ctx.create_physical_plan(&plan, DEFAULT_BATCH_SIZE).unwrap();
let results = ctx.collect(plan.as_ref()).unwrap();
for batch in results {
assert_eq!(1, batch.num_rows());
assert_eq!(1, batch.num_columns());
}
Expand Down

0 comments on commit 0b81550

Please sign in to comment.