Skip to content

Commit

Permalink
fix
Browse files Browse the repository at this point in the history
  • Loading branch information
buraksenn committed Oct 17, 2024
1 parent 53f54d4 commit 58d3d86
Showing 1 changed file with 2 additions and 4 deletions.
6 changes: 2 additions & 4 deletions datafusion/functions/src/math/log.rs
Original file line number Diff line number Diff line change
Expand Up @@ -140,8 +140,7 @@ impl ScalarUDFImpl for LogFunc {
let arr: ArrayRef = match args[0].data_type() {
DataType::Float64 => match base {
ColumnarValue::Scalar(ScalarValue::Float64(Some(base))) => Arc::new(
args[0]
.as_primitive::<Float64Type>()
x.as_primitive::<Float64Type>()
.unary::<_, Float64Type>(|value: f64| f64::log(value, base)),
),
ColumnarValue::Array(base) => Arc::new(make_function_inputs2!(
Expand All @@ -159,8 +158,7 @@ impl ScalarUDFImpl for LogFunc {

DataType::Float32 => match base {
ColumnarValue::Scalar(ScalarValue::Float32(Some(base))) => Arc::new(
args[0]
.as_primitive::<Float32Type>()
x.as_primitive::<Float32Type>()
.unary::<_, Float32Type>(|value: f32| f32::log(value, base)),
),
ColumnarValue::Array(base) => Arc::new(make_function_inputs2!(
Expand Down

0 comments on commit 58d3d86

Please sign in to comment.