Skip to content

Commit

Permalink
Add comment about randomized testing
Browse files Browse the repository at this point in the history
  • Loading branch information
hzuo committed Mar 27, 2024
1 parent 224df9f commit c936ef0
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions arrow-ipc/src/writer.rs
Original file line number Diff line number Diff line change
Expand Up @@ -2275,6 +2275,10 @@ mod tests {
fn test_decimal128_alignment16() {
const IPC_ALIGNMENT: u8 = 16;

// Test a bunch of different dimensions to ensure alignment is never an issue.
// For example, if we only test `num_cols = 1` then even with alignment 8 this
// test would _happen_ to pass, even though for different dimensions like
// `num_cols = 2` it would fail.
for num_cols in 1..100 {
let num_rows = (num_cols * 7 + 11) % 100; // Deterministic swizzle

Expand Down

0 comments on commit c936ef0

Please sign in to comment.