Skip to content
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
38 commits
Select commit Hold shift + click to select a range
e2b1839
Add semantic fuzz testing suite with quickcheck
devin-ai-integration[bot] May 13, 2025
9829e29
Update semantic fuzz tests to ensure query validity
devin-ai-integration[bot] May 13, 2025
c13d883
Enhance make_expression_semantic to ensure type compatibility
devin-ai-integration[bot] May 13, 2025
ba3d9c1
Fix Box::new() type errors in semantic_fuzz_test.rs
devin-ai-integration[bot] May 13, 2025
7849d65
Update ORDER BY clause handling to replace SortKey::Positional with S…
devin-ai-integration[bot] May 14, 2025
00da853
Implement SemanticVisitor for semantic fuzz testing
devin-ai-integration[bot] May 14, 2025
fce2a9d
Remove unused functions marked as #[allow(dead_code)]
devin-ai-integration[bot] May 14, 2025
0e1c8a5
Improve semantic visitor implementation: replace wildcard with explic…
devin-ai-integration[bot] May 14, 2025
a5d2a6b
Fix type mismatches in semantic_fuzz_test.rs
devin-ai-integration[bot] May 14, 2025
04dac59
Fix field names and add missing pattern matches in semantic_fuzz_test.rs
devin-ai-integration[bot] May 14, 2025
c92ac86
Fix clippy warnings in semantic_fuzz_test.rs
devin-ai-integration[bot] May 14, 2025
47738a2
Remove dead code functions ensure_numeric_expression and ensure_boole…
devin-ai-integration[bot] May 15, 2025
3fb7368
Fix duplicate case in make_array_expression function
devin-ai-integration[bot] May 15, 2025
ef80a11
Fix formatting issues in semantic_fuzz_test.rs
devin-ai-integration[bot] May 15, 2025
fa02fb1
Fix DatePart::Quarter issue and update evergreen.yml with MongoDB orc…
devin-ai-integration[bot] May 15, 2025
4684e96
Fix formatting issues in semantic_fuzz_test.rs
devin-ai-integration[bot] May 15, 2025
9bdc4eb
Remove test-rust-fuzz task from windows, macos, and macos-arm64 build…
devin-ai-integration[bot] May 15, 2025
fd7c9b8
Improve semantic validity of fuzz tests by fixing GroupByClause handl…
devin-ai-integration[bot] May 15, 2025
149136b
Fix formatting issues in semantic_fuzz_test.rs
devin-ai-integration[bot] May 16, 2025
8c444e8
Update visitor to handle SubstarExpr in SELECT clauses
devin-ai-integration[bot] May 16, 2025
4e0da70
Update visitor to handle SelectExpression::Star in SELECT clauses
devin-ai-integration[bot] May 16, 2025
dec6648
Replace unused variable with underscore in semantic_fuzz_test.rs
devin-ai-integration[bot] May 16, 2025
d011a63
Update visit_sort_key method to handle empty and non-empty select_fields
devin-ai-integration[bot] May 16, 2025
4285fd0
Update line 469 to use visit_select_clause method
devin-ai-integration[bot] May 16, 2025
82dbe00
Update WHERE and HAVING clauses to use visit_expression instead of walk
devin-ai-integration[bot] May 16, 2025
67337d7
Update wildcard case to not add INT_FIELD to select_fields
devin-ai-integration[bot] May 16, 2025
4647ebb
Simplify logic for generating * expressions in SELECT clauses
devin-ai-integration[bot] May 16, 2025
7a96e85
Update SelectBody::Values to ensure Document expressions
devin-ai-integration[bot] May 16, 2025
5e42a32
Remove unnecessary code forcing select_fields to be non-empty
devin-ai-integration[bot] May 16, 2025
aca5375
Make arbitrary_identifier function public for use in semantic_fuzz_te…
devin-ai-integration[bot] May 16, 2025
520d6da
Update import path for arbitrary_identifier in semantic_fuzz_test.rs
devin-ai-integration[bot] May 16, 2025
7d7cead
Fix type mismatches and formatting issues in semantic_fuzz_test.rs
devin-ai-integration[bot] May 16, 2025
6330e5d
Remove unused catalog info
mattChiaravalloti May 16, 2025
1a7cd3c
Clean up names and make_*_expression functions
mattChiaravalloti May 16, 2025
d51d1c6
Massive rewrite
mattChiaravalloti May 16, 2025
aa29b51
Add explanatory comments to functions in semantic_fuzz_test.rs
devin-ai-integration[bot] May 16, 2025
7baa5eb
Fix Devin's bad comments
mattChiaravalloti May 16, 2025
572c3ad
Fix catalog mistake
mattChiaravalloti May 16, 2025
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions Cargo.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

7 changes: 4 additions & 3 deletions evergreen.yml
Original file line number Diff line number Diff line change
Expand Up @@ -966,6 +966,10 @@ tasks:
- name: test-rust-fuzz
tags: ["fuzz"]
commands:
- func: "bootstrap mongo-orchestration"
vars:
MONGODB_VERSION: 6.0
TOPOLOGY: server
- func: "install rust toolchain"
- func: "run rust tests"
retry_on_failure: true
Expand Down Expand Up @@ -1423,7 +1427,6 @@ buildvariants:
- name: compile
- name: test-pipeline-generate
- name: test-rust
- name: test-rust-fuzz
- name: test-go

- name: macos-arm64
Expand All @@ -1435,7 +1438,6 @@ buildvariants:
- name: compile
- name: test-pipeline-generate
- name: test-rust
- name: test-rust-fuzz
- name: test-go

- name: amazon2-arm64
Expand All @@ -1459,7 +1461,6 @@ buildvariants:
- name: compile
- name: test-pipeline-generate
- name: test-rust
- name: test-rust-fuzz
- name: test-go

- name: benchmark
Expand Down
1 change: 1 addition & 0 deletions mongosql/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -33,6 +33,7 @@ edit-distance = "2.1.0"
usererrordisplay-impl = { path = "../usererrordisplay-impl" }
derive-new = "0.5.9"
base64 = { workspace = true }
mongodb = { workspace = true, features = ["sync"] }

[target.'cfg(unix)'.dev-dependencies]
criterion = "0.3"
Expand Down
2 changes: 2 additions & 0 deletions mongosql/src/ast/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -8,3 +8,5 @@ pub use definitions::*;
mod pretty_print_fuzz_test;
#[cfg(test)]
mod pretty_print_test;
#[cfg(test)]
mod semantic_fuzz_test;
8 changes: 4 additions & 4 deletions mongosql/src/ast/pretty_print_fuzz_test.rs
Original file line number Diff line number Diff line change
Expand Up @@ -70,7 +70,7 @@ Reparsed AST:
}
}

mod arbitrary {
pub mod arbitrary {
use crate::ast::definitions::*;
use quickcheck::{Arbitrary, Gen};
use rand::{rng, Rng};
Expand Down Expand Up @@ -106,13 +106,13 @@ mod arbitrary {
/// Return an arbitrary String without null characters.
///
/// These Strings can be used for aliases, identifiers, or literals.
fn arbitrary_string(_: &mut Gen) -> String {
pub fn arbitrary_string(_: &mut Gen) -> String {
arbitrary_string_with_max_len(rand_len(1, 20) as usize)
}

/// Return an arbitrary Option<T>, using the provided Fn to
/// construct the value if the chosen variant is Some.
fn arbitrary_optional<T, F>(g: &mut Gen, f: F) -> Option<T>
pub fn arbitrary_optional<T, F>(g: &mut Gen, f: F) -> Option<T>
where
F: Fn(&mut Gen) -> T,
{
Expand All @@ -127,7 +127,7 @@ mod arbitrary {
/// it just uses arbitrary_string, but this allows us to fine tune
/// easily if we decide to use different rules for identifiers from
/// strings.
fn arbitrary_identifier(g: &mut Gen) -> String {
pub fn arbitrary_identifier(g: &mut Gen) -> String {
arbitrary_string(g)
}

Expand Down
Loading