Skip to content
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 3 additions & 0 deletions changelog.d/ITL-1446.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
### Fixed

- SpiralDB reports unsupported table names and rejects fixed-size binary, duration, and untyped null columns before writing rows.
3 changes: 3 additions & 0 deletions docs/dev/design_issues/ITL-1162-CA3.md
Original file line number Diff line number Diff line change
Expand Up @@ -35,6 +35,9 @@ ruling, November 16, 2026). `PostgreSQLConnector` also states which table names
(`UnstorableTableNameError`). The connectors' silent TEXT fallback in `CREATE TABLE` now
raises.

ITL-1446 extends SpiralDB's refusal to table names outside pyspiral's `TableName`
type and to fixed-size binary, duration, and untyped null columns.

**Open (the real fix, a later release):** store list and struct columns (for example as JSON
text read back as the same Arrow type) and timestamps on SQLite, and rename SpiralDB's
reserved column names on write and recover them on read, and restore a timestamp's time
Expand Down
21 changes: 21 additions & 0 deletions docs/dev/plans/2026-11-24-itl-1446-strict-fake.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
# ITL-1446 PR 1: pyspiral refusals

- Verify the restrictions in sections 0, 3.2 and 3.4 of PR 542 against pyspiral 0.16.33 without a service.
- Cover the fake's refusals directly. Make the connector report unsupported Arrow types and table names before writes, and check its errors through the connector and database APIs.
- Update test input that relied on an unsupported write. Regenerate the database type matrix and run the targeted suites, lint, types and golden checks.

The installed client's `spiral.api.types.TableName` declares 128 characters and the ASCII pattern
`^[a-zA-Z_][a-zA-Z0-9_-]*$`. An offline Pydantic `TypeAdapter` check confirmed the endpoints
and rejects a final newline. Offline `spiral.core.table.spec.Schema.from_arrow` rejects fixed-size
binary, duration, union and interval. Fixed-size binary and duration also fail inside lists,
structs, maps and dictionary or run-end encoded values.

The installed native library carries the write diagnostics for a value name starting with
`$`, a write array with only key columns, and duplicate keys in an input batch. It also
says a key schema cannot contain a Null type field.

The scope of duplicate detection across Arrow batches is unverified. The native null column-group
diagnostic does not establish refusal of an Arrow `null` value column, which `Schema.from_arrow`
accepts. The connector explicitly refuses such columns as required by PR 1. The schema converter
preserves struct field order, so the fake does not infer nested ordering from the client. ITL-1367
recorded nested sorting on the service.
12 changes: 6 additions & 6 deletions docs/reference/database-types.md
Original file line number Diff line number Diff line change
Expand Up @@ -181,7 +181,7 @@ fields is not covered: a struct whose fields are in another order is another typ

| Type | in-memory | Delta | SQLite | PostgreSQL | SpiralDB |
|---|---|---|---|---|---|
| `null` | kept | refused | refused | refused | kept |
| `null` | kept | refused | refused | refused | refused |

## Temporal

Expand All @@ -205,10 +205,10 @@ fields is not covered: a struct whose fields are in another order is another typ
| `timestamp[ms, tz=Europe/Berlin]` | kept | kept (recorded type) | refused | refused | refused |
| `timestamp[us, tz=Europe/Berlin]` | kept | kept (recorded type) | refused | refused | refused |
| `timestamp[ns, tz=Europe/Berlin]` | kept | kept (recorded type) | refused | refused | refused |
| `duration[s]` | kept | kept (recorded type) | refused | refused | kept |
| `duration[ms]` | kept | kept (recorded type) | refused | refused | kept |
| `duration[us]` | kept | kept (recorded type) | refused | refused | kept |
| `duration[ns]` | kept | kept (recorded type) | refused | refused | kept |
| `duration[s]` | kept | kept (recorded type) | refused | refused | refused |
| `duration[ms]` | kept | kept (recorded type) | refused | refused | refused |
| `duration[us]` | kept | kept (recorded type) | refused | refused | refused |
| `duration[ns]` | kept | kept (recorded type) | refused | refused | refused |

## String and binary

Expand All @@ -218,7 +218,7 @@ fields is not covered: a struct whose fields are in another order is another typ
| `large_string` | kept | kept | kept | kept (by rule) | kept |
| `binary` | kept | kept | kept | kept (by rule) | kept |
| `large_binary` | kept | kept | kept | kept (by rule) | kept |
| `fixed_size_binary[4]` | kept | kept (recorded type) | refused | refused | kept |
| `fixed_size_binary[4]` | kept | kept (recorded type) | refused | refused | refused |

## List

Expand Down
Loading
Loading