MCPcopy Create free account
hub / github.com/PostHog/duckgres / TestFallbackComplexDuckDBSyntax

Function TestFallbackComplexDuckDBSyntax

tests/integration/fallback_test.go:118–146  ·  view source on GitHub ↗

TestFallbackComplexDuckDBSyntax tests more complex DuckDB-specific syntax

(t *testing.T)

Source from the content-addressed store, hash-verified

116
117// TestFallbackComplexDuckDBSyntax tests more complex DuckDB-specific syntax
118func TestFallbackComplexDuckDBSyntax(t *testing.T) {
119 tests := []QueryTest{
120 // DuckDB positional join
121 {
122 Name: "positional_join",
123 Query: "SELECT * FROM (SELECT 1 AS a, 2 AS b) t1 POSITIONAL JOIN (SELECT 3 AS c, 4 AS d) t2",
124 DuckgresOnly: true,
125 },
126 // DuckDB ASOF join (requires proper timestamp/ordering columns)
127 {
128 Name: "asof_join_basic",
129 Query: "SELECT * FROM (SELECT 1 AS id, 100 AS ts) t1 ASOF JOIN (SELECT 1 AS id, 50 AS ts) t2 ON t1.id = t2.id AND t1.ts >= t2.ts",
130 DuckgresOnly: true,
131 },
132 // DuckDB COLUMNS expression
133 {
134 Name: "columns_expression",
135 Query: "SELECT COLUMNS('id|name') FROM users LIMIT 1",
136 DuckgresOnly: true,
137 },
138 // DuckDB sample
139 {
140 Name: "sample_rows",
141 Query: "SELECT * FROM users USING SAMPLE 3 ROWS",
142 DuckgresOnly: true,
143 },
144 }
145 runQueryTests(t, tests)
146}
147
148// TestFallbackInvalidSyntax tests that truly invalid syntax still returns errors
149func TestFallbackInvalidSyntax(t *testing.T) {

Callers

nothing calls this directly

Calls 1

runQueryTestsFunction · 0.85

Tested by

no test coverage detected