alamb commented on a change in pull request #9449:
URL: https://github.com/apache/arrow/pull/9449#discussion_r573286775
##########
File path: rust/arrow/src/compute/kernels/cast.rs
##########
@@ -1480,6 +1498,19 @@ mod tests {
assert!(c.is_null(2));
}
+ #[test]
+ fn test_cast_string_to_timestamp() {
+ let a = StringArray::from(vec![Some("2020-09-08T12:00:00+00:00"),
None]);
Review comment:
I recommend adding an error case here too -- like `Some("not a date")`
to ensure / encode the make-a-null-if-invalid-parse behavior
##########
File path: rust/arrow/src/error.rs
##########
@@ -27,6 +27,7 @@ pub enum ArrowError {
/// Returned when functionality is not yet available.
NotYetImplemented(String),
ExternalError(Box<dyn Error + Send + Sync>),
+ CastError(String),
Review comment:
Adding a new Arrow Error variant seems reasonable to me -- what do you
think @jorgecarleitao and @nevi-me and @andygrove ?
----------------------------------------------------------------
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.
For queries about this service, please contact Infrastructure at:
[email protected]