shruti2522 commented on code in PR #17100: URL: https://github.com/apache/datafusion/pull/17100#discussion_r2267426716
########## datafusion/functions/src/datetime/common.rs: ########## @@ -412,8 +412,8 @@ where }?; let r = op(x, v); - if r.is_ok() { - val = Some(Ok(op2(r.unwrap()))); + if let Ok(inner) = r { + val = Some(Ok(op2(inner))); Review Comment: simplified `is_ok() + unwrap()` to `if let Some(...) =` ########## datafusion/functions/src/datetime/to_local_time.rs: ########## @@ -372,7 +372,7 @@ impl ScalarUDFImpl for ToLocalTimeFunc { ) -> Result<ColumnarValue> { let [time_value] = take_function_args(self.name(), args.args)?; - self.to_local_time(&[time_value.clone()]) + self.to_local_time(std::slice::from_ref(&time_value)) Review Comment: [A] slice fix (`&[time_value.clone()]` --> `std::slice::from_ref(&time_value)`) -- 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: github-unsubscr...@datafusion.apache.org For queries about this service, please contact Infrastructure at: us...@infra.apache.org --------------------------------------------------------------------- To unsubscribe, e-mail: github-unsubscr...@datafusion.apache.org For additional commands, e-mail: github-h...@datafusion.apache.org