kazuyukitanimura commented on code in PR #1341: URL: https://github.com/apache/datafusion-comet/pull/1341#discussion_r1941886037
########## native/spark-expr/src/math_funcs/round.rs: ########## @@ -135,3 +136,50 @@ fn decimal_round_f(scale: &i8, point: &i64) -> Box<dyn Fn(i128) -> i128> { Box::new(move |x: i128| (x + x.signum() * half) / div) } } + +#[cfg(test)] +mod test { + use std::sync::Arc; + + use crate::spark_round; + + use arrow::array::{Float32Array, Float64Array}; + use arrow_schema::DataType; + use datafusion_common::cast::{as_float32_array, as_float64_array}; + use datafusion_common::{Result, ScalarValue}; + use datafusion_expr::ColumnarValue; + + #[test] + fn test_round_f32() -> Result<()> { + let args = vec![ Review Comment: Thanks @cht42 merged. For the Spark results, you would need to get them manually for testing in Rust. We can enable tests like https://github.com/apache/datafusion-comet/blob/main/spark/src/test/scala/org/apache/comet/CometExpressionSuite.scala#L1239 once we fully support round for floating points -- 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