This is an automated email from the ASF dual-hosted git repository.

alamb pushed a commit to branch main
in repository https://gitbox.apache.org/repos/asf/datafusion.git


The following commit(s) were added to refs/heads/main by this push:
     new d97ac8d65c Fix `ScalarUDFImpl::propagate_constraints` doc (#10810)
d97ac8d65c is described below

commit d97ac8d65cf834102b5b18ed1daa055f5582db98
Author: 张林伟 <[email protected]>
AuthorDate: Thu Jun 6 20:49:09 2024 +0800

    Fix `ScalarUDFImpl::propagate_constraints` doc (#10810)
    
    * Fix ScalarUDFImpl::propagate_constraints doc
    
    * Improve PhysicalExpr::propagate_constraints doc
---
 datafusion/expr/src/udf.rs                           | 6 ++----
 datafusion/physical-expr-common/src/physical_expr.rs | 4 ++--
 2 files changed, 4 insertions(+), 6 deletions(-)

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,


---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to