comphead commented on code in PR #10086:
URL: 
https://github.com/apache/arrow-datafusion/pull/10086#discussion_r1567844229


##########
datafusion/functions/src/math/log.rs:
##########
@@ -146,51 +151,74 @@ impl ScalarUDFImpl for LogFunc {
     /// 3. Log(a, a) ===> 1
     fn simplify(
         &self,
-        args: Vec<Expr>,
+        mut args: Vec<Expr>,
         info: &dyn SimplifyInfo,
     ) -> Result<ExprSimplifyResult> {
-        let mut number = &args[0];
-        let mut base =
-            
&Expr::Literal(ScalarValue::new_ten(&info.get_data_type(number)?)?);
-        if args.len() == 2 {
-            base = &args[0];
-            number = &args[1];
+        // Args are either
+        // log(number)
+        // log(base, number)
+        let num_args = args.len();
+        if args.len() > 2 {

Review Comment:
   ```suggestion
           if num_args > 2 {
   ```



-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]

Reply via email to