File tree Expand file tree Collapse file tree 1 file changed +5
-3
lines changed
Expand file tree Collapse file tree 1 file changed +5
-3
lines changed Original file line number Diff line number Diff line change @@ -28,6 +28,8 @@ use std::hint::black_box;
2828use std:: sync:: Arc ;
2929use tokio:: runtime:: Runtime ;
3030
31+ const LIMIT : usize = 10 ;
32+
3133async fn create_context (
3234 partition_cnt : i32 ,
3335 sample_cnt : i32 ,
@@ -77,7 +79,7 @@ async fn aggregate(
7779 let batches = collect ( plan, ctx. task_ctx ( ) ) . await ?;
7880 assert_eq ! ( batches. len( ) , 1 ) ;
7981 let batch = batches. first ( ) . unwrap ( ) ;
80- assert_eq ! ( batch. num_rows( ) , 10 ) ;
82+ assert_eq ! ( batch. num_rows( ) , LIMIT ) ;
8183
8284 let actual = format ! ( "{}" , pretty_format_batches( & batches) ?) . to_lowercase ( ) ;
8385 let expected_asc = r#"
@@ -126,14 +128,14 @@ async fn aggregate_string(
126128 let batches = collect ( plan, ctx. task_ctx ( ) ) . await ?;
127129 assert_eq ! ( batches. len( ) , 1 ) ;
128130 let batch = batches. first ( ) . unwrap ( ) ;
129- assert_eq ! ( batch. num_rows( ) , 10 ) ;
131+ assert_eq ! ( batch. num_rows( ) , LIMIT ) ;
130132
131133 Ok ( ( ) )
132134}
133135
134136fn criterion_benchmark ( c : & mut Criterion ) {
135137 let rt = Runtime :: new ( ) . unwrap ( ) ;
136- let limit = 10 ;
138+ let limit = LIMIT ;
137139 let partitions = 10 ;
138140 let samples = 1_000_000 ;
139141
You can’t perform that action at this time.
0 commit comments