comphead commented on code in PR #3570: URL: https://github.com/apache/arrow-rs/pull/3570#discussion_r1082816995
########## arrow-csv/src/writer.rs: ########## @@ -88,6 +88,35 @@ where lexical_to_string(c.value(i)) } +fn invalid_cast_error(dt: String, col_index: usize, row_index: usize) -> ArrowError { + let mut s = String::new(); + s.push_str("Cannot cast to "); + s.push_str(&dt); + s.push_str(" at col index: "); + s.push_str(col_index.to_string().as_str()); + s.push_str(" row index: "); + s.push_str(row_index.to_string().as_str()); + ArrowError::CastError(s) +} + +macro_rules! write_temporal_value { Review Comment: Generic was too complex, as we need to use different conversion functions depending on the type, I have tried generics first and then falled back to macros -- 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...@arrow.apache.org For queries about this service, please contact Infrastructure at: us...@infra.apache.org