findepi commented on code in PR #16539: URL: https://github.com/apache/datafusion/pull/16539#discussion_r2166181494
########## datafusion/common/src/scalar/mod.rs: ########## @@ -3069,7 +3069,7 @@ impl ScalarValue { ScalarValue::Decimal128(Some(decimal_value), _, scale), DataType::Timestamp(time_unit, None), ) => { - let scale_factor = 10_i128.pow(*scale as u32); + let scale_factor = 10_i128.pow(*scale as u32 + 3); Review Comment: > I think the underlying arrow kernel may not support casting decimal --> timestamp Can be! So how does this work when the value is not constant-folded? What code ends up executing in the 'normal query' case? Can the same code be executed also in constant-folding case? -- 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