This is an automated email from the ASF dual-hosted git repository.
Jefffrey pushed a commit to branch 57_maintenance
in repository https://gitbox.apache.org/repos/asf/arrow-rs.git
The following commit(s) were added to refs/heads/57_maintenance by this push:
new 35bb1584ff [57_maintenance] Upgrade thrift dependency (#12204)
35bb1584ff is described below
commit 35bb1584ff110939e794b255fbffa858e0059c89
Author: Jeffrey Vo <[email protected]>
AuthorDate: Fri Nov 13 09:28:33 2026 +0900
[57_maintenance] Upgrade thrift dependency (#12204)
get audit CI green
```bash
cargo update -p zstd
cargo update -p rustix
```
And cherry-pick
https://github.com/apache/arrow-rs/commit/e1f17b42c80c50205d95743a8fe47ee786f8c4c3
---------
Co-authored-by: Beinan <[email protected]>
Co-authored-by: Beinan Wang <[email protected]>
Co-authored-by: Andrew Lamb <[email protected]>
Co-authored-by: Claude Fable 5.1 <[email protected]>
---
Cargo.lock | 31 ++++++++++++++++---------------
parquet/Cargo.toml | 2 +-
parquet/src/thrift.rs | 38 ++++++++++++++++++++++++++++++++++++++
3 files changed, 55 insertions(+), 16 deletions(-)
diff --git a/Cargo.lock b/Cargo.lock
index 7b900065a6..4626ab82a2 100644
--- a/Cargo.lock
+++ b/Cargo.lock
@@ -1213,7 +1213,7 @@ source =
"registry+https://github.com/rust-lang/crates.io-index"
checksum = "39cab71617ae0d63f51a36d69f866391735b51691dbda63cf6f96d042b63efeb"
dependencies = [
"libc",
- "windows-sys 0.61.2",
+ "windows-sys 0.52.0",
]
[[package]]
@@ -2245,9 +2245,9 @@ checksum =
"7c87def4c32ab89d880effc9e097653c8da5d6ef28e6b539d313baaacfbafcbe"
[[package]]
name = "ordered-float"
-version = "2.10.1"
+version = "3.9.2"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "68f19d67e5a2795c94e73e0bb1cc1a7edeb2e28efd39e2e1c9b7a40c1108b11c"
+checksum = "f1e1c390732d15f1d48471625cd92d154e66db2c56645e29a9cd26f4699f72dc"
dependencies = [
"num-traits",
]
@@ -2728,7 +2728,7 @@ dependencies = [
"once_cell",
"socket2",
"tracing",
- "windows-sys 0.61.2",
+ "windows-sys 0.52.0",
]
[[package]]
@@ -2924,15 +2924,15 @@ dependencies = [
[[package]]
name = "rustix"
-version = "1.1.5"
+version = "1.1.6"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "891efababe418670775f199f0d233d84843c227a0949a883ce15b37c78d6629d"
+checksum = "e5e76742e5294153d4dde1207dbec5bdd81eef6fabdc0d2118babadabfd858aa"
dependencies = [
"bitflags",
"errno",
"libc",
"linux-raw-sys",
- "windows-sys 0.61.2",
+ "windows-sys 0.52.0",
]
[[package]]
@@ -3307,7 +3307,7 @@ dependencies = [
"getrandom 0.4.3",
"once_cell",
"rustix",
- "windows-sys 0.61.2",
+ "windows-sys 0.52.0",
]
[[package]]
@@ -3377,13 +3377,14 @@ dependencies = [
[[package]]
name = "thrift"
-version = "0.17.0"
+version = "0.23.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "7e54bc85fc7faa8bc175c4bab5b92ba8d9a3ce893d0e9f42cc455c8ab16a9e09"
+checksum = "1f650151e44bb59950b3adf32de0064813d1148f34f4884b7f5b539f29596859"
dependencies = [
"byteorder",
"integer-encoding",
"ordered-float",
+ "uuid",
]
[[package]]
@@ -3952,7 +3953,7 @@ version = "0.1.11"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "c2a7b1c03c876122aa43f3020e6c3c3ee5c05081c9a00739faf7503aeba10d22"
dependencies = [
- "windows-sys 0.61.2",
+ "windows-sys 0.52.0",
]
[[package]]
@@ -4354,18 +4355,18 @@ checksum =
"29666d0abbfad1e3dc4dcf6144730dd3a3ab225bbbdac83319345b1b44ccfc1b"
[[package]]
name = "zstd"
-version = "0.13.3"
+version = "0.13.5"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "e91ee311a569c327171651566e07972200e76fcfe2242a4fa446149a3881c08a"
+checksum = "50adf04cf3ec914b0b9905c9dde90c80fe74bfd701e331fc80a39c512c525278"
dependencies = [
"zstd-safe",
]
[[package]]
name = "zstd-safe"
-version = "7.3.0"
+version = "7.4.1"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "64d80649ab6db9d9f6f9c80a40becd948eda4714a0a5ac8c4d157a32231c7882"
+checksum = "498d94ad68720c89b4fbe41b9090850651e68cb2dd9210ce7ffbff3a94653819"
dependencies = [
"zstd-sys",
]
diff --git a/parquet/Cargo.toml b/parquet/Cargo.toml
index a0a5dae9e0..3c633db7a1 100644
--- a/parquet/Cargo.toml
+++ b/parquet/Cargo.toml
@@ -52,7 +52,7 @@ parquet-variant-compute = { workspace = true, optional = true
}
object_store = { version = "0.12.0", default-features = false, optional = true
}
bytes = { version = "1.1", default-features = false, features = ["std"] }
-thrift = { version = "0.17", default-features = false }
+thrift = { version = "0.23", default-features = false }
snap = { version = "1.0", default-features = false, optional = true }
brotli = { version = "8.0", default-features = false, features = ["std"],
optional = true }
# To use `flate2` you must enable either the `flate2-zlib-rs` or
`flate2-rust_backened` backends
diff --git a/parquet/src/thrift.rs b/parquet/src/thrift.rs
index 2eb91162ac..9a3a66e578 100644
--- a/parquet/src/thrift.rs
+++ b/parquet/src/thrift.rs
@@ -37,6 +37,44 @@ mod tests {
file::page_index::{column_index::ColumnIndexMetaData,
index_reader::decode_column_index},
};
+ #[test]
+ #[allow(deprecated)]
+ fn legacy_statistics_reject_oversized_binary_before_allocation() {
+ use crate::{format::Statistics, thrift::TSerializable};
+ use thrift::{Error, ProtocolErrorKind,
protocol::TCompactInputProtocol};
+
+ // Field 1 (max), binary length 100 MiB + 1, and no payload. The length
+ // must be rejected before allocating the claimed buffer or reading it.
+ let bytes = [0x18, 0x81, 0x80, 0x80, 0x32];
+ let mut input = TCompactInputProtocol::new(bytes.as_slice());
+ let error = Statistics::read_from_in_protocol(&mut input).unwrap_err();
+ assert!(
+ matches!(error, Error::Protocol(error) if error.kind ==
ProtocolErrorKind::SizeLimit)
+ );
+ }
+
+ #[test]
+ #[allow(deprecated)]
+ fn legacy_statistics_compact_protocol_roundtrip() {
+ use crate::{format::Statistics, thrift::TSerializable};
+ use thrift::protocol::{TCompactInputProtocol, TCompactOutputProtocol};
+
+ let expected = Statistics {
+ min_value: Some(vec![0, 1, 255]),
+ max_value: Some(vec![255, 0, 1]),
+ null_count: Some(7),
+ ..Default::default()
+ };
+ let mut bytes = Vec::new();
+ expected
+ .write_to_out_protocol(&mut TCompactOutputProtocol::new(&mut
bytes))
+ .unwrap();
+ let actual =
+ Statistics::read_from_in_protocol(&mut
TCompactInputProtocol::new(bytes.as_slice()))
+ .unwrap();
+ assert_eq!(actual, expected);
+ }
+
#[test]
pub fn read_boolean_list_field_type() {
// Boolean collection type encoded as 0x01, as used by this crate when
writing.