New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Add some fuzzing to ASTLiterals #59383
Conversation
This is an automated comment for commit 7be91e6 with description of existing statuses. It's updated for the latest CI running ❌ Click here to open a full report in a separate page Successful checks
|
Looks like changing nodes is not safe. Adding an assert like |
ab9fb37
to
4b5e992
Compare
Unrelated failures. Kind of sad the fuzzer hasn't found anything (yet) but we can see it's working:
|
src/Client/QueryFuzzer.cpp
Outdated
"toFixedString", std::make_shared<ASTLiteral>(value), std::make_shared<ASTLiteral>(static_cast<UInt64>(value.size()))); | ||
} | ||
|
||
if (fuzz_rand() % 11 == 0) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Do we have another method that will remove toNullable and other functions? Take one child from function as ExpressionList. Otherwise it will always converge to have all literals converted to functions
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I don't think we do, but it should be possible to add it for the functions added here (if they are a function with one of the names and only one child, randomly replace it with the child)
Seems like it works both ways:
|
Changelog category (leave one):
Changelog entry (a user-readable short description of the changes that goes to CHANGELOG.md):
Documentation entry for user-facing changes
For ASTLiteral under
ASTExpressionList
try adding or removing:This is assuming those nodes are not being referenced by other ones and can be replaced in the query