This is an automated email from the ASF dual-hosted git repository.
jakevin pushed a commit to branch main
in repository https://gitbox.apache.org/repos/asf/arrow-datafusion.git
The following commit(s) were added to refs/heads/main by this push:
new d6ef46374 Fixed small typos in files of the optimizer (#5356)
d6ef46374 is described below
commit d6ef4637447e5e7e74d9dfc92a2e7ad27adb491b
Author: Igor Izvekov <[email protected]>
AuthorDate: Fri Feb 24 20:43:10 2023 +0300
Fixed small typos in files of the optimizer (#5356)
* Fixed small typos in files of the optimizer
* Cleaned up the sentence in the file
"simplify_expressions/expr_simplifier.rs"
* Found more typos in the file "src/utils.rs"
* Deleted the duplicate in the file "src/unwrap_cast_in_comparison.rs"
---
datafusion/optimizer/src/eliminate_cross_join.rs | 2 +-
datafusion/optimizer/src/eliminate_outer_join.rs | 4 ++--
datafusion/optimizer/src/optimizer.rs | 2 +-
datafusion/optimizer/src/simplify_expressions/expr_simplifier.rs | 2 +-
datafusion/optimizer/src/unwrap_cast_in_comparison.rs | 2 +-
datafusion/optimizer/src/utils.rs | 4 ++--
6 files changed, 8 insertions(+), 8 deletions(-)
diff --git a/datafusion/optimizer/src/eliminate_cross_join.rs
b/datafusion/optimizer/src/eliminate_cross_join.rs
index c19b43d29..c6b950c17 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.rs
index 6a7914034..66f22da21 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 the
diff --git a/datafusion/optimizer/src/optimizer.rs
b/datafusion/optimizer/src/optimizer.rs
index f4f04b45a..d2e414d21 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
itself
fn 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.rs
index 6ee1d0172..5421c43da 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 evaluated
can_evaluate: Vec<bool>,
diff --git a/datafusion/optimizer/src/unwrap_cast_in_comparison.rs
b/datafusion/optimizer/src/unwrap_cast_in_comparison.rs
index 604f35314..46c4d3522 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.rs
index 765be4691..c6c03ad79 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 optimization
pub 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)?;