parthchandra commented on code in PR #346: URL: https://github.com/apache/datafusion-comet/pull/346#discussion_r1585237255
########## core/src/execution/datafusion/expressions/cast.rs: ########## @@ -64,6 +66,72 @@ pub struct Cast { pub timezone: String, } +macro_rules! cast_float_to_string { + ($from:expr, $eval_mode:expr, $type:ty, $output_type:ty, $offset_type:ty) => {{ + + fn cast<OffsetSize>( + from: &dyn Array, + _eval_mode: EvalMode, + ) -> CometResult<ArrayRef> + where + OffsetSize: OffsetSizeTrait, { + let array = from.as_any().downcast_ref::<$output_type>().unwrap(); + + // If the absolute number is less than 10,000,000 and greater or equal than 0.001, the + // result is expressed without scientific notation with at least one digit on either side of + // the decimal point. Otherwise, Databricks uses a mantissa followed by E and an Review Comment: ```suggestion // the decimal point. Otherwise, Spark uses a mantissa followed by E and an ``` -- 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