Skip to content

Commit 8649e80

Browse files
Add Decimal128 IN LIST benchmarks
1 parent 426b351 commit 8649e80

1 file changed

Lines changed: 18 additions & 0 deletions

File tree

‎datafusion/physical-expr/benches/in_list_strategy.rs‎

Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -38,6 +38,7 @@
3838
//! | 32-bit primitive cases | Int32, Float32 | small and large lists | 4, 32, 64, 256 |
3939
//! | 64-bit primitive cases | Int64, TimestampNs | small and large lists | 4, 16, 32, 128 |
4040
//! | 128-bit interval cases | IntervalMonthDayNano | small lists | 4 |
41+
//! | Decimal128 cases | Decimal128 | larger lists | 5, 64 |
4142
//! | Utf8 short-string cases | Utf8 | 8-byte strings | 4, 64, 256 |
4243
//! | Utf8 long-string cases | Utf8 | 24-byte strings | 4, 64, 256 |
4344
//! | Utf8View short-string cases | Utf8View | 8-byte strings | 4, 16, 64, 256 |
@@ -463,6 +464,23 @@ fn bench_primitive(c: &mut Criterion) {
463464
}
464465
}
465466

467+
// Decimal128: benchmark the first hash-set list size (5) and a larger list (64).
468+
for list_size in [5, 64] {
469+
for match_pct in MATCH_RATES {
470+
bench_numeric::<i128, Decimal128Array>(
471+
c,
472+
"primitive",
473+
&format!("decimal128/large_list/list={list_size}/match={match_pct}%"),
474+
&NumericBenchConfig::new(
475+
list_size,
476+
match_pct as f64 / 100.0,
477+
|rng| i128::from(rng.random::<i64>()),
478+
|v| ScalarValue::Decimal128(Some(v), 38, 10),
479+
),
480+
);
481+
}
482+
}
483+
466484
// NOT IN benchmark: test negated path
467485
bench_numeric::<i32, Int32Array>(
468486
c,

0 commit comments

Comments
 (0)