{"id":51925334,"url":"https://github.com/databendlabs/databend-sqlsmith","last_synced_at":"2026-07-28T00:30:19.590Z","repository":{"id":371254176,"uuid":"1298760246","full_name":"databendlabs/databend-sqlsmith","owner":"databendlabs","description":null,"archived":false,"fork":false,"pushed_at":"2026-07-14T06:08:17.000Z","size":83,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":0,"default_branch":"main","last_synced_at":"2026-07-14T08:09:53.851Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"language":"Rust","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"apache-2.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/databendlabs.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null,"zenodo":null,"notice":null,"maintainers":null,"copyright":null,"agents":null,"dco":null,"cla":null}},"created_at":"2026-07-13T01:43:24.000Z","updated_at":"2026-07-14T06:08:22.000Z","dependencies_parsed_at":null,"dependency_job_id":null,"html_url":"https://github.com/databendlabs/databend-sqlsmith","commit_stats":null,"previous_names":["databendlabs/databend-sqlsmith"],"tags_count":null,"template":false,"template_full_name":null,"purl":"pkg:github/databendlabs/databend-sqlsmith","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/databendlabs%2Fdatabend-sqlsmith","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/databendlabs%2Fdatabend-sqlsmith/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/databendlabs%2Fdatabend-sqlsmith/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/databendlabs%2Fdatabend-sqlsmith/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/databendlabs","download_url":"https://codeload.github.com/databendlabs/databend-sqlsmith/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/databendlabs%2Fdatabend-sqlsmith/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":35970842,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-07-20T02:08:10.276Z","status":"online","status_checked_at":"2026-07-27T02:00:06.776Z","response_time":101,"last_error":null,"robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":true,"can_crawl_api":true,"host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":[],"created_at":"2026-07-28T00:30:18.724Z","updated_at":"2026-07-28T00:30:19.562Z","avatar_url":"https://github.com/databendlabs.png","language":"Rust","funding_links":[],"categories":[],"sub_categories":[],"readme":"# databend-sqlsmith\n\n`databend-sqlsmith` is SQL fuzzing tool for generating and executing random SQL against a Databend-compatible HTTP endpoint. It is intended to find crashes, panics, connection failures, timeouts, and unexpected errors across query planning, expression evaluation, functions, DDL, and DML.\n\n## Features\n\n- Creates a test database, base tables, and views automatically.\n- Generates random DDL, DML, and SELECT queries.\n- Generates scalar expressions, aggregate functions, window functions, lambda functions, nested types, and complex query shapes.\n- Loads scalar function signatures from `function_list.txt` instead of hard-coding them in Rust.\n- Supports mutation fuzzing for existing SQL files or directories.\n- Filters known expected errors such as invalid arguments, unsupported type combinations, and normal cast failures.\n- Highlights unknown errors, connection failures, server crashes, and query timeouts.\n- Attempts to reduce some failing queries to smaller reproductions.\n\n## Usage\n\nStart a Databend-compatible service, then run:\n\n```bash\ncargo run --bin databend-sqlsmith -- \\\n  --host localhost \\\n  --port 8000 \\\n  --user root \\\n  --pass \"\" \\\n  --db sqlsmith_test \\\n  --count 500 \\\n  --timeout 5 \\\n  --log-path .databend/sqlsmithlog\n```\n\nRun mutation fuzzing over existing SQL files:\n\n```bash\ncargo run --bin databend-sqlsmith -- \\\n  --fuzz-path path/to/sql_or_directory \\\n  --log-path .databend/sqlsmithlog\n```\n\n## Options\n\n- `--host`: HTTP host, default `localhost`.\n- `--port`: HTTP port, default `8000`.\n- `--db`: test database name, default `sqlsmith_test`.\n- `--user`: username, default `root`.\n- `--pass`: password, default empty string.\n- `--count`: number of random queries to generate, default `500`.\n- `--timeout`: timeout per SQL statement in seconds, default `5`.\n- `--fuzz-path`: SQL file or directory for mutation fuzzing. If empty, random generation mode is used.\n- `--log-path`: directory for SQL logs, default `.databend/sqlsmithlog`.\n\n## Output\n\nEach run writes two log files under `--log-path`:\n\n- `databend-sqlsmith.\u003ctime\u003e.sql`: all executed SQL statements.\n- `databend-sqlsmith.\u003ctime\u003e.error.sql`: SQL statements that triggered errors or timeouts.\n\nThese files are the main inputs for debugging failures and creating regression tests.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fdatabendlabs%2Fdatabend-sqlsmith","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fdatabendlabs%2Fdatabend-sqlsmith","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fdatabendlabs%2Fdatabend-sqlsmith/lists"}