From 0340592cccf24f8dc2ec7508057aae6bc2506996 Mon Sep 17 00:00:00 2001 From: David Rauschenbach Date: Mon, 4 Nov 2024 09:18:06 -0800 Subject: [PATCH] A test that is specific to counting memory size has different sizes on 64-bit vs 32-bit platforms --- parquet/src/file/metadata/mod.rs | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/parquet/src/file/metadata/mod.rs b/parquet/src/file/metadata/mod.rs index 32b985710023..2c628051795e 100644 --- a/parquet/src/file/metadata/mod.rs +++ b/parquet/src/file/metadata/mod.rs @@ -1861,6 +1861,9 @@ mod tests { let parquet_meta = ParquetMetaDataBuilder::new(file_metadata.clone()) .set_row_groups(row_group_meta_with_stats) .build(); + #[cfg(target_pointer_width = "32")] + let base_expected_size = 1632; + #[cfg(target_pointer_width = "64")] let base_expected_size = 2312; assert_eq!(parquet_meta.memory_size(), base_expected_size); @@ -1888,6 +1891,9 @@ mod tests { ]])) .build(); + #[cfg(target_pointer_width = "32")] + let bigger_expected_size = 1972; + #[cfg(target_pointer_width = "64")] let bigger_expected_size = 2816; // more set fields means more memory usage assert!(bigger_expected_size > base_expected_size);