Skip to content

Commit

Permalink
docs: Clarify DuckDB type limitations (#633)
Browse files Browse the repository at this point in the history
* docs: Clarify DuckDB type limitations

* docs: Clarify supported structs format

* docs: Remove federation limitation that does not apply to DuckDB connectors
peasee authored Nov 13, 2024

Verified

This commit was created on GitHub.com and signed with GitHub’s verified signature.
1 parent 6fa1415 commit 780a54d
Showing 2 changed files with 21 additions and 7 deletions.
13 changes: 6 additions & 7 deletions spiceaidocs/docs/components/data-accelerators/duckdb.md
Original file line number Diff line number Diff line change
@@ -36,18 +36,17 @@ datasets:

:::warning[Limitations]

- The DuckDB accelerator does not support schemas with [field types](https://duckdb.org/docs/sql/data_types/overview): nested arrays/lists, UTF8/string arrays/lists, boolean arrays/lists, structs, nested structs or map fields. For example:
- The DuckDB accelerator does not support nested lists, or structs with nested structs/lists [field types](https://duckdb.org/docs/sql/data_types/overview). For example:
- Supported:
- `SELECT [1, 2, 3];`
- `SELECT ['1992-09-20 11:30:00.123456789', 'epoch'::TIMESTAMP]`
- `SELECT {'x': 1, 'y': 2, 'z': 3}`
- Unsupported:
- `SELECT [['duck', 'goose', 'heron'], ['frog', 'toad']]`
- `SELECT {'x': 1, 'y': 2, 'z': 3}`
- `SELECT {'x': [1, 2, 3]}`
- The DuckDB accelerator does not support enum, dictionary, or map [field types](https://duckdb.org/docs/sql/data_types/overview). For example:
- Unsupported:
- `SELECT MAP(['key1', 'key2', 'key3'], [10, 20, 30])`
- `SELECT ['duck', 'goose', 'heron'];`
- `SELECT [true, false];`
- The DuckDB accelerator does not support `Decimal256` (76 digits), as it exceeds DuckDB's maximum Decimal width of 38 digits.
- Updating a dataset with DuckDB acceleration while the Spice Runtime is running (hot-reload) will cause DuckDB accelerator query federation to disable until the Runtime is restarted.
- Updating a dataset with DuckDB acceleration while the Spice Runtime is running (hot-reload) will cause the DuckDB accelerator query federation to disable until the Runtime is restarted.

:::

15 changes: 15 additions & 0 deletions spiceaidocs/docs/components/data-connectors/duckdb.md
Original file line number Diff line number Diff line change
@@ -83,3 +83,18 @@ SELECT * FROM 'todos.json';
-- As a DuckDB function
SELECT * FROM read_json('todos.json');
```

:::warning[Limitations]

- The DuckDB connector does not support nested lists, or structs with nested structs/lists [field types](https://duckdb.org/docs/sql/data_types/overview). For example:
- Supported:
- `SELECT {'x': 1, 'y': 2, 'z': 3}`
- Unsupported:
- `SELECT [['duck', 'goose', 'heron'], ['frog', 'toad']]`
- `SELECT {'x': [1, 2, 3]}`
- The DuckDB connector does not support enum, dictionary, or map [field types](https://duckdb.org/docs/sql/data_types/overview). For example:
- Unsupported:
- `SELECT MAP(['key1', 'key2', 'key3'], [10, 20, 30])`
- The DuckDB connector does not support `Decimal256` (76 digits), as it exceeds DuckDB's maximum Decimal width of 38 digits.

:::

0 comments on commit 780a54d

Please sign in to comment.