Skip to content

Commit 0e0931d

Browse files
authored
docs: fix PruningStatistics example and some typos (#3062)
1 parent 1bbdf48 commit 0e0931d

File tree

1 file changed

+6
-6
lines changed

1 file changed

+6
-6
lines changed

datafusion/core/src/physical_optimizer/pruning.rs

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -63,7 +63,7 @@ use datafusion_physical_expr::create_physical_expr;
6363
///
6464
/// ```text
6565
/// min_values("a") -> Some([5, Null, 20])
66-
/// max_values("a") -> Some([20, Null, 30])
66+
/// max_values("a") -> Some([10, Null, 30])
6767
/// min_values("X") -> None
6868
/// ```
6969
pub trait PruningStatistics {
@@ -116,7 +116,7 @@ impl PruningPredicate {
116116
///
117117
/// The pruning predicate evaluates to TRUE or NULL
118118
/// if the filter predicate *might* evaluate to TRUE for at least
119-
/// one row whose vaules fell within the min/max ranges (in other
119+
/// one row whose values fell within the min/max ranges (in other
120120
/// words they might pass the predicate)
121121
///
122122
/// For example, the filter expression `(column / 2) = 4` becomes
@@ -150,7 +150,7 @@ impl PruningPredicate {
150150
})
151151
}
152152

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

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

0 commit comments

Comments
 (0)