Skip to content

Commit d2f9025

Browse files
authored
Modify doc for nanvl. (#7311)
1 parent 6b55adf commit d2f9025

File tree

2 files changed

+5
-4
lines changed

2 files changed

+5
-4
lines changed

datafusion/physical-expr/src/math_expressions.rs

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1057,9 +1057,9 @@ mod tests {
10571057
Arc::new(Float64Array::from(vec![5.0, 6.0, f64::NAN, f64::NAN])), // x
10581058
];
10591059

1060-
let result = nanvl(&args).expect("failed to initialize function atan2");
1060+
let result = nanvl(&args).expect("failed to initialize function nanvl");
10611061
let floats =
1062-
as_float64_array(&result).expect("failed to initialize function atan2");
1062+
as_float64_array(&result).expect("failed to initialize function nanvl");
10631063

10641064
assert_eq!(floats.len(), 4);
10651065
assert_eq!(floats.value(0), 1.0);
@@ -1075,9 +1075,9 @@ mod tests {
10751075
Arc::new(Float32Array::from(vec![5.0, 6.0, f32::NAN, f32::NAN])), // x
10761076
];
10771077

1078-
let result = nanvl(&args).expect("failed to initialize function atan2");
1078+
let result = nanvl(&args).expect("failed to initialize function nanvl");
10791079
let floats =
1080-
as_float32_array(&result).expect("failed to initialize function atan2");
1080+
as_float32_array(&result).expect("failed to initialize function nanvl");
10811081

10821082
assert_eq!(floats.len(), 4);
10831083
assert_eq!(floats.value(0), 1.0);

docs/source/user-guide/expressions.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -101,6 +101,7 @@ expressions such as `col("a") + col("b")` to be used.
101101
| log(base, x) | logarithm of x for a particular base |
102102
| log10(x) | base 10 logarithm |
103103
| log2(x) | base 2 logarithm |
104+
| nanvl(x, y) | returns x if x is not NaN otherwise returns y |
104105
| pi() | approximate value of π |
105106
| power(base, exponent) | base raised to the power of exponent |
106107
| radians(x) | converts degrees to radians |

0 commit comments

Comments
 (0)