From 25114c5caaa9e767050b366e57c20eca54aca987 Mon Sep 17 00:00:00 2001 From: Andrew Lamb Date: Mon, 23 Jun 2025 09:44:11 -0400 Subject: [PATCH 1/2] [55_maintenance] Fix verify-release-candidate.sh by skipping `arrow-pyarrow` and `parquet-variant` (#7745) Note this targets a release branch, not main I have a different proposed fix for `main`: - https://github.com/apache/arrow-rs/pull/7742 I will also make a fix for parquet-variant test failures # Which issue does this PR close? - Related to https://github.com/apache/arrow-rs/issues/7394 - Related to https://github.com/apache/arrow-rs/issues/7736 - Related to https://github.com/apache/arrow-rs/issues/7746 # Rationale for this change `cargo test --all` requires python and pyarrow installed, where it did not in previous versions of arrow due to breaking out `arrow-pyarrow` into its own crate in - https://github.com/apache/arrow-rs/pull/7694 Also the new `parquet-variant` crate tests fail as part of the verification script too -- see ttps://github.com/apache/arrow-rs/issues/7746 In order to get a script that can automatically verify a release candidate, let's ignore this new module for now. More details - https://github.com/apache/arrow-rs/issues/7736 - https://github.com/apache/arrow-rs/pull/7742 Note that the arrow-pyarrow tests do run as part of CI and succeed on this branch # What changes are included in this PR? 1. Exclude running the `arrow-pyarrow` and `parquet-variant` tests as part of `verify-release-acndidate` # Testing I verified locally that `./dev/release/verify-release-candidate.sh 55.2.0 1` passes with this script # Are there any user-facing changes? No this is a development process only change --- dev/release/verify-release-candidate.sh | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/dev/release/verify-release-candidate.sh b/dev/release/verify-release-candidate.sh index 2629d362aaff..e140473a6270 100755 --- a/dev/release/verify-release-candidate.sh +++ b/dev/release/verify-release-candidate.sh @@ -113,7 +113,11 @@ test_source_distribution() { export ARROW_TEST_DATA=$PWD/arrow-testing-data/data export PARQUET_TEST_DATA=$PWD/parquet-testing-data/data - cargo test --all + # ignore arrow-pyarrow due to + # https://github.com/apache/arrow-rs/issues/7736 + # ignore parquet-variant due to + # https://github.com/apache/arrow-rs/issues/7746 + cargo test --all --exclude arrow-pyarrow --exclude parquet-variant # verify that the leaf crates can be published to crates.io # we can't verify crates that depend on others From 122f9aa936b41c8d0a6f94677fe6b4fa5bd86e23 Mon Sep 17 00:00:00 2001 From: Peter L Date: Sat, 5 Jul 2025 21:03:31 +0930 Subject: [PATCH 2/2] Add `get_ref/get_mut` to JSON Writer (#7854) # Which issue does this PR close? None # Rationale for this change I need access to the writer so that I can flush an external buffer when bytes are written. # What changes are included in this PR? A couple of methods to the JSON writer. These methods already exist on other writers # Are these changes tested? N/A # Are there any user-facing changes? Yes, a couple extra methods on the JSON writer. --------- Co-authored-by: Andrew Lamb --- arrow-json/src/writer/mod.rs | 13 +++++++++++++ 1 file changed, 13 insertions(+) diff --git a/arrow-json/src/writer/mod.rs b/arrow-json/src/writer/mod.rs index ee1b5fabe538..aa6ea9b8aa66 100644 --- a/arrow-json/src/writer/mod.rs +++ b/arrow-json/src/writer/mod.rs @@ -413,6 +413,19 @@ where Ok(()) } + /// Gets a reference to the underlying writer. + pub fn get_ref(&self) -> &W { + &self.writer + } + + /// Gets a mutable reference to the underlying writer. + /// + /// Writing to the underlying writer must be done with care + /// to avoid corrupting the output JSON. + pub fn get_mut(&mut self) -> &mut W { + &mut self.writer + } + /// Unwraps this `Writer`, returning the underlying writer pub fn into_inner(self) -> W { self.writer