Skip to content

Commit

Permalink
docs: fix PruningStatistics example and some typos (#3062)
Browse files Browse the repository at this point in the history
  • Loading branch information
roeap authored Aug 7, 2022
1 parent 1bbdf48 commit 0e0931d
Showing 1 changed file with 6 additions and 6 deletions.
12 changes: 6 additions & 6 deletions datafusion/core/src/physical_optimizer/pruning.rs
Original file line number Diff line number Diff line change
Expand Up @@ -63,7 +63,7 @@ use datafusion_physical_expr::create_physical_expr;
///
/// ```text
/// min_values("a") -> Some([5, Null, 20])
/// max_values("a") -> Some([20, Null, 30])
/// max_values("a") -> Some([10, Null, 30])
/// min_values("X") -> None
/// ```
pub trait PruningStatistics {
Expand Down Expand Up @@ -116,7 +116,7 @@ impl PruningPredicate {
///
/// The pruning predicate evaluates to TRUE or NULL
/// if the filter predicate *might* evaluate to TRUE for at least
/// one row whose vaules fell within the min/max ranges (in other
/// one row whose values fell within the min/max ranges (in other
/// words they might pass the predicate)
///
/// For example, the filter expression `(column / 2) = 4` becomes
Expand Down Expand Up @@ -150,7 +150,7 @@ impl PruningPredicate {
})
}

/// For each set of statistics, evalates the pruning predicate
/// For each set of statistics, evaluates the pruning predicate
/// and returns a `bool` with the following meaning for a
/// all rows whose values match the statistics:
///
Expand Down Expand Up @@ -235,7 +235,7 @@ impl RequiredStatColumns {
Self::default()
}

/// Retur an iterator over items in columns (see doc on
/// Returns an iterator over items in columns (see doc on
/// `self.columns` for details)
fn iter(&self) -> impl Iterator<Item = &(Column, StatisticsType, Field)> {
self.columns.iter()
Expand All @@ -259,7 +259,7 @@ impl RequiredStatColumns {
///
/// for example, an expression like `col("foo") > 5`, when called
/// with Max would result in an expression like `col("foo_max") >
/// 5` with the approprate entry noted in self.columns
/// 5` with the appropriate entry noted in self.columns
fn stat_column_expr(
&mut self,
column: &Column,
Expand Down Expand Up @@ -780,7 +780,7 @@ fn build_statistics_expr(expr_builder: &mut PruningExpressionBuilder) -> Result<
}
// other expressions are not supported
_ => return Err(DataFusionError::Plan(
"expressions other than (neq, eq, gt, gteq, lt, lteq) are not superted"
"expressions other than (neq, eq, gt, gteq, lt, lteq) are not supported"
.to_string(),
)),
};
Expand Down

0 comments on commit 0e0931d

Please sign in to comment.