Commit Graph

8 Commits

Author SHA1 Message Date
Julia Kartseva
58f75c9679
Update src/Storages/StorageFuzzJSON.cpp
Co-authored-by: Kseniia Sumarokova <54203879+kssenii@users.noreply.github.com>
2023-12-19 10:17:15 -08:00
Julia Kartseva
6014dca114 Allow multiple columns in StorageFuzzJSON 2023-12-19 02:34:23 +00:00
Julia Kartseva
0fc402c106 Fix segfault in FuzzJSON engine
Allow only String type for FuzzJSON engine table columns.

Fixes: https://github.com/ClickHouse/ClickHouse/issues/57858
2023-12-19 02:20:37 +00:00
Julia Kartseva
b8d274d070
Add malformed output generation to JSON fuzzer (#57646)
Randomly modify structural characters of a valid JSON ('{', '}', '[', ']',
':', '"', ',') to generate output that cannot be parsed as JSON.

Follow-up to https://github.com/ClickHouse/ClickHouse/pull/56490
2023-12-13 19:59:31 +01:00
robot-ch-test-poll
07ca6236f6
Merge pull request #57372 from jkartseva/fuzz-json-verbose-exception
verbose exception messages for StorageFuzzJSON
2023-11-30 08:20:54 +01:00
Julia Kartseva
ed65c26faf verbose exception messages for StorageFuzzJSON
Follow-up to https://github.com/ClickHouse/ClickHouse/pull/56490#discussion_r1409556111
2023-11-29 20:42:21 +00:00
Robert Schulze
7d26990752
Follow-up to #56490: Fix build with -DENABLE_LIBRARIES=0 2023-11-28 19:59:43 +00:00
Ubuntu
a85cf758b0 Fuzz JSON table function
Create a table function `fuzzJSON`

An example query:
```
CREATE NAMED COLLECTION json_fuzzer AS json_str={};

SELECT *
FROM fuzzJSON(json_fuzzer, json_str = '{"students" : ["Alice", "Bob"]}', random_seed = 666, max_output_length = 128, probability = 0.9)
LIMIT 3

Query id: 7f802052-efb0-41b4-87fa-03b7dd290e9d

┌─json──────────────────────────────────────────────────────────────────────────────────┐
│ {"ade0yX":[9200406572736542991, true, "sm"]}                                          │
│ {"students":["Alice", "eSN3WO#a6NYTBe0$#OWwyIQ"], "cVoP2BuQugQ":17384271928263249403} │
│ {"students":["Alice", "Bob", "T+-k4+PJGkL%XRRaF2BoeN@&A"]}                            │
└───────────────────────────────────────────────────────────────────────────────────────┘
```

Next step:
* Generate invalid string

Fixes #35962

add Object('json')

use named collection
2023-11-28 01:58:24 +00:00