Skip to content

Commit

Permalink
chore(sqlsmith): ignore sqrt with negative input error (#19566) (#19632)
Browse files Browse the repository at this point in the history
Co-authored-by: Noel Kwan <[email protected]>
  • Loading branch information
github-actions[bot] and kwannoel authored Dec 4, 2024
1 parent 2d75798 commit 687e0b0
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions src/tests/sqlsmith/src/validation.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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.
Expand All @@ -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)
}

0 comments on commit 687e0b0

Please sign in to comment.