Skip to content

Commit 58d3d86

Browse files
committed
fix
1 parent 53f54d4 commit 58d3d86

File tree

1 file changed

+2
-4
lines changed
  • datafusion/functions/src/math

1 file changed

+2
-4
lines changed

datafusion/functions/src/math/log.rs

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -140,8 +140,7 @@ impl ScalarUDFImpl for LogFunc {
140140
let arr: ArrayRef = match args[0].data_type() {
141141
DataType::Float64 => match base {
142142
ColumnarValue::Scalar(ScalarValue::Float64(Some(base))) => Arc::new(
143-
args[0]
144-
.as_primitive::<Float64Type>()
143+
x.as_primitive::<Float64Type>()
145144
.unary::<_, Float64Type>(|value: f64| f64::log(value, base)),
146145
),
147146
ColumnarValue::Array(base) => Arc::new(make_function_inputs2!(
@@ -159,8 +158,7 @@ impl ScalarUDFImpl for LogFunc {
159158

160159
DataType::Float32 => match base {
161160
ColumnarValue::Scalar(ScalarValue::Float32(Some(base))) => Arc::new(
162-
args[0]
163-
.as_primitive::<Float32Type>()
161+
x.as_primitive::<Float32Type>()
164162
.unary::<_, Float32Type>(|value: f32| f32::log(value, base)),
165163
),
166164
ColumnarValue::Array(base) => Arc::new(make_function_inputs2!(

0 commit comments

Comments
 (0)