From d2f9025ff4cd9e94501131fa81c409e33c7c00ec Mon Sep 17 00:00:00 2001 From: Kousuke Saruta Date: Thu, 17 Aug 2023 03:52:09 +0900 Subject: [PATCH] Modify doc for nanvl. (#7311) --- datafusion/physical-expr/src/math_expressions.rs | 8 ++++---- docs/source/user-guide/expressions.md | 1 + 2 files changed, 5 insertions(+), 4 deletions(-) diff --git a/datafusion/physical-expr/src/math_expressions.rs b/datafusion/physical-expr/src/math_expressions.rs index 907ca95951ad..4a5976387a06 100644 --- a/datafusion/physical-expr/src/math_expressions.rs +++ b/datafusion/physical-expr/src/math_expressions.rs @@ -1057,9 +1057,9 @@ mod tests { Arc::new(Float64Array::from(vec![5.0, 6.0, f64::NAN, f64::NAN])), // x ]; - let result = nanvl(&args).expect("failed to initialize function atan2"); + let result = nanvl(&args).expect("failed to initialize function nanvl"); let floats = - as_float64_array(&result).expect("failed to initialize function atan2"); + as_float64_array(&result).expect("failed to initialize function nanvl"); assert_eq!(floats.len(), 4); assert_eq!(floats.value(0), 1.0); @@ -1075,9 +1075,9 @@ mod tests { Arc::new(Float32Array::from(vec![5.0, 6.0, f32::NAN, f32::NAN])), // x ]; - let result = nanvl(&args).expect("failed to initialize function atan2"); + let result = nanvl(&args).expect("failed to initialize function nanvl"); let floats = - as_float32_array(&result).expect("failed to initialize function atan2"); + as_float32_array(&result).expect("failed to initialize function nanvl"); assert_eq!(floats.len(), 4); assert_eq!(floats.value(0), 1.0); diff --git a/docs/source/user-guide/expressions.md b/docs/source/user-guide/expressions.md index 630b158092d8..d8dfa7af5310 100644 --- a/docs/source/user-guide/expressions.md +++ b/docs/source/user-guide/expressions.md @@ -101,6 +101,7 @@ expressions such as `col("a") + col("b")` to be used. | log(base, x) | logarithm of x for a particular base | | log10(x) | base 10 logarithm | | log2(x) | base 2 logarithm | +| nanvl(x, y) | returns x if x is not NaN otherwise returns y | | pi() | approximate value of π | | power(base, exponent) | base raised to the power of exponent | | radians(x) | converts degrees to radians |