waitingkuo commented on code in PR #5914:
URL: https://github.com/apache/arrow-datafusion/pull/5914#discussion_r1160692690
##########
datafusion/sql/src/expr/arrow_cast.rs:
##########
@@ -673,10 +748,21 @@ mod test {
("", "Error finding next token"),
("null", "Unsupported type 'null'"),
("Nu", "Unsupported type 'Nu'"),
- // TODO support timezones
(
- r#"Timestamp(Nanosecond, Some("UTC"))"#,
- "Error unrecognized word: Some",
+ r#"Timestamp(Nanosecond, Some(+00:00))"#,
+ "Error unrecognized word: +00:00",
+ ),
+ (
+ r#"Timestamp(Nanosecond, Some("+00:00))"#,
+ r#"parsing "+00:00 as double quoted string: last char must be
""#,
+ ),
+ (
+ r#"Timestamp(Nanosecond, Some(""))"#,
+ r#"parsing "" as double quoted string: empty string isn't
supported"#,
+ ),
+ (
+ r#"Timestamp(Nanosecond, Some("+00:00""))"#,
+ r#"parsing "+00:00"" as double quoted string: escaped double
quote isn't supported"#,
Review Comment:
@alamb
added error cases for
`empty string` and
`double quoted string that contains double quote`
--
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]