Datasets:
Download instances/database-sqlc-4585/tests/patches/sqlc/test-1.patch from CrossSWE/CrossSWE-Bench: direct link, hf CLI and curl.
- Browser
- Download file 859 Bytes
-
https://huggingface.co/datasets/CrossSWE/CrossSWE-Bench/resolve/main/instances/database-sqlc-4585/tests/patches/sqlc/test-1.patch
- Command line
-
hf download hf://datasets/CrossSWE/CrossSWE-Bench/instances/database-sqlc-4585/tests/patches/sqlc/test-1.patch
-
curl -L -o test-1.patch https://huggingface.co/datasets/CrossSWE/CrossSWE-Bench/resolve/main/instances/database-sqlc-4585/tests/patches/sqlc/test-1.patch
859 Bytes
| diff --git a/internal/engine/duckdb/crossrepo_contract_test.go b/internal/engine/duckdb/crossrepo_contract_test.go | |
| new file mode 100644 | |
| index 000000000..07c441113 | |
| --- /dev/null | |
| +++ b/internal/engine/duckdb/crossrepo_contract_test.go | |
| +package duckdb | |
| + | |
| +import ( | |
| + "strings" | |
| + "testing" | |
| +) | |
| + | |
| +// The DuckDB adapter consumes darkwing's parser and AST. A quoted COLLATE | |
| +// name is accepted only by darkwing's hardened transformer and must survive | |
| +// conversion into sqlc's statement AST. | |
| +func TestCrossRepoDuckDBCollateContract(t *testing.T) { | |
| + statements, err := NewParser().Parse(strings.NewReader("SELECT 'x' COLLATE 'nocase';")) | |
| + if err != nil { | |
| + t.Fatalf("DuckDB query should parse through the darkwing adapter: %v", err) | |
| + } | |
| + if len(statements) != 1 { | |
| + t.Fatalf("expected one converted statement, got %d", len(statements)) | |
| + } | |
| +} | |