Skip to content

Commit

Permalink
A test that is specific to counting memory size has different sizes o…
Browse files Browse the repository at this point in the history
…n 64-bit vs 32-bit platforms
  • Loading branch information
drauschenbach committed Nov 4, 2024
1 parent e9dca8e commit 0340592
Showing 1 changed file with 6 additions and 0 deletions.
6 changes: 6 additions & 0 deletions parquet/src/file/metadata/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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);
Expand Down Expand Up @@ -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);
Expand Down

0 comments on commit 0340592

Please sign in to comment.