Apache DataFusion SQL Query Engine
MINOR: replace `{..}` with `(_)`, typo, remove outdated TODO (#4286)
jakevin78401dfeeb02
diff --git a/datafusion/core/src/physical_plan/planner.rs b/datafusion/core/src/physical_plan/planner.rsindex 757ab7205e..b30b8ca82d 100644--- a/datafusion/core/src/physical_plan/planner.rs+++ b/datafusion/core/src/physical_plan/planner.rs@@ -711,7 +711,7 @@ impl DefaultPhysicalPlanner {// provided expressions into logical Column expressions if their results// are already provided from the input plans. Because we work with// qualified columns in logical plane, derived columns involve operators or- // functions will contain qualifers as well. This will result in logical+ // functions will contain qualifiers as well. This will result in logical// columns with names like `SUM(t1.c1)`, `t1.c1 + t1.c2`, etc.//// If we run these logical columns through physical_name function, we will@@ -2281,11 +2281,7 @@ mod tests {unimplemented!("NoOpExecutionPlan::execute");}- fn fmt_as(- &self,- t: DisplayFormatType,- f: &mut std::fmt::Formatter,- ) -> std::fmt::Result {+ fn fmt_as(&self, t: DisplayFormatType, f: &mut fmt::Formatter) -> fmt::Result {match t {DisplayFormatType::Default => {write!(f, "NoOpExecutionPlan")diff --git a/datafusion/core/src/physical_plan/windows/window_agg_exec.rs b/datafusion/core/src/physical_plan/windows/window_agg_exec.rsindex 248c4570da..8f0b5364f8 100644--- a/datafusion/core/src/physical_plan/windows/window_agg_exec.rs+++ b/datafusion/core/src/physical_plan/windows/window_agg_exec.rs@@ -214,7 +214,6 @@ impl ExecutionPlan for WindowAggExec {is_exact: input_stat.is_exact,num_rows: input_stat.num_rows,column_statistics: Some(column_statistics),- // TODO stats: knowing the type of the new columns we can guess the output sizetotal_byte_size: None,}}diff --git a/datafusion/expr/src/logical_plan/plan.rs b/datafusion/expr/src/logical_plan/plan.rsindex 12c1f96671..341e879fa9 100644--- a/datafusion/expr/src/logical_plan/plan.rs+++ b/datafusion/expr/src/logical_plan/plan.rs@@ -106,7 +106,7 @@ pub enum LogicalPlan {Extension(Extension),/// Remove duplicate rows from the inputDistinct(Distinct),- /// Set a Varaible+ /// Set a VariableSetVariable(SetVariable),}@@ -254,7 +254,7 @@ impl LogicalPlan {LogicalPlan::Sort(Sort { expr, .. }) => expr.clone(),LogicalPlan::Extension(extension) => extension.node.expressions(),// plans without expressions- LogicalPlan::TableScan { .. }+ LogicalPlan::TableScan(_)| LogicalPlan::EmptyRelation(_)| LogicalPlan::Subquery(_)| LogicalPlan::SubqueryAlias(_)@@ -268,8 +268,8 @@ impl LogicalPlan {| LogicalPlan::SetVariable(_)| LogicalPlan::DropView(_)| LogicalPlan::CrossJoin(_)- | LogicalPlan::Analyze { .. }- | LogicalPlan::Explain { .. }+ | LogicalPlan::Analyze(_)+ | LogicalPlan::Explain(_)| LogicalPlan::Union(_)| LogicalPlan::Distinct(_) => {vec![]diff --git a/datafusion/optimizer/src/common_subexpr_eliminate.rs b/datafusion/optimizer/src/common_subexpr_eliminate.rsindex 8369c12c3c..0ba976c081 100644--- a/datafusion/optimizer/src/common_subexpr_eliminate.rs+++ b/datafusion/optimizer/src/common_subexpr_eliminate.rs@@ -221,19 +221,19 @@ impl OptimizerRule for CommonSubexprEliminate {fetch: *fetch,}))}- LogicalPlan::Join { .. }+ LogicalPlan::Join(_)| LogicalPlan::CrossJoin(_)| LogicalPlan::Repartition(_)| LogicalPlan::Union(_)- | LogicalPlan::TableScan { .. }+ | LogicalPlan::TableScan(_)| LogicalPlan::Values(_)| LogicalPlan::EmptyRelation(_)| LogicalPlan::Subquery(_)| LogicalPlan::SubqueryAlias(_)| LogicalPlan::Limit(_)| LogicalPlan::CreateExternalTable(_)- | LogicalPlan::Explain { .. }- | LogicalPlan::Analyze { .. }+ | LogicalPlan::Explain(_)+ | LogicalPlan::Analyze(_)| LogicalPlan::CreateMemoryTable(_)| LogicalPlan::CreateView(_)| LogicalPlan::CreateCatalogSchema(_)@@ -242,7 +242,7 @@ impl OptimizerRule for CommonSubexprEliminate {| LogicalPlan::DropView(_)| LogicalPlan::SetVariable(_)| LogicalPlan::Distinct(_)- | LogicalPlan::Extension { .. } => {+ | LogicalPlan::Extension(_) => {// apply the optimization to all inputs of the planutils::optimize_children(self, plan, optimizer_config)}diff --git a/datafusion/optimizer/src/projection_push_down.rs b/datafusion/optimizer/src/projection_push_down.rsindex 5244bbcdbd..874e042e46 100644--- a/datafusion/optimizer/src/projection_push_down.rs+++ b/datafusion/optimizer/src/projection_push_down.rs@@ -112,9 +112,9 @@ fn get_projected_schema(// create the projected schemalet projected_fields: Vec<DFField> = match table_name {- Some(qualifer) => projection+ Some(qualifier) => projection.iter()- .map(|i| DFField::from_qualified(qualifer, schema.fields()[*i].clone()))+ .map(|i| DFField::from_qualified(qualifier, schema.fields()[*i].clone())).collect(),None => projection.iter()@@ -610,7 +610,7 @@ mod tests {}#[test]- fn redundunt_project() -> Result<()> {+ fn redundant_project() -> Result<()> {let table_scan = test_table_scan()?;let plan = LogicalPlanBuilder::from(table_scan)@@ -641,7 +641,7 @@ mod tests {}#[test]- fn noncontiguous_redundunt_projection() -> Result<()> {+ fn noncontinuous_redundant_projection() -> Result<()> {let table_scan = test_table_scan()?;let plan = LogicalPlanBuilder::from(table_scan)@@ -747,7 +747,7 @@ mod tests {#[test]fn join_schema_trim_using_join() -> Result<()> {- // shared join colums from using join should be pushed to both sides+ // shared join columns from using join should be pushed to both sideslet table_scan = test_table_scan()?;