Skip to content

Differential Fuzzing (3/3): Check DuckDbDialect against DuckDB's own parser - #2564

Merged
LucaCappelletti94 merged 1 commit into
apache:mainfrom
LucaCappelletti94:fuzz-duckdb-differential
Sep 23, 2026
Merged

LucaCappelletti94 merged 1 commit into
apache:mainfrom
LucaCappelletti94:fuzz-duckdb-differential

Conversation

@LucaCappelletti94

Copy link
Copy Markdown
Contributor

This PR adds fuzz_duckdb_accepts, a target that parses each input with a bundled DuckDB through json_serialize_sql and fails when DuckDB accepts a SELECT that DuckDbDialect rejects. Nothing is executed or bound. json_serialize_sql only serializes SELECT statements, so other statements are skipped rather than risk false reports. DuckDB's grammar also turns any unknown operator string, such as the trailing & in SELECT 1 &, into a call to a function that does not exist, so inputs calling an operator missing from DuckDB's function catalog are skipped too.

Inputs the dialect accepts more liberally than DuckDB never fail.

A 5-minute run found several distinct gaps.

@LucaCappelletti94 LucaCappelletti94 added the fuzzer A bug found by the fuzzer label Sep 23, 2026
@LucaCappelletti94
LucaCappelletti94 marked this pull request as ready for review September 23, 2026 13:47
@codecov-commenter

codecov-commenter commented Sep 23, 2026 •

Copy link
Copy Markdown

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 80.96%. Comparing base (4a609e7) to head (ea3788b).

Additional details and impacted files
@@           Coverage Diff           @@
##             main    #2564   +/-   ##
=======================================
  Coverage   80.96%   80.96%           
=======================================
  Files          42       42           
  Lines       33359    33359           
  Branches    33359    33359           
=======================================
  Hits        27009    27009           
  Misses       2790     2790           
  Partials     3560     3560           

☔ View full report in Codecov by Harness.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

@LucaCappelletti94
LucaCappelletti94 added this pull request to the merge queue Sep 23, 2026
Merged via the queue into apache:main with commit 9ae00e7 Sep 23, 2026
13 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

DuckDB fuzzer A bug found by the fuzzer

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants