mbutrovich commented on code in PR #3629:
URL: https://github.com/apache/datafusion-comet/pull/3629#discussion_r3047465060


##########
native/spark-expr/src/math_funcs/round.rs:
##########
@@ -110,6 +110,8 @@ pub fn spark_round(
     let ColumnarValue::Scalar(ScalarValue::Int64(Some(point))) = point else {
         return internal_err!("Invalid point argument for Round(): {:#?}", 
point);
     };
+    // DataFusion's RoundFunc expects Int32 for decimal_places
+    let point_as_i32 = ColumnarValue::Scalar(ScalarValue::Int32(Some(*point as 
i32)));

Review Comment:
   It already is that — the diff view might have been confusing. Line 114 reads:
   ```rust
   let point_as_i32 = ColumnarValue::Scalar(ScalarValue::Int32(Some(*point as 
i32)));
   ```
   The only difference is the variable name (`point_as_i32` vs `point_i32`). 
Happy to rename if you prefer.



-- 
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]


---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to