Skip to content

Apache DataFusion SQL Query Engine

test: enable `DurationSecond` fuzzing (#24772)

Theo Butler894615a7f05f
diff --git a/datafusion/core/tests/fuzz_cases/record_batch_generator.rs b/datafusion/core/tests/fuzz_cases/record_batch_generator.rs
index 12d1e28346..256891016c 100644
--- a/datafusion/core/tests/fuzz_cases/record_batch_generator.rs
+++ b/datafusion/core/tests/fuzz_cases/record_batch_generator.rs
@@ -91,11 +91,7 @@ pub fn get_supported_types_columns(rng_seed: u64) -> Vec<ColumnDescr> {
"interval_month_day_nano",
DataType::Interval(IntervalUnit::MonthDayNano),
),
- // Internal error: AggregationFuzzer task error: JoinError::Panic(Id(29108), "called `Option::unwrap()` on a `None` value", ...).
- // ColumnDescr::new(
- // "duration_seconds",
- // DataType::Duration(TimeUnit::Second),
- // ),
+ ColumnDescr::new("duration_seconds", DataType::Duration(TimeUnit::Second)),
ColumnDescr::new(
"duration_milliseconds",
DataType::Duration(TimeUnit::Millisecond),
diff --git a/test-utils/src/array_gen/random_data.rs b/test-utils/src/array_gen/random_data.rs
index bcd8e4d24c..069c3cb8e8 100644
--- a/test-utils/src/array_gen/random_data.rs
+++ b/test-utils/src/array_gen/random_data.rs
@@ -133,9 +133,7 @@ impl RandomNativeData for IntervalMonthDayNanoType {
}
}
-// Restrict Duration(Seconds) to i64::MIN / 1000 to i64::MAX / 1000 to
-// avoid panics on pretty printing. See
-// https://github.com/apache/arrow-rs/issues/7533
+// Keep values in the pretty-print range; all others render as `<invalid>`.
impl RandomNativeData for DurationSecondType {
fn generate_random_native_data(rng: &mut StdRng) -> Self::Native {
rng.random::<i64>() / 1000