Skip to content

Apache DataFusion SQL Query Engine

Fix `ScalarUDFImpl::propagate_constraints` doc (#10810)

张林伟d97ac8d65cf8
diff --git a/datafusion/expr/src/udf.rs b/datafusion/expr/src/udf.rs
index 0f3790e9d4..e14b62f1c8 100644
--- a/datafusion/expr/src/udf.rs
+++ b/datafusion/expr/src/udf.rs
@@ -244,8 +244,7 @@ impl ScalarUDF {
/// # Example
///
/// If the function is `ABS(a)`, the current `interval` is `[4, 5]` and the
- /// input `a` is given as `[-7, -6]`, then propagation would would return
- /// `[-5, 5]`.
+ /// input `a` is given as `[-7, 3]`, then propagation would return `[-5, 3]`.
pub fn propagate_constraints(
&self,
interval: &Interval,
@@ -504,8 +503,7 @@ pub trait ScalarUDFImpl: Debug + Send + Sync {
/// # Example
///
/// If the function is `ABS(a)`, the current `interval` is `[4, 5]` and the
- /// input `a` is given as `[-7, -6]`, then propagation would would return
- /// `[-5, 5]`.
+ /// input `a` is given as `[-7, 3]`, then propagation would return `[-5, 3]`.
fn propagate_constraints(
&self,
_interval: &Interval,
diff --git a/datafusion/physical-expr-common/src/physical_expr.rs b/datafusion/physical-expr-common/src/physical_expr.rs
index fd8d07dc96..1998f14396 100644
--- a/datafusion/physical-expr-common/src/physical_expr.rs
+++ b/datafusion/physical-expr-common/src/physical_expr.rs
@@ -112,8 +112,8 @@ pub trait PhysicalExpr: Send + Sync + Display + Debug + PartialEq<dyn Any> {
///
/// If the expression is `a + b`, the current `interval` is `[4, 5]` and the
/// inputs `a` and `b` are respectively given as `[0, 2]` and `[-∞, 4]`, then
- /// propagation would would return `[0, 2]` and `[2, 4]` as `b` must be at
- /// least `2` to make the output at least `4`.
+ /// propagation would return `[0, 2]` and `[2, 4]` as `b` must be at least
+ /// `2` to make the output at least `4`.
fn propagate_constraints(
&self,
_interval: &Interval,