tustvold commented on code in PR #3752:
URL: https://github.com/apache/arrow-rs/pull/3752#discussion_r1115745193
##########
arrow-cast/src/cast.rs:
##########
@@ -2562,26 +2573,35 @@ fn cast_string_to_timestamp_ns<Offset: OffsetSizeTrait>(
.downcast_ref::<GenericStringArray<Offset>>()
.unwrap();
+ let scale_factor = match TimestampType::get_time_unit() {
+ TimeUnit::Microsecond => 1_000,
+ TimeUnit::Nanosecond => 1,
+ _ => return Err(ArrowError::CastError("String to timestamp casting
supports only microsecond or nanosecond resolution".to_string()))
Review Comment:
Is there a particular reason not to just support the full set whilst here?
--
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]