Skip to content

Commit

Permalink
Fix up more stragglers
Browse files Browse the repository at this point in the history
  • Loading branch information
alamb committed Jun 7, 2023
1 parent dd51b75 commit f1d68b7
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 8 deletions.
3 changes: 1 addition & 2 deletions datafusion/core/benches/data_utils/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,6 @@ use arrow::{
};
use datafusion::datasource::MemTable;
use datafusion::error::Result;
use datafusion::from_slice::FromSlice;
use rand::rngs::StdRng;
use rand::seq::SliceRandom;
use rand::{Rng, SeedableRng};
Expand Down Expand Up @@ -131,7 +130,7 @@ fn create_record_batch(
schema,
vec![
Arc::new(StringArray::from(keys)),
Arc::new(Float32Array::from_slice(vec![i as f32; batch_size])),
Arc::new(Float32Array::from(vec![i as f32; batch_size])),
Arc::new(Float64Array::from(values)),
Arc::new(UInt64Array::from(integer_values_wide)),
Arc::new(UInt64Array::from(integer_values_narrow)),
Expand Down
5 changes: 2 additions & 3 deletions datafusion/core/benches/filter_query_sql.rs
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,6 @@ use arrow::{
record_batch::RecordBatch,
};
use criterion::{criterion_group, criterion_main, Criterion};
use datafusion::from_slice::FromSlice;
use datafusion::prelude::SessionContext;
use datafusion::{datasource::MemTable, error::Result};
use futures::executor::block_on;
Expand Down Expand Up @@ -49,8 +48,8 @@ fn create_context(array_len: usize, batch_size: usize) -> Result<SessionContext>
RecordBatch::try_new(
schema.clone(),
vec![
Arc::new(Float32Array::from_slice(vec![i as f32; batch_size])),
Arc::new(Float64Array::from_slice(vec![i as f64; batch_size])),
Arc::new(Float32Array::from(vec![i as f32; batch_size])),
Arc::new(Float64Array::from(vec![i as f64; batch_size])),
],
)
.unwrap()
Expand Down
5 changes: 2 additions & 3 deletions datafusion/core/benches/math_query_sql.rs
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,6 @@ use arrow::{
use datafusion::datasource::MemTable;
use datafusion::error::Result;
use datafusion::execution::context::SessionContext;
use datafusion::from_slice::FromSlice;

fn query(ctx: Arc<Mutex<SessionContext>>, sql: &str) {
let rt = Runtime::new().unwrap();
Expand All @@ -61,8 +60,8 @@ fn create_context(
RecordBatch::try_new(
schema.clone(),
vec![
Arc::new(Float32Array::from_slice(vec![i as f32; batch_size])),
Arc::new(Float64Array::from_slice(vec![i as f64; batch_size])),
Arc::new(Float32Array::from(vec![i as f32; batch_size])),
Arc::new(Float64Array::from(vec![i as f64; batch_size])),
],
)
.unwrap()
Expand Down

0 comments on commit f1d68b7

Please sign in to comment.