Skip to content

Commit

Permalink
Fix ScalarUDFImpl::propagate_constraints doc (#10810)
Browse files Browse the repository at this point in the history
* Fix ScalarUDFImpl::propagate_constraints doc

* Improve PhysicalExpr::propagate_constraints doc
  • Loading branch information
lewiszlw authored Jun 6, 2024
1 parent 1a26eca commit d97ac8d
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 6 deletions.
6 changes: 2 additions & 4 deletions datafusion/expr/src/udf.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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,
Expand Down Expand Up @@ -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,
Expand Down
4 changes: 2 additions & 2 deletions datafusion/physical-expr-common/src/physical_expr.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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,
Expand Down

0 comments on commit d97ac8d

Please sign in to comment.