From 4f34ffe607da3df80453b093d335128aa8d51750 Mon Sep 17 00:00:00 2001 From: berkaysynnada Date: Tue, 21 May 2024 15:42:00 +0300 Subject: [PATCH] Renaming --- datafusion-examples/examples/advanced_udf.rs | 2 +- .../examples/function_factory.rs | 2 +- datafusion/expr/src/udf.rs | 6 +- datafusion/functions/src/datetime/date_bin.rs | 2 +- .../functions/src/datetime/date_trunc.rs | 2 +- datafusion/functions/src/macros.rs | 16 ++--- datafusion/functions/src/math/abs.rs | 2 +- datafusion/functions/src/math/log.rs | 2 +- datafusion/functions/src/math/mod.rs | 54 ++++++++--------- datafusion/functions/src/math/monotonicity.rs | 58 +++++++++---------- datafusion/functions/src/math/pi.rs | 2 +- datafusion/functions/src/math/round.rs | 2 +- datafusion/functions/src/math/trunc.rs | 2 +- .../physical-expr/src/scalar_function.rs | 2 +- datafusion/physical-expr/src/utils/mod.rs | 2 +- .../src/joins/stream_join_utils.rs | 2 +- 16 files changed, 76 insertions(+), 82 deletions(-) diff --git a/datafusion-examples/examples/advanced_udf.rs b/datafusion-examples/examples/advanced_udf.rs index d1ef1c6c9dd05..9a3ee9c8ebcd4 100644 --- a/datafusion-examples/examples/advanced_udf.rs +++ b/datafusion-examples/examples/advanced_udf.rs @@ -181,7 +181,7 @@ impl ScalarUDFImpl for PowUdf { &self.aliases } - fn monotonicity(&self, input: &[ExprProperties]) -> Result { + fn output_ordering(&self, input: &[ExprProperties]) -> Result { // The POW function preserves the order of its argument. Ok(input[0].sort_properties) } diff --git a/datafusion-examples/examples/function_factory.rs b/datafusion-examples/examples/function_factory.rs index 9e624b66294da..d61c19af47a49 100644 --- a/datafusion-examples/examples/function_factory.rs +++ b/datafusion-examples/examples/function_factory.rs @@ -157,7 +157,7 @@ impl ScalarUDFImpl for ScalarFunctionWrapper { &[] } - fn monotonicity(&self, _input: &[ExprProperties]) -> Result { + fn output_ordering(&self, _input: &[ExprProperties]) -> Result { Ok(SortProperties::Unordered) } } diff --git a/datafusion/expr/src/udf.rs b/datafusion/expr/src/udf.rs index 921d13ab35833..dd1f6200d09ab 100644 --- a/datafusion/expr/src/udf.rs +++ b/datafusion/expr/src/udf.rs @@ -256,8 +256,8 @@ impl ScalarUDF { /// Calculates the [`SortProperties`] of this function based on its /// children's properties. - pub fn monotonicity(&self, inputs: &[ExprProperties]) -> Result { - self.inner.monotonicity(inputs) + pub fn output_ordering(&self, inputs: &[ExprProperties]) -> Result { + self.inner.output_ordering(inputs) } /// See [`ScalarUDFImpl::coerce_types`] for more details. @@ -516,7 +516,7 @@ pub trait ScalarUDFImpl: Debug + Send + Sync { /// Calculates the [`SortProperties`] of this function based on its /// children's properties. - fn monotonicity(&self, _inputs: &[ExprProperties]) -> Result { + fn output_ordering(&self, _inputs: &[ExprProperties]) -> Result { Ok(SortProperties::Unordered) } diff --git a/datafusion/functions/src/datetime/date_bin.rs b/datafusion/functions/src/datetime/date_bin.rs index 51f5c09a06657..a5404532ace64 100644 --- a/datafusion/functions/src/datetime/date_bin.rs +++ b/datafusion/functions/src/datetime/date_bin.rs @@ -147,7 +147,7 @@ impl ScalarUDFImpl for DateBinFunc { } } - fn monotonicity(&self, input: &[ExprProperties]) -> Result { + fn output_ordering(&self, input: &[ExprProperties]) -> Result { // The DATE_BIN function preserves the order of its second argument. let step = &input[0]; let date_value = &input[1]; diff --git a/datafusion/functions/src/datetime/date_trunc.rs b/datafusion/functions/src/datetime/date_trunc.rs index ba5db567a0250..6b52507a9c6f0 100644 --- a/datafusion/functions/src/datetime/date_trunc.rs +++ b/datafusion/functions/src/datetime/date_trunc.rs @@ -204,7 +204,7 @@ impl ScalarUDFImpl for DateTruncFunc { &self.aliases } - fn monotonicity(&self, input: &[ExprProperties]) -> Result { + fn output_ordering(&self, input: &[ExprProperties]) -> Result { // The DATE_TRUNC function preserves the order of its second argument. let precision = &input[0]; let date_value = &input[1]; diff --git a/datafusion/functions/src/macros.rs b/datafusion/functions/src/macros.rs index 2f14e881d1d8d..dcc37f100c9ae 100644 --- a/datafusion/functions/src/macros.rs +++ b/datafusion/functions/src/macros.rs @@ -154,9 +154,9 @@ macro_rules! downcast_arg { /// $GNAME: a singleton instance of the UDF /// $NAME: the name of the function /// $UNARY_FUNC: the unary function to apply to the argument -/// $MONOTONIC_FUNC: the monotonicity of the function +/// $OUTPUT_ORDERING: the output ordering calculation method of the function macro_rules! make_math_unary_udf { - ($UDF:ident, $GNAME:ident, $NAME:ident, $UNARY_FUNC:ident, $MONOTONICITY:expr) => { + ($UDF:ident, $GNAME:ident, $NAME:ident, $UNARY_FUNC:ident, $OUTPUT_ORDERING:expr) => { make_udf_function!($NAME::$UDF, $GNAME, $NAME); mod $NAME { @@ -209,11 +209,11 @@ macro_rules! make_math_unary_udf { } } - fn monotonicity( + fn output_ordering( &self, input: &[ExprProperties], ) -> Result { - $MONOTONICITY(input) + $OUTPUT_ORDERING(input) } fn invoke(&self, args: &[ColumnarValue]) -> Result { @@ -261,9 +261,9 @@ macro_rules! make_math_unary_udf { /// $GNAME: a singleton instance of the UDF /// $NAME: the name of the function /// $BINARY_FUNC: the binary function to apply to the argument -/// $MONOTONIC_FUNC: the monotonicity of the function +/// $OUTPUT_ORDERING: the output ordering calculation method of the function macro_rules! make_math_binary_udf { - ($UDF:ident, $GNAME:ident, $NAME:ident, $BINARY_FUNC:ident, $MONOTONICITY:expr) => { + ($UDF:ident, $GNAME:ident, $NAME:ident, $BINARY_FUNC:ident, $OUTPUT_ORDERING:expr) => { make_udf_function!($NAME::$UDF, $GNAME, $NAME); mod $NAME { @@ -319,11 +319,11 @@ macro_rules! make_math_binary_udf { } } - fn monotonicity( + fn output_ordering( &self, input: &[ExprProperties], ) -> Result { - $MONOTONICITY(input) + $OUTPUT_ORDERING(input) } fn invoke(&self, args: &[ColumnarValue]) -> Result { diff --git a/datafusion/functions/src/math/abs.rs b/datafusion/functions/src/math/abs.rs index a752102913ba6..6d07b14f866e3 100644 --- a/datafusion/functions/src/math/abs.rs +++ b/datafusion/functions/src/math/abs.rs @@ -170,7 +170,7 @@ impl ScalarUDFImpl for AbsFunc { abs_fun(&args).map(ColumnarValue::Array) } - fn monotonicity(&self, input: &[ExprProperties]) -> Result { + fn output_ordering(&self, input: &[ExprProperties]) -> Result { // Non-decreasing for x ≥ 0 and symmetrically non-increasing for x ≤ 0. let arg = &input[0]; let range = &arg.range; diff --git a/datafusion/functions/src/math/log.rs b/datafusion/functions/src/math/log.rs index 8c1e8ac8fea36..0791561539e1e 100644 --- a/datafusion/functions/src/math/log.rs +++ b/datafusion/functions/src/math/log.rs @@ -81,7 +81,7 @@ impl ScalarUDFImpl for LogFunc { } } - fn monotonicity(&self, input: &[ExprProperties]) -> Result { + fn output_ordering(&self, input: &[ExprProperties]) -> Result { match (input[0].sort_properties, input[1].sort_properties) { (first @ SortProperties::Ordered(value), SortProperties::Ordered(base)) if !value.descending && base.descending diff --git a/datafusion/functions/src/math/mod.rs b/datafusion/functions/src/math/mod.rs index 6c26ce79d0a58..387237acb7693 100644 --- a/datafusion/functions/src/math/mod.rs +++ b/datafusion/functions/src/math/mod.rs @@ -41,36 +41,36 @@ pub mod trunc; // Create UDFs make_udf_function!(abs::AbsFunc, ABS, abs); -make_math_unary_udf!(AcosFunc, ACOS, acos, acos, super::acos_monotonicity); -make_math_unary_udf!(AcoshFunc, ACOSH, acosh, acosh, super::acosh_monotonicity); -make_math_unary_udf!(AsinFunc, ASIN, asin, asin, super::asin_monotonicity); -make_math_unary_udf!(AsinhFunc, ASINH, asinh, asinh, super::asinh_monotonicity); -make_math_unary_udf!(AtanFunc, ATAN, atan, atan, super::atan_monotonicity); -make_math_unary_udf!(AtanhFunc, ATANH, atanh, atanh, super::atanh_monotonicity); -make_math_binary_udf!(Atan2, ATAN2, atan2, atan2, super::atan2_monotonicity); -make_math_unary_udf!(CbrtFunc, CBRT, cbrt, cbrt, super::cbrt_monotonicity); -make_math_unary_udf!(CeilFunc, CEIL, ceil, ceil, super::ceil_monotonicity); -make_math_unary_udf!(CosFunc, COS, cos, cos, super::cos_monotonicity); -make_math_unary_udf!(CoshFunc, COSH, cosh, cosh, super::cosh_monotonicity); +make_math_unary_udf!(AcosFunc, ACOS, acos, acos, super::acos_order); +make_math_unary_udf!(AcoshFunc, ACOSH, acosh, acosh, super::acosh_order); +make_math_unary_udf!(AsinFunc, ASIN, asin, asin, super::asin_order); +make_math_unary_udf!(AsinhFunc, ASINH, asinh, asinh, super::asinh_order); +make_math_unary_udf!(AtanFunc, ATAN, atan, atan, super::atan_order); +make_math_unary_udf!(AtanhFunc, ATANH, atanh, atanh, super::atanh_order); +make_math_binary_udf!(Atan2, ATAN2, atan2, atan2, super::atan2_order); +make_math_unary_udf!(CbrtFunc, CBRT, cbrt, cbrt, super::cbrt_order); +make_math_unary_udf!(CeilFunc, CEIL, ceil, ceil, super::ceil_order); +make_math_unary_udf!(CosFunc, COS, cos, cos, super::cos_order); +make_math_unary_udf!(CoshFunc, COSH, cosh, cosh, super::cosh_order); make_udf_function!(cot::CotFunc, COT, cot); make_math_unary_udf!( DegreesFunc, DEGREES, degrees, to_degrees, - super::degrees_monotonicity + super::degrees_order ); -make_math_unary_udf!(ExpFunc, EXP, exp, exp, super::exp_monotonicity); +make_math_unary_udf!(ExpFunc, EXP, exp, exp, super::exp_order); make_udf_function!(factorial::FactorialFunc, FACTORIAL, factorial); -make_math_unary_udf!(FloorFunc, FLOOR, floor, floor, super::floor_monotonicity); +make_math_unary_udf!(FloorFunc, FLOOR, floor, floor, super::floor_order); make_udf_function!(log::LogFunc, LOG, log); make_udf_function!(gcd::GcdFunc, GCD, gcd); make_udf_function!(nans::IsNanFunc, ISNAN, isnan); make_udf_function!(iszero::IsZeroFunc, ISZERO, iszero); make_udf_function!(lcm::LcmFunc, LCM, lcm); -make_math_unary_udf!(LnFunc, LN, ln, ln, super::ln_monotonicity); -make_math_unary_udf!(Log2Func, LOG2, log2, log2, super::log2_monotonicity); -make_math_unary_udf!(Log10Func, LOG10, log10, log10, super::log10_monotonicity); +make_math_unary_udf!(LnFunc, LN, ln, ln, super::ln_order); +make_math_unary_udf!(Log2Func, LOG2, log2, log2, super::log2_order); +make_math_unary_udf!(Log10Func, LOG10, log10, log10, super::log10_order); make_udf_function!(nanvl::NanvlFunc, NANVL, nanvl); make_udf_function!(pi::PiFunc, PI, pi); make_udf_function!(power::PowerFunc, POWER, power); @@ -79,22 +79,16 @@ make_math_unary_udf!( RADIANS, radians, to_radians, - super::radians_monotonicity + super::radians_order ); make_udf_function!(random::RandomFunc, RANDOM, random); make_udf_function!(round::RoundFunc, ROUND, round); -make_math_unary_udf!( - SignumFunc, - SIGNUM, - signum, - signum, - super::signum_monotonicity -); -make_math_unary_udf!(SinFunc, SIN, sin, sin, super::sin_monotonicity); -make_math_unary_udf!(SinhFunc, SINH, sinh, sinh, super::sinh_monotonicity); -make_math_unary_udf!(SqrtFunc, SQRT, sqrt, sqrt, super::sqrt_monotonicity); -make_math_unary_udf!(TanFunc, TAN, tan, tan, super::tan_monotonicity); -make_math_unary_udf!(TanhFunc, TANH, tanh, tanh, super::tanh_monotonicity); +make_math_unary_udf!(SignumFunc, SIGNUM, signum, signum, super::signum_order); +make_math_unary_udf!(SinFunc, SIN, sin, sin, super::sin_order); +make_math_unary_udf!(SinhFunc, SINH, sinh, sinh, super::sinh_order); +make_math_unary_udf!(SqrtFunc, SQRT, sqrt, sqrt, super::sqrt_order); +make_math_unary_udf!(TanFunc, TAN, tan, tan, super::tan_order); +make_math_unary_udf!(TanhFunc, TANH, tanh, tanh, super::tanh_order); make_udf_function!(trunc::TruncFunc, TRUNC, trunc); pub mod expr_fn { diff --git a/datafusion/functions/src/math/monotonicity.rs b/datafusion/functions/src/math/monotonicity.rs index 5ce5654ae79e0..56c5a45788bc8 100644 --- a/datafusion/functions/src/math/monotonicity.rs +++ b/datafusion/functions/src/math/monotonicity.rs @@ -28,7 +28,7 @@ fn symmetric_unit_interval(data_type: &DataType) -> Result { } /// Non-increasing on the interval \[−1, 1\], undefined otherwise. -pub fn acos_monotonicity(input: &[ExprProperties]) -> Result { +pub fn acos_order(input: &[ExprProperties]) -> Result { let arg = &input[0]; let range = &arg.range; @@ -42,7 +42,7 @@ pub fn acos_monotonicity(input: &[ExprProperties]) -> Result { } /// Non-decreasing for x ≥ 1, undefined otherwise. -pub fn acosh_monotonicity(input: &[ExprProperties]) -> Result { +pub fn acosh_order(input: &[ExprProperties]) -> Result { let arg = &input[0]; let range = &arg.range; @@ -59,7 +59,7 @@ pub fn acosh_monotonicity(input: &[ExprProperties]) -> Result { } /// Non-decreasing on the interval \[−1, 1\], undefined otherwise. -pub fn asin_monotonicity(input: &[ExprProperties]) -> Result { +pub fn asin_order(input: &[ExprProperties]) -> Result { let arg = &input[0]; let range = &arg.range; @@ -73,17 +73,17 @@ pub fn asin_monotonicity(input: &[ExprProperties]) -> Result { } /// Non-decreasing for all real numbers. -pub fn asinh_monotonicity(input: &[ExprProperties]) -> Result { +pub fn asinh_order(input: &[ExprProperties]) -> Result { Ok(input[0].sort_properties) } /// Non-decreasing for all real numbers. -pub fn atan_monotonicity(input: &[ExprProperties]) -> Result { +pub fn atan_order(input: &[ExprProperties]) -> Result { Ok(input[0].sort_properties) } /// Non-decreasing on the interval \[−1, 1\], undefined otherwise. -pub fn atanh_monotonicity(input: &[ExprProperties]) -> Result { +pub fn atanh_order(input: &[ExprProperties]) -> Result { let arg = &input[0]; let range = &arg.range; @@ -96,31 +96,31 @@ pub fn atanh_monotonicity(input: &[ExprProperties]) -> Result { } } -/// Monotonicity depends on the quadrant. -// TODO: Implement monotonicity of the ATAN2 function. -pub fn atan2_monotonicity(_input: &[ExprProperties]) -> Result { +/// Order depends on the quadrant. +// TODO: Implement ordering rule of the ATAN2 function. +pub fn atan2_order(_input: &[ExprProperties]) -> Result { Ok(SortProperties::Unordered) } /// Non-decreasing for all real numbers. -pub fn cbrt_monotonicity(input: &[ExprProperties]) -> Result { +pub fn cbrt_order(input: &[ExprProperties]) -> Result { Ok(input[0].sort_properties) } /// Non-decreasing for all real numbers. -pub fn ceil_monotonicity(input: &[ExprProperties]) -> Result { +pub fn ceil_order(input: &[ExprProperties]) -> Result { Ok(input[0].sort_properties) } /// Non-increasing on \[0, π\] and then non-decreasing on \[π, 2π\]. /// This pattern repeats periodically with a period of 2π. -// TODO: Implement monotonicity of the ATAN2 function. -pub fn cos_monotonicity(_input: &[ExprProperties]) -> Result { +// TODO: Implement ordering rule of the ATAN2 function. +pub fn cos_order(_input: &[ExprProperties]) -> Result { Ok(SortProperties::Unordered) } /// Non-decreasing for x ≥ 0 and symmetrically non-increasing for x ≤ 0. -pub fn cosh_monotonicity(input: &[ExprProperties]) -> Result { +pub fn cosh_order(input: &[ExprProperties]) -> Result { let arg = &input[0]; let range = &arg.range; @@ -136,22 +136,22 @@ pub fn cosh_monotonicity(input: &[ExprProperties]) -> Result { } /// Non-decreasing function that converts radians to degrees. -pub fn degrees_monotonicity(input: &[ExprProperties]) -> Result { +pub fn degrees_order(input: &[ExprProperties]) -> Result { Ok(input[0].sort_properties) } /// Non-decreasing for all real numbers. -pub fn exp_monotonicity(input: &[ExprProperties]) -> Result { +pub fn exp_order(input: &[ExprProperties]) -> Result { Ok(input[0].sort_properties) } /// Non-decreasing for all real numbers. -pub fn floor_monotonicity(input: &[ExprProperties]) -> Result { +pub fn floor_order(input: &[ExprProperties]) -> Result { Ok(input[0].sort_properties) } /// Non-decreasing for x ≥ 0, undefined otherwise. -pub fn ln_monotonicity(input: &[ExprProperties]) -> Result { +pub fn ln_order(input: &[ExprProperties]) -> Result { let arg = &input[0]; let range = &arg.range; @@ -165,7 +165,7 @@ pub fn ln_monotonicity(input: &[ExprProperties]) -> Result { } /// Non-decreasing for x ≥ 0, undefined otherwise. -pub fn log2_monotonicity(input: &[ExprProperties]) -> Result { +pub fn log2_order(input: &[ExprProperties]) -> Result { let arg = &input[0]; let range = &arg.range; @@ -179,7 +179,7 @@ pub fn log2_monotonicity(input: &[ExprProperties]) -> Result { } /// Non-decreasing for x ≥ 0, undefined otherwise. -pub fn log10_monotonicity(input: &[ExprProperties]) -> Result { +pub fn log10_order(input: &[ExprProperties]) -> Result { let arg = &input[0]; let range = &arg.range; @@ -193,29 +193,29 @@ pub fn log10_monotonicity(input: &[ExprProperties]) -> Result { } /// Non-decreasing for all real numbers x. -pub fn radians_monotonicity(input: &[ExprProperties]) -> Result { +pub fn radians_order(input: &[ExprProperties]) -> Result { Ok(input[0].sort_properties) } /// Non-decreasing for all real numbers x. -pub fn signum_monotonicity(input: &[ExprProperties]) -> Result { +pub fn signum_order(input: &[ExprProperties]) -> Result { Ok(input[0].sort_properties) } /// Non-decreasing on \[0, π\] and then non-increasing on \[π, 2π\]. /// This pattern repeats periodically with a period of 2π. -// TODO: Implement monotonicity of the SIN function. -pub fn sin_monotonicity(_input: &[ExprProperties]) -> Result { +// TODO: Implement ordering rule of the SIN function. +pub fn sin_order(_input: &[ExprProperties]) -> Result { Ok(SortProperties::Unordered) } /// Non-decreasing for all real numbers. -pub fn sinh_monotonicity(input: &[ExprProperties]) -> Result { +pub fn sinh_order(input: &[ExprProperties]) -> Result { Ok(input[0].sort_properties) } /// Non-decreasing for x ≥ 0, undefined otherwise. -pub fn sqrt_monotonicity(input: &[ExprProperties]) -> Result { +pub fn sqrt_order(input: &[ExprProperties]) -> Result { let arg = &input[0]; let range = &arg.range; @@ -230,12 +230,12 @@ pub fn sqrt_monotonicity(input: &[ExprProperties]) -> Result { /// Non-decreasing between vertical asymptotes at x = k * π ± π / 2 for any /// integer k. -// TODO: Implement monotonicity of the TAN function. -pub fn tan_monotonicity(_input: &[ExprProperties]) -> Result { +// TODO: Implement ordering rule of the TAN function. +pub fn tan_order(_input: &[ExprProperties]) -> Result { Ok(SortProperties::Unordered) } /// Non-decreasing for all real numbers. -pub fn tanh_monotonicity(input: &[ExprProperties]) -> Result { +pub fn tanh_order(input: &[ExprProperties]) -> Result { Ok(input[0].sort_properties) } diff --git a/datafusion/functions/src/math/pi.rs b/datafusion/functions/src/math/pi.rs index 60c94b6ca622b..c2fe4efb1139c 100644 --- a/datafusion/functions/src/math/pi.rs +++ b/datafusion/functions/src/math/pi.rs @@ -69,7 +69,7 @@ impl ScalarUDFImpl for PiFunc { )))) } - fn monotonicity(&self, _input: &[ExprProperties]) -> Result { + fn output_ordering(&self, _input: &[ExprProperties]) -> Result { // This function returns a constant value. Ok(SortProperties::Singleton) } diff --git a/datafusion/functions/src/math/round.rs b/datafusion/functions/src/math/round.rs index 600f4fd5472a4..1bab2953e4f65 100644 --- a/datafusion/functions/src/math/round.rs +++ b/datafusion/functions/src/math/round.rs @@ -80,7 +80,7 @@ impl ScalarUDFImpl for RoundFunc { make_scalar_function(round, vec![])(args) } - fn monotonicity(&self, input: &[ExprProperties]) -> Result { + fn output_ordering(&self, input: &[ExprProperties]) -> Result { // round preserves the order of the first argument let value = &input[0]; let precision = input.get(1); diff --git a/datafusion/functions/src/math/trunc.rs b/datafusion/functions/src/math/trunc.rs index 0c4d38564b9f3..f980e583365f7 100644 --- a/datafusion/functions/src/math/trunc.rs +++ b/datafusion/functions/src/math/trunc.rs @@ -86,7 +86,7 @@ impl ScalarUDFImpl for TruncFunc { make_scalar_function(trunc, vec![])(args) } - fn monotonicity(&self, input: &[ExprProperties]) -> Result { + fn output_ordering(&self, input: &[ExprProperties]) -> Result { // trunc preserves the order of the first argument let value = &input[0]; let precision = input.get(1); diff --git a/datafusion/physical-expr/src/scalar_function.rs b/datafusion/physical-expr/src/scalar_function.rs index daa110071096c..14631caec55eb 100644 --- a/datafusion/physical-expr/src/scalar_function.rs +++ b/datafusion/physical-expr/src/scalar_function.rs @@ -180,7 +180,7 @@ impl PhysicalExpr for ScalarFunctionExpr { } fn get_properties(&self, children: &[ExprProperties]) -> Result { - let sort_properties = self.fun.monotonicity(children)?; + let sort_properties = self.fun.output_ordering(children)?; let children_range = children .iter() .map(|props| &props.range) diff --git a/datafusion/physical-expr/src/utils/mod.rs b/datafusion/physical-expr/src/utils/mod.rs index 6b964546cb74c..005d834552f9a 100644 --- a/datafusion/physical-expr/src/utils/mod.rs +++ b/datafusion/physical-expr/src/utils/mod.rs @@ -308,7 +308,7 @@ pub(crate) mod tests { } } - fn monotonicity(&self, input: &[ExprProperties]) -> Result { + fn output_ordering(&self, input: &[ExprProperties]) -> Result { Ok(input[0].sort_properties) } diff --git a/datafusion/physical-plan/src/joins/stream_join_utils.rs b/datafusion/physical-plan/src/joins/stream_join_utils.rs index f19eb30313e68..f82eb31f96995 100644 --- a/datafusion/physical-plan/src/joins/stream_join_utils.rs +++ b/datafusion/physical-plan/src/joins/stream_join_utils.rs @@ -246,7 +246,7 @@ pub fn map_origin_col_to_filter_col( Ok(col_to_col_map) } -/// This function analyzes [`PhysicalSortExpr`] graphs with respect to monotonicity +/// This function analyzes [`PhysicalSortExpr`] graphs with respect to output orderings /// (sorting) properties. This is necessary since monotonically increasing and/or /// decreasing expressions are required when using join filter expressions for /// data pruning purposes.