parthchandra commented on code in PR #3083:
URL: https://github.com/apache/datafusion-comet/pull/3083#discussion_r2710066702


##########
native/spark-expr/src/conversion_funcs/cast.rs:
##########
@@ -1114,6 +1154,16 @@ fn cast_array(
     Ok(spark_cast_postprocess(cast_result?, from_type, to_type))
 }
 
+fn cast_boolean_to_decimal(array: &ArrayRef, precision: u8, scale: i8) -> 
SparkResult<ArrayRef> {
+    let bool_array = array.as_boolean();
+    let scale_factor = 10_i128.pow(scale as u32);

Review Comment:
   scaled_value instead of scale_factor, perhaps?



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