Skip to content

Commit

Permalink
Merge pull request #11701 from Mytherin/improvestatementreduction
Browse files Browse the repository at this point in the history
Minor improvements to sql_reduce script
  • Loading branch information
Mytherin committed Apr 18, 2024
2 parents 8c06530 + fbeeb5e commit f6e169b
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 1 deletion.
2 changes: 2 additions & 0 deletions extension/sqlsmith/statement_simplifier.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -132,6 +132,8 @@ void StatementSimplifier::Simplify(unique_ptr<TableRef> &ref) {
SimplifyOptionalExpression(cp.condition);
SimplifyReplace(ref, cp.left);
SimplifyReplace(ref, cp.right);
SimplifyEnum(cp.type, JoinType::INNER);
SimplifyEnum(cp.ref_type, JoinRefType::REGULAR);
break;
}
case TableReferenceType::EXPRESSION_LIST: {
Expand Down
2 changes: 1 addition & 1 deletion scripts/reduce_sql.py
Original file line number Diff line number Diff line change
Expand Up @@ -258,7 +258,7 @@ def reduce_query_log(queries, shell, max_time_seconds=300):
print(expected_error)
print("===================================================")

final_query = reduce(sql_query, data_load, shell, expected_error, args.max_time)
final_query = reduce(sql_query, data_load, shell, expected_error, int(args.max_time))
print("Found final reduced query")
print("===================================================")
print(final_query)
Expand Down

0 comments on commit f6e169b

Please sign in to comment.