From 50c3c5e12056ea7fd0fd0b98c92a637e095a5cad Mon Sep 17 00:00:00 2001 From: WenyXu Date: Mon, 9 Sep 2024 09:24:12 +0000 Subject: [PATCH] chore: enable fuzz test for append table --- tests-fuzz/targets/fuzz_insert.rs | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/tests-fuzz/targets/fuzz_insert.rs b/tests-fuzz/targets/fuzz_insert.rs index a5db2bfffe45..739d6af7a386 100644 --- a/tests-fuzz/targets/fuzz_insert.rs +++ b/tests-fuzz/targets/fuzz_insert.rs @@ -14,6 +14,7 @@ #![no_main] +use std::collections::HashMap; use std::sync::Arc; use common_telemetry::info; @@ -83,6 +84,11 @@ fn generate_create_expr( input: FuzzInput, rng: &mut R, ) -> Result { + let mut with_clause = HashMap::new(); + if rng.gen_bool(0.5) { + with_clause.insert("append_mode".to_string(), "true".to_string()); + } + let create_table_generator = CreateTableExprGeneratorBuilder::default() .name_generator(Box::new(MappedGenerator::new( WordGenerator, @@ -90,6 +96,7 @@ fn generate_create_expr( ))) .columns(input.columns) .engine("mito") + .with_clause(with_clause) .ts_column_type_generator(Box::new(MySQLTsColumnTypeGenerator)) .build() .unwrap();