Repository: apache/arrow-rs
Pull request #5596 (2024-04-05 22:04:43)

Bump chrono-tz from 0.8 to 0.9
# Which issue does this PR close?

<!--
We generally require a GitHub issue to be filed for all bug fixes and enhancements and this helps us generate change logs for our releases. You can link an issue to this PR using the GitHub syntax. For example `Closes #123` indicates that this PR will close issue #123.
-->

Closes #.

# Rationale for this change
 
<!--
Why are you proposing this change? If this is already explained clearly in the issue then this section is not needed.
Explaining clearly why changes are proposed helps reviewers understand your changes and offer better suggestions for fixes.
-->

# What changes are included in this PR?

<!--
There is no need to duplicate the description in the issue here but it is sometimes worth providing a summary of the individual changes in this PR.
-->

Error messages changed format

# Are there any user-facing changes?


<!--
If there are user-facing changes then we may require documentation to be updated before approving the PR.
-->

<!---
If there are any breaking changes to public APIs, please add the `breaking change` label.
-->



Patch:
diff --git a/arrow-array/Cargo.toml b/arrow-array/Cargo.toml
index 04eec8df6..0bc2facb5 100644
--- a/arrow-array/Cargo.toml
+++ b/arrow-array/Cargo.toml
@@ -45,7 +45,7 @@ arrow-buffer = { workspace = true }
 arrow-schema = { workspace = true }
 arrow-data = { workspace = true }
 chrono = { workspace = true }
-chrono-tz = { version = "0.8", optional = true }
+chrono-tz = { version = "0.9", optional = true }
 num = { version = "0.4.1", default-features = false, features = ["std"] }
 half = { version = "2.1", default-features = false, features = ["num-traits"] }
 hashbrown = { version = "0.14", default-features = false }
diff --git a/object_store/src/gcp/client.rs b/object_store/src/gcp/client.rs
index 901257f91..3762915b0 100644
--- a/object_store/src/gcp/client.rs
+++ b/object_store/src/gcp/client.rs
@@ -430,6 +430,13 @@ impl GoogleCloudStorageClient {
         multipart_id: &MultipartId,
         completed_parts: Vec<PartId>,
     ) -> Result<PutResult> {
+        if completed_parts.is_empty() {
+            // GCS doesn't allow empty multipart uploads
+            let result = self.put_request(path, Default::default()).send().await?;
+            self.multipart_cleanup(path, multipart_id).await?;
+            return Ok(result);
+        }
+
         let upload_id = multipart_id.clone();
         let url = self.object_url(path);
 


Test patch:
diff --git a/arrow/tests/array_cast.rs b/arrow/tests/array_cast.rs
index c73f4f50a..2d3167c92 100644
--- a/arrow/tests/array_cast.rs
+++ b/arrow/tests/array_cast.rs
@@ -579,7 +579,7 @@ fn test_pretty_format_timestamp_second_with_incorrect_fixed_offset_timezone() {
     let err = format_timezone("08:00").unwrap_err().to_string();
     assert_eq!(
         err,
-        "Parser error: Invalid timezone \"08:00\": '08:00' is not a valid timezone"
+        "Parser error: Invalid timezone \"08:00\": failed to parse timezone"
     );
 }
 
@@ -588,6 +588,6 @@ fn test_pretty_format_timestamp_second_with_unknown_timezone() {
     let err = format_timezone("unknown").unwrap_err().to_string();
     assert_eq!(
         err,
-        "Parser error: Invalid timezone \"unknown\": 'unknown' is not a valid timezone"
+        "Parser error: Invalid timezone \"unknown\": failed to parse timezone"
     );
 }
diff --git a/arrow/tests/timezone.rs b/arrow/tests/timezone.rs
index b71d04d64..d0db1d76e 100644
--- a/arrow/tests/timezone.rs
+++ b/arrow/tests/timezone.rs
@@ -54,11 +54,11 @@ fn test_parse_timezone_invalid() {
     let cases = [
         (
             "2015-01-20T17:35:20-24:00",
-            "Parser error: Invalid timezone \"-24:00\": '-24:00' is not a valid timezone",
+            "Parser error: Invalid timezone \"-24:00\": failed to parse timezone",
         ),
         (
             "2023-01-01 04:05:06.789 +07:30:00",
-            "Parser error: Invalid timezone \"+07:30:00\": '+07:30:00' is not a valid timezone"
+            "Parser error: Invalid timezone \"+07:30:00\": failed to parse timezone"
         ),
         (
             // Sunday, 12 March 2023, 02:00:00 clocks are turned forward 1 hour to