tustvold commented on code in PR #5241:
URL: https://github.com/apache/arrow-datafusion/pull/5241#discussion_r1102995230


##########
datafusion/core/tests/sql/set_variable.rs:
##########
@@ -412,14 +413,8 @@ async fn set_time_zone_bad_time_zone_format() {
         plan_and_collect(&ctx, "SELECT 
'2000-01-01T00:00:00'::TIMESTAMP::TIMESTAMPTZ")
             .await
             .unwrap();
-    let expected = vec![
-        "+-----------------------------------------------------+",
-        "| Utf8(\"2000-01-01T00:00:00\")                         |",
-        "+-----------------------------------------------------+",
-        "| 2000-01-01T00:00:00 (Unknown Time Zone '+08:00:00') |",
-        "+-----------------------------------------------------+",
-    ];
-    assert_batches_eq!(expected, &result);
+    let err = pretty_format_batches(&result).err().unwrap().to_string();
+    assert_eq!(err, "Parser error: Invalid timezone \"+08:00:00\": Expected 
format [+-]XX:XX, [+-]XX, or [+-]XXXX");

Review Comment:
   Invalid timezones now result in an error when creating the formatter, 
instead of rendering the invalid timezone to each string. I'm not sure how 
people feel about this, I think it is better to fail loud but welcome thoughts



-- 
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

Reply via email to