Skip to content

Commit 91c8a47

Browse files
authored
Require Debug for PhysicalOptimizerRule (#12624)
* Require Debug for PhysicalOptimizerRule * Add reference to meet &JoinType type required * Revert "Add reference to meet &JoinType type required" as clippy lint informs this is unnecessary This reverts commit f69d73c.
1 parent b55da25 commit 91c8a47

14 files changed

+15
-12
lines changed

datafusion/core/src/physical_optimizer/coalesce_batches.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -34,7 +34,7 @@ use datafusion_physical_optimizer::PhysicalOptimizerRule;
3434

3535
/// Optimizer rule that introduces CoalesceBatchesExec to avoid overhead with small batches that
3636
/// are produced by highly selective filters
37-
#[derive(Default)]
37+
#[derive(Default, Debug)]
3838
pub struct CoalesceBatches {}
3939

4040
impl CoalesceBatches {

datafusion/core/src/physical_optimizer/enforce_distribution.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -176,7 +176,7 @@ use itertools::izip;
176176
///
177177
/// This rule only chooses the exact match and satisfies the Distribution(a, b, c)
178178
/// by a HashPartition(a, b, c).
179-
#[derive(Default)]
179+
#[derive(Default, Debug)]
180180
pub struct EnforceDistribution {}
181181

182182
impl EnforceDistribution {

datafusion/core/src/physical_optimizer/enforce_sorting.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -72,7 +72,7 @@ use itertools::izip;
7272

7373
/// This rule inspects [`SortExec`]'s in the given physical plan and removes the
7474
/// ones it can prove unnecessary.
75-
#[derive(Default)]
75+
#[derive(Default, Debug)]
7676
pub struct EnforceSorting {}
7777

7878
impl EnforceSorting {

datafusion/core/src/physical_optimizer/join_selection.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -46,7 +46,7 @@ use datafusion_physical_optimizer::PhysicalOptimizerRule;
4646
/// The [`JoinSelection`] rule tries to modify a given plan so that it can
4747
/// accommodate infinite sources and optimize joins in the plan according to
4848
/// available statistical information, if there is any.
49-
#[derive(Default)]
49+
#[derive(Default, Debug)]
5050
pub struct JoinSelection {}
5151

5252
impl JoinSelection {

datafusion/core/src/physical_optimizer/optimizer.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -35,7 +35,7 @@ use crate::physical_optimizer::sanity_checker::SanityCheckPlan;
3535
use crate::physical_optimizer::topk_aggregation::TopKAggregation;
3636

3737
/// A rule-based physical optimizer.
38-
#[derive(Clone)]
38+
#[derive(Clone, Debug)]
3939
pub struct PhysicalOptimizer {
4040
/// All rules to apply
4141
pub rules: Vec<Arc<dyn PhysicalOptimizerRule + Send + Sync>>,

datafusion/core/src/physical_optimizer/projection_pushdown.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -60,7 +60,7 @@ use itertools::Itertools;
6060

6161
/// This rule inspects [`ProjectionExec`]'s in the given physical plan and tries to
6262
/// remove or swap with its child.
63-
#[derive(Default)]
63+
#[derive(Default, Debug)]
6464
pub struct ProjectionPushdown {}
6565

6666
impl ProjectionPushdown {

datafusion/core/src/physical_optimizer/sanity_checker.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -41,7 +41,7 @@ use itertools::izip;
4141
/// are not satisfied by their children.
4242
/// 2. Plans that use pipeline-breaking operators on infinite input(s),
4343
/// it is impossible to execute such queries (they will never generate output nor finish)
44-
#[derive(Default)]
44+
#[derive(Default, Debug)]
4545
pub struct SanityCheckPlan {}
4646

4747
impl SanityCheckPlan {

datafusion/core/src/physical_optimizer/update_aggr_exprs.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -48,7 +48,7 @@ use datafusion_physical_plan::{
4848
/// This rule analyzes aggregate expressions of type `Beneficial` to see whether
4949
/// their input ordering requirements are satisfied. If this is the case, the
5050
/// aggregators are modified to run in a more efficient mode.
51-
#[derive(Default)]
51+
#[derive(Default, Debug)]
5252
pub struct OptimizeAggregateOrder {}
5353

5454
impl OptimizeAggregateOrder {

datafusion/physical-optimizer/src/aggregate_statistics.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -33,7 +33,7 @@ use datafusion_physical_plan::placeholder_row::PlaceholderRowExec;
3333
use datafusion_physical_plan::udaf::AggregateFunctionExpr;
3434

3535
/// Optimizer that uses available statistics for aggregate functions
36-
#[derive(Default)]
36+
#[derive(Default, Debug)]
3737
pub struct AggregateStatistics {}
3838

3939
impl AggregateStatistics {

datafusion/physical-optimizer/src/combine_partial_final_agg.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -37,7 +37,7 @@ use datafusion_physical_expr::{physical_exprs_equal, PhysicalExpr};
3737
///
3838
/// This rule should be applied after the EnforceDistribution and EnforceSorting rules
3939
///
40-
#[derive(Default)]
40+
#[derive(Default, Debug)]
4141
pub struct CombinePartialFinalAggregate {}
4242

4343
impl CombinePartialFinalAggregate {

0 commit comments

Comments
 (0)