Commit 542cc1b
authored
fix(rust): handle DDL statements with empty result schema (#371)
## Summary
- DDL statements (CREATE TABLE, DROP TABLE, ALTER, etc.) return a
manifest with `column_count: 0` and **omit the `columns` field
entirely** from the JSON response
- This caused deserialization to fail with `missing field 'columns'`,
making all DDL statements unusable
- Added `#[serde(default)]` to `ResultSchema.columns` so it defaults to
an empty `Vec` when absent
## Test plan
- [ ] Verified locally: CREATE TABLE, INSERT, UPDATE, DELETE, DROP TABLE
all succeed
- [ ] `cargo test` passes (unit + doc tests)
- [ ] CI passes
This pull request was AI-assisted by Isaac.1 parent 8682f0b commit 542cc1b
1 file changed
+31
-0
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
88 | 88 | | |
89 | 89 | | |
90 | 90 | | |
| 91 | + | |
91 | 92 | | |
92 | 93 | | |
93 | 94 | | |
| |||
443 | 444 | | |
444 | 445 | | |
445 | 446 | | |
| 447 | + | |
| 448 | + | |
| 449 | + | |
| 450 | + | |
| 451 | + | |
| 452 | + | |
| 453 | + | |
| 454 | + | |
| 455 | + | |
| 456 | + | |
| 457 | + | |
| 458 | + | |
| 459 | + | |
| 460 | + | |
| 461 | + | |
| 462 | + | |
| 463 | + | |
| 464 | + | |
| 465 | + | |
| 466 | + | |
| 467 | + | |
| 468 | + | |
| 469 | + | |
| 470 | + | |
| 471 | + | |
| 472 | + | |
| 473 | + | |
| 474 | + | |
| 475 | + | |
| 476 | + | |
446 | 477 | | |
447 | 478 | | |
448 | 479 | | |
| |||
0 commit comments