From 926e2fefb54bb0eda8765d58f3ec87da2b4cdc04 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Franti=C5=A1ek=20Zatloukal?= Date: Wed, 27 May 2026 14:44:44 +0200 Subject: [PATCH] Adjust Variant size expectation for s390x architecture MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit The Variant enum has a different size on s390x (72 bytes) compared to other 64-bit architectures (80 bytes) due to architecture-specific alignment and padding requirements. This change adds a conditional compilation check to expect 72 bytes on s390x while maintaining the existing 80-byte expectation for other 64-bit platforms. This ensures the size check passes on s390x without compromising the performance validation on other architectures. Signed-off-by: FrantiĊĦek Zatloukal --- parquet-variant/src/variant.rs | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/parquet-variant/src/variant.rs b/parquet-variant/src/variant.rs index 58a3f7eeb261..c9f175c3a610 100644 --- a/parquet-variant/src/variant.rs +++ b/parquet-variant/src/variant.rs @@ -298,7 +298,9 @@ pub enum Variant<'m, 'v> { } // We don't want this to grow because it could hurt performance of a frequently-created type. -#[cfg(target_pointer_width = "64")] +#[cfg(all(target_pointer_width = "64", target_arch = "s390x"))] +const _: () = crate::utils::expect_size_of::(72); +#[cfg(all(target_pointer_width = "64", not(target_arch = "s390x")))] const _: () = crate::utils::expect_size_of::(80); #[cfg(target_pointer_width = "32")] const _: () = crate::utils::expect_size_of::(48);