diff --git a/datafusion/optimizer/src/simplify_expressions/expr_simplifier.rs b/datafusion/optimizer/src/simplify_expressions/expr_simplifier.rs index edea3a7b9561..9b3f710ea874 100644 --- a/datafusion/optimizer/src/simplify_expressions/expr_simplifier.rs +++ b/datafusion/optimizer/src/simplify_expressions/expr_simplifier.rs @@ -3271,7 +3271,7 @@ mod tests { let output = simplify_with_guarantee(expr.clone(), &guarantees); assert_eq!(output, lit(false)); - // Guaranteed true or null -> no change. + // Guaranteed false or null -> no change. let guarantees = vec![ ( col("c3"), @@ -3283,7 +3283,7 @@ mod tests { ( col("c4"), NullableInterval { - values: Interval::make(Some(0_u32), Some(5_u32), (false, false)), + values: Interval::make(Some(9_u32), Some(9_u32), (false, false)), is_valid: Interval::UNCERTAIN, }, ), diff --git a/datafusion/physical-expr/src/intervals/interval_aritmetic.rs b/datafusion/physical-expr/src/intervals/interval_aritmetic.rs index 7dcf33175164..caf15dac7d9c 100644 --- a/datafusion/physical-expr/src/intervals/interval_aritmetic.rs +++ b/datafusion/physical-expr/src/intervals/interval_aritmetic.rs @@ -743,19 +743,19 @@ enum NullStatus { /// NullableInterval { /// values: Interval::make(Some(1), Some(2), (false, true)), /// is_valid: Interval::UNCERTAIN, -/// } +/// }; /// /// // (0, ∞) /// NullableInterval { /// values: Interval::make(Some(0), None, (true, true)), /// is_valid: Interval::CERTAINLY_TRUE, -/// } +/// }; /// /// // {NULL} -/// NullableInterval::from(ScalarValue::Int32(None)) +/// NullableInterval::from(&ScalarValue::Int32(None)); /// /// // {4} -/// NullableInterval::from(ScalarValue::Int32(4)) +/// NullableInterval::from(&ScalarValue::Int32(Some(4))); /// ``` #[derive(Debug, Clone, PartialEq, Eq, Default)] pub struct NullableInterval {