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/arrow-datafusion.git
The following commit(s) were added to refs/heads/main by this push:
new d2f9025ff4 Modify doc for nanvl. (#7311)
d2f9025ff4 is described below
commit d2f9025ff4cd9e94501131fa81c409e33c7c00ec
Author: Kousuke Saruta <[email protected]>
AuthorDate: Thu Aug 17 03:52:09 2023 +0900
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 907ca95951..4a5976387a 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 630b158092..d8dfa7af53 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 |