Skip to content

Commit 894615a

Browse files
Theodusneilconway
andauthored
test: enable DurationSecond fuzzing (#24772)
## Which issue does this PR close? N/A — this restores fuzz coverage disabled by a now resolved upstream Arrow issue. ## Rationale for this change `DurationSecond` fuzzing was disabled after an Arrow pretty-printing panic ([arrow-rs#7533](apache/arrow-rs#7533)). The panic was fixed in [arrow-rs#7534](apache/arrow-rs#7534). The existing generator range restriction remains necessary: out-of-range values print as `<invalid>`, which could make unequal batches compare equal in the fuzzer's pretty-print comparison. ## What changes are included in this PR? - Re-enable the `duration_seconds` fuzz column. - Clarify why its generated values remain range-restricted. ## Are these changes tested? Yes. The existing scalar and aggregation fuzz tests pass with `DurationSecond` enabled. ## Are there any user-facing changes? No. --------- Co-authored-by: Neil Conway <[email protected]>
1 parent c922f88 commit 894615a

2 files changed

Lines changed: 2 additions & 8 deletions

File tree

‎datafusion/core/tests/fuzz_cases/record_batch_generator.rs‎

Lines changed: 1 addition & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -91,11 +91,7 @@ pub fn get_supported_types_columns(rng_seed: u64) -> Vec<ColumnDescr> {
9191
"interval_month_day_nano",
9292
DataType::Interval(IntervalUnit::MonthDayNano),
9393
),
94-
// Internal error: AggregationFuzzer task error: JoinError::Panic(Id(29108), "called `Option::unwrap()` on a `None` value", ...).
95-
// ColumnDescr::new(
96-
// "duration_seconds",
97-
// DataType::Duration(TimeUnit::Second),
98-
// ),
94+
ColumnDescr::new("duration_seconds", DataType::Duration(TimeUnit::Second)),
9995
ColumnDescr::new(
10096
"duration_milliseconds",
10197
DataType::Duration(TimeUnit::Millisecond),

‎test-utils/src/array_gen/random_data.rs‎

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -133,9 +133,7 @@ impl RandomNativeData for IntervalMonthDayNanoType {
133133
}
134134
}
135135

136-
// Restrict Duration(Seconds) to i64::MIN / 1000 to i64::MAX / 1000 to
137-
// avoid panics on pretty printing. See
138-
// https://github.com/apache/arrow-rs/issues/7533
136+
// Keep values in the pretty-print range; all others render as `<invalid>`.
139137
impl RandomNativeData for DurationSecondType {
140138
fn generate_random_native_data(rng: &mut StdRng) -> Self::Native {
141139
rng.random::<i64>() / 1000

0 commit comments

Comments
 (0)