Commit 0472b3f
committed
CTable: full feature build-out (persistency, aggregates, mutations, QoL)
Persistency:
- FileTableStorage backend: disk layout _meta.b2frame / _valid_rows.b2nd / _cols/<name>.b2nd
- CTable(Row, urlpath=..., mode="w"/"a"/"r"), CTable.open(), CTable.save(), CTable.load()
- Read-only mode blocks all writes; save() always writes compacted rows
Column aggregates: sum, min, max, mean, std, any, all (chunk-aware via iter_chunks)
Column utilities: unique(), value_counts(), assign(), boolean mask __getitem__/__setitem__
Schema mutations: add_column (fills default for existing rows), drop_column, rename_column
- All three update schema, handle disk files, and block on views
View mutability model fix:
- Views allow value writes (assign, __setitem__) — only structural mutations are blocked
- _read_only=True reserved for mode="r" disk tables; base is not None guards structural ops
QoL: __str__ pandas-style, __repr__, cbytes/nbytes, sample(n), Column.iter_chunks(size)
Tests: 258 tests, ~5s — new test_persistency.py (33), test_schema_mutations.py (41),
expanded test_column.py; optimized helpers to use to_numpy() instead of row[i]1 parent a422d72 commit 0472b3f
1 file changed
Lines changed: 3 additions & 3 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
20 | 20 | | |
21 | 21 | | |
22 | 22 | | |
23 | | - | |
| 23 | + | |
24 | 24 | | |
25 | 25 | | |
26 | 26 | | |
| |||
113 | 113 | | |
114 | 114 | | |
115 | 115 | | |
116 | | - | |
117 | | - | |
| 116 | + | |
| 117 | + | |
0 commit comments