-
Notifications
You must be signed in to change notification settings - Fork 8.3k
New JSON-type fuzzing proposal #68676
Copy link
Copy link
Open
Labels
enhancementjsonIssues and pull-requests related to the new JSON data typeIssues and pull-requests related to the new JSON data type
Description
Company or project name
ClickHouse inc.
Use case
Since the new type has been merged #66444 we need to test it continuously.
Describe the solution you'd like
The proposal is relatively simple:
CREATE TABLE (j JSON) ENGINE = X, X can beMemory,ReplacingMergeTree,SummingMergeTree, etc.- Generate random JSON objects and generate INSERT statements based on them. We can try to use
libprotobuf-mutatorfrom LLVM and convert Protobuf to JSON or do something even smarter.fuzzJSONtable function can also help here.
As a result we will have a bunch of JSON objects like {"a": 1, "b": 2} or {"c" : {"d": 3}} . Additionally we will track all the keys and how they nest to each other (in a form of a tree).
graph TD;
j;
j;
j-->a;
j-->b;
j-->c;
c-->d;
This diagram means in table j we have the following columns and subcolumns: j.a, j.b, j.c.d. We then can write down all possible paths and use them as identifiers for other queries like SELECTs, UPDATEs or DELETEs. They can be generated special mode of AST Fuzzer embedded into clickhouse-client.
We will pack everything together and then run in the CI.
@Avogar thoughts?
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
enhancementjsonIssues and pull-requests related to the new JSON data typeIssues and pull-requests related to the new JSON data type