@@ -85,7 +85,7 @@ struct DataFusionCtx {
8585 ) > ,
8686
8787 session : SessionContext ,
88- emit_execution_plan : bool ,
88+ emit_plan : bool ,
8989}
9090
9191struct DuckDBCtx {
@@ -108,12 +108,12 @@ enum EngineCtx {
108108}
109109
110110impl EngineCtx {
111- fn new_with_datafusion ( session_ctx : SessionContext , emit_execution_plan : bool ) -> Self {
111+ fn new_with_datafusion ( session_ctx : SessionContext , emit_plan : bool ) -> Self {
112112 EngineCtx :: DataFusion ( DataFusionCtx {
113113 execution_plans : Vec :: new ( ) ,
114114 metrics : Vec :: new ( ) ,
115115 session : session_ctx,
116- emit_execution_plan ,
116+ emit_plan ,
117117 } )
118118 }
119119
@@ -438,37 +438,37 @@ fn execute_queries(
438438) -> Vec < QueryMeasurement > {
439439 let mut query_measurements = Vec :: default ( ) ;
440440
441- for ( query_idx, query_string) in queries {
441+ for & ( query_idx, ref query_string) in queries. iter ( ) {
442442 match engine_ctx {
443443 EngineCtx :: DataFusion ( ctx) => {
444444 let ( fastest_run, execution_plan) = benchmark_datafusion_query (
445- * query_idx,
445+ query_idx,
446446 query_string,
447447 iterations,
448448 & ctx. session ,
449449 tokio_runtime,
450450 ) ;
451451
452452 ctx. execution_plans
453- . push ( ( * query_idx, execution_plan. clone ( ) ) ) ;
453+ . push ( ( query_idx, execution_plan. clone ( ) ) ) ;
454454
455- if ctx. emit_execution_plan {
455+ if ctx. emit_plan {
456456 df:: write_execution_plan (
457- * query_idx,
457+ query_idx,
458458 file_format,
459459 CLICKBENCH_DATASET ,
460- & execution_plan,
460+ execution_plan. as_ref ( ) ,
461461 ) ;
462462 }
463463
464464 ctx. metrics . push ( (
465- * query_idx,
465+ query_idx,
466466 file_format,
467467 VortexMetricsFinder :: find_all ( execution_plan. as_ref ( ) ) ,
468468 ) ) ;
469469
470470 query_measurements. push ( QueryMeasurement {
471- query_idx : * query_idx ,
471+ query_idx,
472472 target : Target :: new ( Engine :: DataFusion , file_format) ,
473473 storage : STORAGE_NVME . to_owned ( ) ,
474474 fastest_run,
@@ -478,14 +478,14 @@ fn execute_queries(
478478
479479 EngineCtx :: DuckDB ( args) => {
480480 let fastest_run = benchmark_duckdb_query (
481- * query_idx,
481+ query_idx,
482482 query_string,
483483 iterations,
484484 & DuckDBExecutor :: new ( args. duckdb_path . clone ( ) , args. duckdb_file ( file_format) ) ,
485485 ) ;
486486
487487 query_measurements. push ( QueryMeasurement {
488- query_idx : * query_idx ,
488+ query_idx,
489489 target : Target :: new ( Engine :: DuckDB , file_format) ,
490490 storage : STORAGE_NVME . to_owned ( ) ,
491491 fastest_run,
0 commit comments