chenkovsky commented on code in PR #16539:
URL: https://github.com/apache/datafusion/pull/16539#discussion_r2165155973
##########
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 (I bet this is something spark related) 🤔
@alamb here implements casting decimal --> timestamp
https://github.com/apache/arrow-rs/blob/b6240b32e235d4ca330372e3be31f784ba133252/arrow-cast/src/cast/mod.rs#L4032
--
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]