18
18
//! CoalesceBatches optimizer that groups batches together rows
19
19
//! in bigger batches to avoid overhead with small batches
20
20
21
+ use crate :: PhysicalOptimizerRule ;
22
+
21
23
use std:: sync:: Arc ;
22
24
23
- use crate :: {
24
- config:: ConfigOptions ,
25
- error:: Result ,
26
- physical_plan:: {
27
- coalesce_batches:: CoalesceBatchesExec , filter:: FilterExec , joins:: HashJoinExec ,
28
- repartition:: RepartitionExec , Partitioning ,
29
- } ,
25
+ use datafusion_common:: config:: ConfigOptions ;
26
+ use datafusion_common:: error:: Result ;
27
+ use datafusion_physical_expr:: Partitioning ;
28
+ use datafusion_physical_plan:: {
29
+ coalesce_batches:: CoalesceBatchesExec , filter:: FilterExec , joins:: HashJoinExec ,
30
+ repartition:: RepartitionExec , ExecutionPlan ,
30
31
} ;
31
32
32
33
use datafusion_common:: tree_node:: { Transformed , TransformedResult , TreeNode } ;
33
- use datafusion_physical_optimizer:: PhysicalOptimizerRule ;
34
34
35
35
/// Optimizer rule that introduces CoalesceBatchesExec to avoid overhead with small batches that
36
36
/// are produced by highly selective filters
@@ -46,9 +46,9 @@ impl CoalesceBatches {
46
46
impl PhysicalOptimizerRule for CoalesceBatches {
47
47
fn optimize (
48
48
& self ,
49
- plan : Arc < dyn crate :: physical_plan :: ExecutionPlan > ,
49
+ plan : Arc < dyn ExecutionPlan > ,
50
50
config : & ConfigOptions ,
51
- ) -> Result < Arc < dyn crate :: physical_plan :: ExecutionPlan > > {
51
+ ) -> Result < Arc < dyn ExecutionPlan > > {
52
52
if !config. execution . coalesce_batches {
53
53
return Ok ( plan) ;
54
54
}
0 commit comments