Skip to content

Commit

Permalink
fix(sqlsmith): generation of ambiguous IN list expression (#7672)
Browse files Browse the repository at this point in the history
Generate `InList` expression with parenthesis in the prefix argument to avoid ambiguity.

Approved-By: lmatz
  • Loading branch information
kwannoel authored Feb 2, 2023
1 parent 00b0e36 commit 99ffb71
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/tests/sqlsmith/src/sql_gen/expr.rs
Original file line number Diff line number Diff line change
Expand Up @@ -58,7 +58,7 @@ impl<'a, R: Rng> SqlGenerator<'a, R> {
let (ty, expr) = self.gen_arbitrary_expr(context);
let n = self.rng.gen_range(1..=10);
Expr::InList {
expr: Box::new(expr),
expr: Box::new(Expr::Nested(Box::new(expr))),
list: self.gen_n_exprs_with_type(n, &ty, context),
negated: self.flip_coin(),
}
Expand Down

0 comments on commit 99ffb71

Please sign in to comment.