Skip to content

Commit a67a29a

Browse files
fuziontechclaude
andcommitted
Update TEST_RESULTS.md for DuckLake mode
- Add test mode comparison table (DuckLake 53% vs Vanilla 76%) - Document DuckLake infrastructure (metadata PostgreSQL + MinIO) - Add DuckLake-specific limitations section - Update running instructions for both modes - Add RETURNING clause as known issue for DuckLake - Document DDL transform fixes for DuckLake 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude <[email protected]>
1 parent 056bcbc commit a67a29a

File tree

1 file changed

+101
-14
lines changed

1 file changed

+101
-14
lines changed

tests/integration/TEST_RESULTS.md

Lines changed: 101 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -5,9 +5,26 @@
55

66
## Summary
77

8-
The integration test suite validates Duckgres compatibility with PostgreSQL for OLAP workloads.
8+
The integration test suite validates Duckgres compatibility with PostgreSQL for OLAP workloads. Tests run against **DuckLake by default** (DuckDB + PostgreSQL metadata + MinIO object storage).
99

10-
### Overall Results
10+
### Test Modes
11+
12+
| Mode | Description | Pass Rate |
13+
|------|-------------|-----------|
14+
| **DuckLake** (default) | Full DuckLake with PostgreSQL metadata + MinIO | 53% |
15+
| **Vanilla DuckDB** | In-memory DuckDB without DuckLake | 76% |
16+
17+
To run without DuckLake: `DUCKGRES_TEST_NO_DUCKLAKE=1 go test ./tests/integration/...`
18+
19+
### Overall Results (DuckLake Mode)
20+
21+
| Metric | Count |
22+
|--------|-------|
23+
| **PASS** | 48 |
24+
| **FAIL** | 42 |
25+
| **Pass Rate** | 53% |
26+
27+
### Overall Results (Vanilla DuckDB Mode)
1128

1229
| Metric | Count |
1330
|--------|-------|
@@ -16,7 +33,7 @@ The integration test suite validates Duckgres compatibility with PostgreSQL for
1633
| **SKIP** | 18 |
1734
| **Pass Rate** | 76% |
1835

19-
### Results by Category
36+
### Results by Category (Vanilla DuckDB)
2037

2138
| Category | Tests | Passed | Failed | Pass Rate |
2239
|----------|-------|--------|--------|-----------|
@@ -40,7 +57,40 @@ The integration test suite validates Duckgres compatibility with PostgreSQL for
4057
| **Functions** | ~180 | ~130 | ~50 | ~72% |
4158
| **Types** | ~80 | ~60 | ~20 | ~75% |
4259

43-
## Passing Test Categories
60+
## DuckLake Mode
61+
62+
DuckLake mode is enabled by default because it better represents production usage. DuckLake stores table metadata in PostgreSQL and data files as Parquet in S3-compatible storage (MinIO).
63+
64+
### DuckLake Infrastructure
65+
66+
The test infrastructure includes:
67+
- **PostgreSQL** (port 35432): For comparison testing against real PostgreSQL
68+
- **DuckLake Metadata PostgreSQL** (port 35433): Stores DuckLake catalog metadata
69+
- **MinIO** (port 39000): S3-compatible object storage for Parquet files
70+
71+
### DuckLake-Specific Limitations
72+
73+
DuckLake has additional constraints compared to vanilla DuckDB:
74+
75+
1. **No RETURNING clause** - `INSERT/UPDATE/DELETE ... RETURNING` not supported
76+
2. **Limited DEFAULT values** - Only numeric and string literals (no `DEFAULT true`, `DEFAULT now()`)
77+
3. **No PRIMARY KEY/UNIQUE/FOREIGN KEY** - Constraints are stripped by the DDL transform
78+
4. **No SERIAL types** - Converted to INTEGER types
79+
5. **No CREATE INDEX** - Indexes are no-ops in DuckLake
80+
81+
### Passing Categories in DuckLake Mode
82+
83+
| Category | Pass Rate |
84+
|----------|-----------|
85+
| pg_catalog Compatibility | 100% |
86+
| information_schema | 100% |
87+
| DDL (with constraint stripping) | ~70% |
88+
| DML (without RETURNING) | ~60% |
89+
| Window Functions | 100% |
90+
| CTEs | 100% |
91+
| Set Operations | 100% |
92+
93+
## Passing Test Categories (Vanilla DuckDB)
4494

4595
### pg_catalog Compatibility (100%)
4696
All pg_catalog views and functions work correctly:
@@ -142,24 +192,34 @@ The SHOW command is not fully supported for all PostgreSQL configuration paramet
142192

143193
**Workaround**: Use `SELECT current_setting('server_version')` instead
144194

145-
### 6. Prepared Statement Protocol
146-
The extended query protocol (Parse/Bind/Describe/Execute) has timing issues with the 'T' (RowDescription) message.
195+
### 6. RETURNING Clause (DuckLake)
196+
DuckLake does not support `INSERT/UPDATE/DELETE ... RETURNING`.
197+
198+
**Impact**: Tests using RETURNING clause fail in DuckLake mode
199+
**Workaround**: Use separate SELECT after mutation
147200

148-
### 7. Per-Connection Database
201+
### 7. Per-Connection Database (Vanilla DuckDB)
149202
Each new database connection gets a fresh in-memory DuckDB database. This is by design but affects tests requiring data persistence across connections.
150203

204+
**Note**: This is not an issue in DuckLake mode where metadata persists.
205+
151206
## Fixes Applied
152207

153208
### Wire Protocol Fixes
154209
- **Timestamp formatting** (`server/conn.go`): Format timestamps as `2006-01-02 15:04:05` instead of Go's default `2024-01-01 10:00:00 +0000 UTC`
155210
- **Prepared statement protocol** (`server/conn.go`): Fixed duplicate RowDescription during Execute when Describe(S) was called - now tracks statement describe state and propagates to portals
156211

212+
### DDL Transform Fixes (DuckLake)
213+
- **Strip boolean defaults** (`transpiler/transform/ddl.go`): DuckLake only supports numeric/string literal defaults
214+
- **Strip all constraints** (`transpiler/transform/ddl.go`): PRIMARY KEY, UNIQUE, FOREIGN KEY, CHECK
215+
157216
### Test Harness Fixes
158217
- **`compare.go`**: Use `sql.RawBytes` to avoid driver parsing issues
159218
- **`compare.go`**: Add `IgnoreColumnNames` option (DuckDB names anonymous columns differently)
160219
- **`compare.go`**: Add `IgnoreRowOrder` option (row order undefined without ORDER BY)
161220
- **`compare.go`**: Fix numeric and time comparison in row sorting
162221
- **`harness.go`**: Strip SQL comments before statement splitting
222+
- **`harness.go`**: Add DuckLake cleanup before loading fixtures
163223
- **`fixtures/schema.sql`**: Remove JSON columns (transpiler issue)
164224
- **`fixtures/data.sql`**: Fix invalid UUID
165225

@@ -183,23 +243,42 @@ xcode-select --install
183243

184244
## Running Tests
185245

246+
### With DuckLake (Default)
247+
186248
```bash
187-
# Start PostgreSQL container
249+
# Start all infrastructure (PostgreSQL + DuckLake metadata + MinIO)
188250
docker compose -f tests/integration/docker-compose.yml up -d
189251

190-
# Wait for PostgreSQL to be ready
191-
sleep 5
252+
# Wait for services to be ready
253+
sleep 10
192254

193255
# Run all tests
194256
go test ./tests/integration/... -v
195257

258+
# Stop infrastructure
259+
docker compose -f tests/integration/docker-compose.yml down -v
260+
```
261+
262+
### Without DuckLake (Vanilla DuckDB)
263+
264+
```bash
265+
# Start only PostgreSQL for comparison
266+
docker compose -f tests/integration/docker-compose.yml up -d postgres
267+
268+
# Run tests in vanilla DuckDB mode
269+
DUCKGRES_TEST_NO_DUCKLAKE=1 go test ./tests/integration/... -v
270+
271+
# Stop PostgreSQL
272+
docker compose -f tests/integration/docker-compose.yml down -v
273+
```
274+
275+
### Run Specific Tests
276+
277+
```bash
196278
# Run specific test categories
197279
go test ./tests/integration/... -v -run "TestCatalog"
198280
go test ./tests/integration/... -v -run "TestDQL"
199281
go test ./tests/integration/clients/... -v -run "TestGrafana"
200-
201-
# Stop PostgreSQL container
202-
docker compose -f tests/integration/docker-compose.yml down -v
203282
```
204283

205284
## Recommendations for Improving Compatibility
@@ -208,7 +287,7 @@ docker compose -f tests/integration/docker-compose.yml down -v
208287
2. **Add `SHOW server_version` support** for DBeaver compatibility
209288
3. **Transpile regex operators** (`~`, `~*`) to `regexp_matches()`
210289
4. **Handle integer division** to match PostgreSQL behavior
211-
5. **Review extended query protocol** for prepared statement support
290+
5. **Add RETURNING emulation** for DuckLake mode (separate SELECT)
212291

213292
## CI Configuration
214293

@@ -219,4 +298,12 @@ For GitHub Actions, add these dependencies to your workflow:
219298
run: |
220299
sudo apt-get update
221300
sudo apt-get install -y g++
301+
302+
- name: Start test infrastructure
303+
run: |
304+
docker compose -f tests/integration/docker-compose.yml up -d
305+
sleep 10
306+
307+
- name: Run integration tests
308+
run: go test ./tests/integration/... -v
222309
```

0 commit comments

Comments
 (0)