Apache DataFusion SQL Query Engine
Fixed small typos in files of the optimizer (#5356)
Igor Izvekovd6ef4637447e
diff --git a/datafusion/optimizer/src/eliminate_cross_join.rs b/datafusion/optimizer/src/eliminate_cross_join.rsindex c19b43d297..c6b950c174 100644--- a/datafusion/optimizer/src/eliminate_cross_join.rs+++ b/datafusion/optimizer/src/eliminate_cross_join.rs@@ -38,7 +38,7 @@ impl EliminateCrossJoin {}}-/// Attempt to reorder join tp eliminate cross joins to inner joins.+/// Attempt to reorder join to eliminate cross joins to inner joins./// for queries:/// 'select ... from a, b where a.x = b.y and b.xx = 100;'/// 'select ... from a, b where (a.x = b.y and b.xx = 100) or (a.x = b.y and b.xx = 200);'diff --git a/datafusion/optimizer/src/eliminate_outer_join.rs b/datafusion/optimizer/src/eliminate_outer_join.rsindex 6a7914034b..66f22da219 100644--- a/datafusion/optimizer/src/eliminate_outer_join.rs+++ b/datafusion/optimizer/src/eliminate_outer_join.rs@@ -33,7 +33,7 @@ use std::sync::Arc;/// Attempt to replace outer joins with inner joins.////// Outer joins are typically more expensive to compute at runtime-/// than inner joins and prevent various forms fo predicate pushdown+/// than inner joins and prevent various forms of predicate pushdown/// and other optimizations, so removing them if possible is beneficial.////// Inner joins filter out rows that do match. Outer joins pass rows@@ -44,7 +44,7 @@ use std::sync::Arc;/// For example, in the `select ... from a left join b on ... where b.xx = 100;`////// For rows when `b.xx` is null (as it would be after an outer join),-/// the `b.xx = 100` predicate filters them out and there there is no+/// the `b.xx = 100` predicate filters them out and there is no/// need to produce null rows for output.////// Generally, an outer join can be rewritten to inner join if thediff --git a/datafusion/optimizer/src/optimizer.rs b/datafusion/optimizer/src/optimizer.rsindex f4f04b45a2..d2e414d213 100644--- a/datafusion/optimizer/src/optimizer.rs+++ b/datafusion/optimizer/src/optimizer.rs@@ -64,7 +64,7 @@ pub trait OptimizerRule {/// How should the rule be applied by the optimizer? See comments on [`ApplyOrder`] for details.///- /// If a rule use default None, its should traverse recursively plan inside itself+ /// If a rule use default None, it should traverse recursively plan inside itselffn apply_order(&self) -> Option<ApplyOrder> {None}diff --git a/datafusion/optimizer/src/simplify_expressions/expr_simplifier.rs b/datafusion/optimizer/src/simplify_expressions/expr_simplifier.rsindex 6ee1d01721..5421c43da1 100644--- a/datafusion/optimizer/src/simplify_expressions/expr_simplifier.rs+++ b/datafusion/optimizer/src/simplify_expressions/expr_simplifier.rs@@ -154,7 +154,7 @@ struct ConstEvaluator<'a> {/// traversal when we are N levels deep in the tree, one entry for/// this Expr and each of its parents.///- /// After visiting all siblings if `can_evauate.top()`` is true, that+ /// After visiting all siblings if `can_evaluate.top()` is true, that/// means there were no non evaluatable siblings (or their/// descendants) so this `Expr` can be evaluatedcan_evaluate: Vec<bool>,diff --git a/datafusion/optimizer/src/unwrap_cast_in_comparison.rs b/datafusion/optimizer/src/unwrap_cast_in_comparison.rsindex 604f353141..46c4d35227 100644--- a/datafusion/optimizer/src/unwrap_cast_in_comparison.rs+++ b/datafusion/optimizer/src/unwrap_cast_in_comparison.rs@@ -51,7 +51,7 @@ use std::sync::Arc;/// 4. `literal_expr IN (cast(expr1) , cast(expr2), ...)`////// If the expression matches one of the forms above, the rule will-/// ensure the value of `literal` is in within range(min, max) of the+/// ensure the value of `literal` is in range(min, max) of the/// expr's data_type, and if the scalar is within range, the literal/// will be casted to the data type of expr on the other side, and the/// cast will be removed from the other side.diff --git a/datafusion/optimizer/src/utils.rs b/datafusion/optimizer/src/utils.rsindex 765be46912..c6c03ad793 100644--- a/datafusion/optimizer/src/utils.rs+++ b/datafusion/optimizer/src/utils.rs@@ -416,7 +416,7 @@ pub fn only_or_err<T>(slice: &[T]) -> Result<&T> {/// Rewrites `expr` using `rewriter`, ensuring that the output has the/// same name as `expr` prior to rewrite, adding an alias if necessary.///-/// This is important when optimizing plans to ensure the the output+/// This is important when optimizing plans to ensure the output/// schema of plan nodes don't change after optimizationpub fn rewrite_preserving_name<R>(expr: Expr, rewriter: &mut R) -> Result<Expr>where@@ -436,7 +436,7 @@ fn name_for_alias(expr: &Expr) -> Result<String> {}}-/// Ensure `expr` has the name name as `original_name` by adding an+/// Ensure `expr` has the name as `original_name` by adding an/// alias if necessary.fn add_alias_if_changed(original_name: String, expr: Expr) -> Result<Expr> {let new_name = name_for_alias(&expr)?;