diff --git a/src/tests/sqlsmith/src/validation.rs b/src/tests/sqlsmith/src/validation.rs index 99580616c15d..c49ee05cbdd9 100644 --- a/src/tests/sqlsmith/src/validation.rs +++ b/src/tests/sqlsmith/src/validation.rs @@ -104,6 +104,10 @@ pub fn is_neg_exp_error(db_error: &str) -> bool { db_error.contains("zero raised to a negative power is undefined") } +pub fn is_neg_input_error(db_error: &str) -> bool { + db_error.contains("input cannot be negative value") +} + /// Certain errors are permitted to occur. This is because: /// 1. It is more complex to generate queries without these errors. /// 2. These errors seldom occur, skipping them won't affect overall effectiveness of sqlsmith. @@ -121,4 +125,5 @@ pub fn is_permissible_error(db_error: &str) -> bool { || is_overlay_start_error(db_error) || is_broken_channel_error(db_error) || is_neg_exp_error(db_error) + || is_neg_input_error(db_error) }