jayzhan211 commented on code in PR #10193: URL: https://github.com/apache/datafusion/pull/10193#discussion_r1576291793
########## datafusion/functions/src/math/pi.rs: ########## @@ -62,12 +60,10 @@ impl ScalarUDFImpl for PiFunc { Ok(Float64) } - fn invoke(&self, args: &[ColumnarValue]) -> Result<ColumnarValue> { - if !matches!(&args[0], ColumnarValue::Array(_)) { - return exec_err!("Expect pi function to take no param"); - } - let array = Float64Array::from_value(std::f64::consts::PI, 1); - Ok(ColumnarValue::Array(Arc::new(array))) + fn invoke(&self, _args: &[ColumnarValue]) -> Result<ColumnarValue> { Review Comment: I think signature check is enough, so just ignore args -- 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