Skip to content

More fuzz tests, keep CI red - #111406

Merged
PedroTadim merged 44 commits into
masterfrom
more-fuzz7
Aug 3, 2026
Merged

PedroTadim merged 44 commits into
masterfrom
more-fuzz7

Conversation

@PedroTadim

@PedroTadim PedroTadim commented Jul 22, 2026 •

Copy link
Copy Markdown
Member

Changelog category (leave one):

  • CI Fix or Improvement (changelog entry is not required)

Changelog entry (a user-readable short description of the changes that goes into CHANGELOG.md):

BuzzHouse:

  • Added remote table engines and wrapped-table support (e.g. wrapping base tables with other engines) via SQLCatalog/SQLTable.
  • Added dolor "load external files" integration — new File-engine external-file table support (SQLTable.cpp, ExternalIntegrations.cpp, SQLGrammar.proto).
  • Updated DateTime ranges.

La Casa Del Dolor:

  • filetables.py: new dolor FileTable catalog (620 lines) — multiple File-engine formats, whole-file compression matching the File engine's declared compression (none/gzip/deflate/xz/zstd/bz2/snappy), row-count logging on write, host-path translation for the container↔host user_files mount.
  • A few fixes and new settings.

AST Fuzzer:

  • Wrap tables with Remote, Buffer, Alias, Merge and Distributed engines.
  • New codecs and statistics values.
  • AST fuzz workload queries.
  • Embed a few analysis functions to trigger more edge cases.
  • Replace with virtual columns a few times.

@clickhouse-gh

clickhouse-gh Bot commented Jul 22, 2026 •

Copy link
Copy Markdown
Contributor

Workflow [PR], commit [ce0148d]

Summary: ✅


AI Review

Summary

This PR expands BuzzHouse and the AST fuzzer around remote engines, file-backed external tables, extra codecs/system commands, and wider date-time coverage. The direction is good, but several of the new mutations still violate the engine or statement contracts they are meant to exercise, so they mostly add deterministic invalid queries instead of coverage; I would not merge it as-is.

Findings

⚠️ Majors

  • [src/Client/BuzzHouse/Generator/StatementGenerator.cpp:915-933] [dismissed by author -- https://github.com/More fuzz tests, keep CI red #111406#discussion_r3631458393] OPTIMIZE ... MANIFEST is still offered to every lake engine via t.isAnyLakeEngine(), even though only Iceberg supports it. DeltaLake and Paimon optimize generation therefore still spends a large slice of its new surface on guaranteed NOT_IMPLEMENTED exceptions.
  • [src/Common/QueryFuzzer.cpp:7472-7499] [dismissed by author -- https://github.com/More fuzz tests, keep CI red #111406#discussion_r3631458402] The AST fuzzer still flips manifest independently of FINAL, PARTITION, DEDUPLICATE, CLEANUP, and DRY RUN, and it does not gate the clause to Iceberg tables. That still turns valid optimize seeds into guaranteed BAD_ARGUMENTS / NOT_IMPLEMENTED exceptions instead of exercising compaction logic.
  • [src/Client/BuzzHouse/Generator/SessionSettings.cpp:289-293, src/Client/BuzzHouse/Generator/SQLTypes.cpp:1131-1135] [dismissed by author -- https://github.com/More fuzz tests, keep CI red #111406#discussion_r3637533229] BuzzHouse still enables Quantized for any Array(Float*) column, but inserted rows keep a random element count. Because the codec stores a fixed dimensions value in the DDL, inserts into those columns still frequently fail with SIZES_OF_ARRAYS_DONT_MATCH rather than testing vector-quantized reads and writes.
  • [src/Common/QueryFuzzer.cpp:2317-2401] [dismissed by author -- https://github.com/More fuzz tests, keep CI red #111406#discussion_r3638984528] fuzzCodecFunction can still rename an arbitrary codec to Quantized(...) without any surrounding column-type context. On non-Array(Float32/Float64/BFloat16) columns that is still a deterministic ILLEGAL_COLUMN, so the generic codec mutation path is generating invalid DDL rather than meaningful codec coverage.
  • [src/Client/BuzzHouse/Generator/SQLTable.cpp:1327-1375] [dismissed by author -- https://github.com/More fuzz tests, keep CI red #111406#discussion_r3638984523] The new Remote / RemoteSecure engine branch still inherits the dist_empty arm and can emit Remote(..., '', ''). parseRemoteFunctionArguments still rejects an empty remote table name, so this path is generating guaranteed BAD_ARGUMENTS instead of a usable remote-engine table.
  • [src/Common/QueryFuzzer.cpp:2243-2245, src/Common/QueryFuzzer.cpp:3734-3749] [dismissed by author -- https://github.com/More fuzz tests, keep CI red #111406#discussion_r3644342191] The new exact-match Merge wrappers still build regexes out of raw database/table identifiers. Names containing ., spaces, #, or other RE2 metacharacters are already present in the corpus, so these wrappers still widen matches or produce invalid regexes instead of targeting the intended relation.
  • [src/Common/QueryFuzzer.cpp:7029-7042] [dismissed by author -- https://github.com/More fuzz tests, keep CI red #111406#discussion_r3644342194] Replacing a live DROP TABLE with UNDROP TABLE still skips the state transition that makes UNDROP legal. In the normal corpus flow the table was never dropped, so this path still collapses into TABLE_ALREADY_EXISTS / UNKNOWN_TABLE rather than exercising resurrection.
  • [src/Common/QueryFuzzer.cpp:3502-3528] [dismissed by author -- https://github.com/More fuzz tests, keep CI red #111406#discussion_r3665474628] mergeTreeCodecBlockCounts is still in the same rename bucket as three-argument introspection functions, but it accepts only two arguments. When the swap fires on mergeTreeProjection(...) or mergeTreeTextIndex(...), the third argument survives and the mutation still dies in NUMBER_OF_ARGUMENTS_DOESNT_MATCH.
  • [src/Client/BuzzHouse/Generator/StatementGenerator.cpp:3601-3607, src/Client/BuzzHouse/Generator/SQLQuery.cpp:2644-2649] [dismissed by author -- https://github.com/More fuzz tests, keep CI red #111406#discussion_r3665776018] EXPLAIN ANALYZE still draws from the full attached-table pool, which now includes remote and distributed wrappers. The interpreter still rejects distributed plans and pipelines with RemoteSource / DelayedSource, so a noticeable part of the new analyze surface is still guaranteed NOT_IMPLEMENTED.
  • [tests/casa_del_dolor/catalogs/tablecheck.py:194-210] [dismissed by author -- https://github.com/More fuzz tests, keep CI red #111406#discussion_r3683807956] UInt64 columns are still excluded from the hash comparison solely by ClickHouse type name, even when clickhouse_to_spark mapped them to DECIMAL(20, 0) and the generator bounded the values to the UInt64 range. That means the new lossless mapping still does not actually improve validation coverage.
  • [src/Common/QueryFuzzer.cpp:1022-1071, src/Common/QueryFuzzer.cpp:4272-4275] [dismissed by author -- https://github.com/More fuzz tests, keep CI red #111406#discussion_r3683807963] makeFuzzedVirtualColumn still picks from a global union of storage-specific virtual columns instead of the storage actually referenced by the query. Most of those names remain invalid for the current relation, so the mutation still mostly adds deterministic UNKNOWN_IDENTIFIER noise.
Tests
  • ⚠️ [tests/queries/0_stateless/04658_query_fuzzer_map_key_type.sql:1-38] The PR deletes the only focused regression test for the DataTypeMap::isValidKeyType repair in QueryFuzzer::getRandomType (src/Common/QueryFuzzer.cpp:3323-3327) without replacement. If the old seeds no longer hit the path after the new mutations, this should be retargeted to fresh seeds or reframed, not removed.
Final Verdict

Changes requested.

@clickhouse-gh clickhouse-gh Bot added the pr-ci label Jul 22, 2026
Comment thread src/Common/QueryFuzzer.cpp Resolved
Comment thread src/Common/QueryFuzzer.cpp Resolved
Comment thread src/Common/QueryFuzzer.cpp Resolved
…es for dolor with more formats and whole-file compression, missing AST features, scale-aware DateTime ranges and missing server properties
Comment thread src/Common/QueryFuzzer.cpp Resolved
Comment thread src/Common/QueryFuzzer.cpp Resolved
Comment thread src/Common/QueryFuzzer.cpp Resolved
Comment thread ci/jobs/scripts/fuzzer/run-fuzzer.sh Resolved
Comment thread src/Common/QueryFuzzer.cpp Resolved
Comment thread src/Common/QueryFuzzer.cpp Resolved
Comment thread src/Common/QueryFuzzer.cpp Resolved
Comment thread src/Common/QueryFuzzer.cpp Resolved
@clickhouse-gh

clickhouse-gh Bot commented Aug 1, 2026

Copy link
Copy Markdown
Contributor

LLVM Coverage Report

Metric Baseline Current Δ
Lines 86.50% 86.50% +0.00%
Functions 91.90% 91.90% +0.00%
Branches 78.70% 78.70% +0.00%

Changed lines: Changed C/C++ lines covered: 0/0 (nothing coverable) · Uncovered code

Full report · Diff report

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

pr-ci pr-synced-to-cloud The PR is synced to the cloud repo

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants