Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
7 changes: 1 addition & 6 deletions datafusion/core/benches/aggregate_query_sql.rs
Original file line number Diff line number Diff line change
Expand Up @@ -15,14 +15,9 @@
// specific language governing permissions and limitations
// under the License.

#[macro_use]
extern crate criterion;
extern crate arrow;
extern crate datafusion;

mod data_utils;

use crate::criterion::Criterion;
use criterion::{Criterion, criterion_group, criterion_main};
use data_utils::create_table_provider;
use datafusion::error::Result;
use datafusion::execution::context::SessionContext;
Expand Down
7 changes: 1 addition & 6 deletions datafusion/core/benches/csv_load.rs
Original file line number Diff line number Diff line change
Expand Up @@ -15,14 +15,9 @@
// specific language governing permissions and limitations
// under the License.

#[macro_use]
extern crate criterion;
extern crate arrow;
extern crate datafusion;

mod data_utils;

use crate::criterion::Criterion;
use criterion::{Criterion, criterion_group, criterion_main};
use datafusion::error::Result;
use datafusion::execution::context::SessionContext;
use datafusion::prelude::CsvReadOptions;
Expand Down
7 changes: 1 addition & 6 deletions datafusion/core/benches/dataframe.rs
Original file line number Diff line number Diff line change
Expand Up @@ -15,13 +15,8 @@
// specific language governing permissions and limitations
// under the License.

extern crate arrow;
#[macro_use]
extern crate criterion;
extern crate datafusion;

use arrow_schema::{DataType, Field, Schema};
use criterion::Criterion;
use criterion::{Criterion, criterion_group, criterion_main};
use datafusion::datasource::MemTable;
use datafusion::prelude::SessionContext;
use datafusion_expr::col;
Expand Down
8 changes: 2 additions & 6 deletions datafusion/core/benches/distinct_query_sql.rs
Original file line number Diff line number Diff line change
Expand Up @@ -15,13 +15,9 @@
// specific language governing permissions and limitations
// under the License.

#[macro_use]
extern crate criterion;
extern crate arrow;
extern crate datafusion;

mod data_utils;
use crate::criterion::Criterion;

use criterion::{Criterion, criterion_group, criterion_main};
use data_utils::{create_table_provider, make_data};
use datafusion::execution::context::SessionContext;
use datafusion::physical_plan::{ExecutionPlan, collect};
Expand Down
7 changes: 1 addition & 6 deletions datafusion/core/benches/math_query_sql.rs
Original file line number Diff line number Diff line change
Expand Up @@ -15,18 +15,13 @@
// specific language governing permissions and limitations
// under the License.

#[macro_use]
extern crate criterion;
use criterion::Criterion;
use criterion::{Criterion, criterion_group, criterion_main};

use parking_lot::Mutex;
use std::sync::Arc;

use tokio::runtime::Runtime;

extern crate arrow;
extern crate datafusion;

use arrow::{
array::{Float32Array, Float64Array},
datatypes::{DataType, Field, Schema},
Expand Down
6 changes: 1 addition & 5 deletions datafusion/core/benches/physical_plan.rs
Original file line number Diff line number Diff line change
Expand Up @@ -15,11 +15,7 @@
// specific language governing permissions and limitations
// under the License.

#[macro_use]
extern crate criterion;
use criterion::{BatchSize, Criterion};
extern crate arrow;
extern crate datafusion;
use criterion::{BatchSize, Criterion, criterion_group, criterion_main};

use std::sync::Arc;

Expand Down
6 changes: 1 addition & 5 deletions datafusion/core/benches/range_and_generate_series.rs
Original file line number Diff line number Diff line change
Expand Up @@ -15,13 +15,9 @@
// specific language governing permissions and limitations
// under the License.

#[macro_use]
extern crate criterion;
extern crate datafusion;

mod data_utils;

use crate::criterion::Criterion;
use criterion::{Criterion, criterion_group, criterion_main};
use datafusion::execution::context::SessionContext;
use parking_lot::Mutex;
use std::hint::black_box;
Expand Down
7 changes: 1 addition & 6 deletions datafusion/core/benches/sort_limit_query_sql.rs
Original file line number Diff line number Diff line change
Expand Up @@ -15,9 +15,7 @@
// specific language governing permissions and limitations
// under the License.

#[macro_use]
extern crate criterion;
use criterion::Criterion;
use criterion::{Criterion, criterion_group, criterion_main};
use datafusion::datasource::file_format::csv::CsvFormat;
use datafusion::datasource::listing::{
ListingOptions, ListingTable, ListingTableConfig, ListingTableUrl,
Expand All @@ -27,9 +25,6 @@ use datafusion::prelude::SessionConfig;
use parking_lot::Mutex;
use std::sync::Arc;

extern crate arrow;
extern crate datafusion;

use arrow::datatypes::{DataType, Field, Schema};

use datafusion::datasource::MemTable;
Expand Down
7 changes: 1 addition & 6 deletions datafusion/core/benches/sql_planner.rs
Original file line number Diff line number Diff line change
Expand Up @@ -15,20 +15,15 @@
// specific language governing permissions and limitations
// under the License.

extern crate arrow;
#[macro_use]
extern crate criterion;
extern crate datafusion;

mod data_utils;

use crate::criterion::Criterion;
use arrow::array::PrimitiveArray;
use arrow::array::{ArrayRef, RecordBatch};
use arrow::datatypes::ArrowNativeTypeOp;
use arrow::datatypes::ArrowPrimitiveType;
use arrow::datatypes::{DataType, Field, Fields, Schema};
use criterion::Bencher;
use criterion::{Criterion, criterion_group, criterion_main};
use datafusion::datasource::MemTable;
use datafusion::execution::context::SessionContext;
use datafusion_common::{ScalarValue, config::Dialect};
Expand Down
7 changes: 1 addition & 6 deletions datafusion/core/benches/window_query_sql.rs
Original file line number Diff line number Diff line change
Expand Up @@ -15,14 +15,9 @@
// specific language governing permissions and limitations
// under the License.

#[macro_use]
extern crate criterion;
extern crate arrow;
extern crate datafusion;

mod data_utils;

use crate::criterion::Criterion;
use criterion::{Criterion, criterion_group, criterion_main};
use data_utils::create_table_provider;
use datafusion::error::Result;
use datafusion::execution::context::SessionContext;
Expand Down
2 changes: 0 additions & 2 deletions datafusion/functions-aggregate-common/benches/accumulate.rs
Original file line number Diff line number Diff line change
Expand Up @@ -15,8 +15,6 @@
// specific language governing permissions and limitations
// under the License.

extern crate criterion;

use std::sync::Arc;

use arrow::array::{ArrayRef, BooleanArray, Int64Array};
Expand Down
6 changes: 1 addition & 5 deletions datafusion/functions-nested/benches/array_expression.rs
Original file line number Diff line number Diff line change
Expand Up @@ -15,11 +15,7 @@
// specific language governing permissions and limitations
// under the License.

#[macro_use]
extern crate criterion;
extern crate arrow;

use crate::criterion::Criterion;
use criterion::{Criterion, criterion_group, criterion_main};
use datafusion_expr::lit;
use datafusion_functions_nested::expr_fn::{array_replace_all, make_array};
use std::hint::black_box;
Expand Down
7 changes: 3 additions & 4 deletions datafusion/functions-nested/benches/array_has.rs
Original file line number Diff line number Diff line change
Expand Up @@ -15,10 +15,9 @@
// specific language governing permissions and limitations
// under the License.

#[macro_use]
extern crate criterion;

use criterion::{BenchmarkId, Criterion};
use criterion::{
criterion_group, criterion_main, {BenchmarkId, Criterion},
};
use datafusion_expr::lit;
use datafusion_functions_nested::expr_fn::{
array_has, array_has_all, array_has_any, make_array,
Expand Down
7 changes: 3 additions & 4 deletions datafusion/functions-nested/benches/array_remove.rs
Original file line number Diff line number Diff line change
Expand Up @@ -15,16 +15,15 @@
// specific language governing permissions and limitations
// under the License.

#[macro_use]
extern crate criterion;

use arrow::array::{
Array, ArrayRef, BinaryArray, BooleanArray, Decimal128Array, FixedSizeBinaryArray,
Float64Array, Int64Array, ListArray, StringArray,
};
use arrow::buffer::OffsetBuffer;
use arrow::datatypes::{DataType, Field};
use criterion::{BenchmarkId, Criterion};
use criterion::{
criterion_group, criterion_main, {BenchmarkId, Criterion},
};
use datafusion_common::ScalarValue;
use datafusion_common::config::ConfigOptions;
use datafusion_expr::{ColumnarValue, ScalarFunctionArgs, ScalarUDFImpl};
Expand Down
7 changes: 3 additions & 4 deletions datafusion/functions-nested/benches/array_repeat.rs
Original file line number Diff line number Diff line change
Expand Up @@ -15,13 +15,12 @@
// specific language governing permissions and limitations
// under the License.

#[macro_use]
extern crate criterion;

use arrow::array::{ArrayRef, BooleanArray, Float64Array, Int64Array, ListArray};
use arrow::buffer::OffsetBuffer;
use arrow::datatypes::{DataType, Field};
use criterion::{BenchmarkId, Criterion};
use criterion::{
criterion_group, criterion_main, {BenchmarkId, Criterion},
};
use datafusion_common::ScalarValue;
use datafusion_common::config::ConfigOptions;
use datafusion_expr::{ColumnarValue, ScalarFunctionArgs, ScalarUDFImpl};
Expand Down
6 changes: 1 addition & 5 deletions datafusion/functions-nested/benches/array_reverse.rs
Original file line number Diff line number Diff line change
Expand Up @@ -15,18 +15,14 @@
// specific language governing permissions and limitations
// under the License.

#[macro_use]
extern crate criterion;
extern crate arrow;

use std::{hint::black_box, sync::Arc};

use crate::criterion::Criterion;
use arrow::{
array::{ArrayRef, FixedSizeListArray, Int32Array, ListArray, ListViewArray},
buffer::{NullBuffer, OffsetBuffer, ScalarBuffer},
datatypes::{DataType, Field},
};
use criterion::{Criterion, criterion_group, criterion_main};
use datafusion_functions_nested::reverse::array_reverse_inner;

fn array_reverse(array: &ArrayRef) -> ArrayRef {
Expand Down
7 changes: 3 additions & 4 deletions datafusion/functions-nested/benches/array_set_ops.rs
Original file line number Diff line number Diff line change
Expand Up @@ -15,13 +15,12 @@
// specific language governing permissions and limitations
// under the License.

#[macro_use]
extern crate criterion;

use arrow::array::{ArrayRef, Int64Array, ListArray};
use arrow::buffer::OffsetBuffer;
use arrow::datatypes::{DataType, Field};
use criterion::{BenchmarkId, Criterion};
use criterion::{
criterion_group, criterion_main, {BenchmarkId, Criterion},
};
use datafusion_common::config::ConfigOptions;
use datafusion_expr::{ColumnarValue, ScalarFunctionArgs, ScalarUDFImpl};
use datafusion_functions_nested::set_ops::{ArrayIntersect, ArrayUnion};
Expand Down
2 changes: 0 additions & 2 deletions datafusion/functions-nested/benches/array_slice.rs
Original file line number Diff line number Diff line change
Expand Up @@ -15,8 +15,6 @@
// specific language governing permissions and limitations
// under the License.

extern crate criterion;

use arrow::array::{
Int64Array, ListArray, ListViewArray, NullBufferBuilder, PrimitiveArray,
};
Expand Down
2 changes: 0 additions & 2 deletions datafusion/functions-nested/benches/map.rs
Original file line number Diff line number Diff line change
Expand Up @@ -15,8 +15,6 @@
// specific language governing permissions and limitations
// under the License.

extern crate criterion;

use arrow::array::{Int32Array, ListArray, StringArray};
use arrow::buffer::{OffsetBuffer, ScalarBuffer};
use arrow::datatypes::{DataType, Field};
Expand Down
1 change: 0 additions & 1 deletion datafusion/functions/benches/ascii.rs
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,6 @@
// specific language governing permissions and limitations
// under the License.

extern crate criterion;
mod helper;

use arrow::datatypes::{DataType, Field};
Expand Down
2 changes: 0 additions & 2 deletions datafusion/functions/benches/character_length.rs
Original file line number Diff line number Diff line change
Expand Up @@ -15,8 +15,6 @@
// specific language governing permissions and limitations
// under the License.

extern crate criterion;

use arrow::datatypes::{DataType, Field};
use criterion::{Criterion, criterion_group, criterion_main};
use datafusion_common::config::ConfigOptions;
Expand Down
2 changes: 0 additions & 2 deletions datafusion/functions/benches/chr.rs
Original file line number Diff line number Diff line change
Expand Up @@ -15,8 +15,6 @@
// specific language governing permissions and limitations
// under the License.

extern crate criterion;

use arrow::{array::PrimitiveArray, datatypes::Int64Type};
use criterion::{Criterion, criterion_group, criterion_main};
use datafusion_common::ScalarValue;
Expand Down
2 changes: 0 additions & 2 deletions datafusion/functions/benches/contains.rs
Original file line number Diff line number Diff line change
Expand Up @@ -15,8 +15,6 @@
// specific language governing permissions and limitations
// under the License.

extern crate criterion;

use arrow::array::{StringArray, StringViewArray};
use arrow::datatypes::{DataType, Field};
use criterion::{Criterion, criterion_group, criterion_main};
Expand Down
2 changes: 0 additions & 2 deletions datafusion/functions/benches/cot.rs
Original file line number Diff line number Diff line change
Expand Up @@ -15,8 +15,6 @@
// specific language governing permissions and limitations
// under the License.

extern crate criterion;

use arrow::{
datatypes::{Float32Type, Float64Type},
util::bench_util::create_primitive_array,
Expand Down
2 changes: 0 additions & 2 deletions datafusion/functions/benches/crypto.rs
Original file line number Diff line number Diff line change
Expand Up @@ -15,8 +15,6 @@
// specific language governing permissions and limitations
// under the License.

extern crate criterion;

use arrow::datatypes::{DataType, Field};
use arrow::util::bench_util::create_string_array_with_len;
use criterion::{Criterion, criterion_group, criterion_main};
Expand Down
2 changes: 0 additions & 2 deletions datafusion/functions/benches/date_bin.rs
Original file line number Diff line number Diff line change
Expand Up @@ -15,8 +15,6 @@
// specific language governing permissions and limitations
// under the License.

extern crate criterion;

use std::hint::black_box;
use std::sync::Arc;

Expand Down
2 changes: 0 additions & 2 deletions datafusion/functions/benches/date_trunc.rs
Original file line number Diff line number Diff line change
Expand Up @@ -15,8 +15,6 @@
// specific language governing permissions and limitations
// under the License.

extern crate criterion;

use std::hint::black_box;
use std::sync::Arc;

Expand Down
2 changes: 0 additions & 2 deletions datafusion/functions/benches/encoding.rs
Original file line number Diff line number Diff line change
Expand Up @@ -15,8 +15,6 @@
// specific language governing permissions and limitations
// under the License.

extern crate criterion;

use arrow::array::Array;
use arrow::datatypes::{DataType, Field};
use arrow::util::bench_util::create_binary_array;
Expand Down
2 changes: 0 additions & 2 deletions datafusion/functions/benches/ends_with.rs
Original file line number Diff line number Diff line change
Expand Up @@ -15,8 +15,6 @@
// specific language governing permissions and limitations
// under the License.

extern crate criterion;

use arrow::array::{StringArray, StringViewArray};
use arrow::datatypes::{DataType, Field};
use criterion::{Criterion, criterion_group, criterion_main};
Expand Down
2 changes: 0 additions & 2 deletions datafusion/functions/benches/factorial.rs
Original file line number Diff line number Diff line change
Expand Up @@ -15,8 +15,6 @@
// specific language governing permissions and limitations
// under the License.

extern crate criterion;

use arrow::array::Int64Array;
use arrow::datatypes::{DataType, Field};
use criterion::{Criterion, criterion_group, criterion_main};
Expand Down
Loading