Fuzzer: add ORDER BY DESC / multi-column / positional coverage

Open Beginner friendly
#161 0 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Assessment

Difficulty
2/5
Estimated time
1-3 hours
Newbie friendliness
87/100
Issue type
Feature
Clarity
Clearly specified
Activity status
Active
Tech stack
sql, zig
Domain
cli, testing

Research direction

Start with bench/query_fuzz.sh, especially emit_projection, emit_limit_offset, and the kind_roll dispatch in the BEGIN block; consult the README's SQL Reference for the supported ORDER BY forms. Add generated coverage for DESC, multi-column, and positional ORDER BY, then run ./bench/query_fuzz.sh --seed 1 --count 3000 with DuckDB on PATH and a built csvql binary.

Written by the indexing model from the issue text.

Description

enhancement good first issue

bench/query_fuzz.sh's generated queries always sort with a bare `ORDER BY id` (see emit_projection/emit_limit_offset in the script) — DESC, multi-column ORDER BY, and positional (`ORDER BY 1`) are all supported SQL features (see README's SQL Reference) but never exercised by the differential fuzzer against DuckDB.

Good starting point for getting familiar with the generator: the script is heavily commented, and adding a new query shape is adding one new emit_* awk function plus a new branch in the kind_roll dispatch at the top of the BEGIN block — see emit_limit_offset for a recent, well-commented example of exactly this pattern.

Test with: ./bench/query_fuzz.sh --seed 1 --count 3000 (needs duckdb on PATH and a built csvql binary).

Dominant language
Zig
Stars
27
Forks
5
Avg merge
11h 53m
Merged PRs (30d)
14

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

More from melihbirim/csvql

All issues in melihbirim/csvql

Similar issues

More CLI issues

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.