At time of writing (March 2023), duckdb does not support updating list columns. As a workaround, we delete the row and insert it again. This makes it non-atomic, unfortunately, but this is unavoidable until support is added to duckdb itself. See https://github.com/duckdb/duckdb/blob/c5d9afb97bbf0be1
(sc *schema.Table)
| 32 | // but this is unavoidable until support is added to duckdb itself. |
| 33 | // See https://github.com/duckdb/duckdb/blob/c5d9afb97bbf0be12216f3b89ae3131afbbc3156/src/storage/table/list_column_data.cpp#L243-L251 |
| 34 | func containsList(sc *schema.Table) bool { |
| 35 | return slices.ContainsFunc(sc.Columns, func(c schema.Column) bool { |
| 36 | return duckDBListColumn(c) && !keyListColumn(c) |
| 37 | }) |
| 38 | } |
| 39 | |
| 40 | func duckDBListColumn(c schema.Column) bool { |
| 41 | // Maps also implement arrow.ListLikeType but map to DuckDB json, not a LIST. |
no test coverage detected