Commit d561f45
committed
Different fixes for issues that came out of a review
1. None==None view corruption — fast-path guard now explicitly checks _tbl.base is None to exclude view-backed columns, preventing the guard from firing when _last_pos and _n_rows are
both None on a view.
2. CTable.__setitem__ missing view guard — added self.base is not None and self._read_only checks, matching the pattern of every other mutating CTable method.
3. Fast path dead for disk-opened tables — replaced the raw _last_pos read with _tbl._resolve_last_pos(), which lazily computes and caches the value on first call. Also replaced
len(self) (O(n) scan) with _tbl._n_rows (cached integer).
4. Validation decompression — added a comment documenting that validate=True (the default) transiently decompresses NDArray inputs during constraint checking; validate=False is needed
for fully bounded peak memory.1 parent 51103bf commit d561f45
2 files changed
Lines changed: 43 additions & 2 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1050 | 1050 | | |
1051 | 1051 | | |
1052 | 1052 | | |
| 1053 | + | |
| 1054 | + | |
| 1055 | + | |
| 1056 | + | |
1053 | 1057 | | |
1054 | 1058 | | |
1055 | 1059 | | |
1056 | 1060 | | |
1057 | 1061 | | |
1058 | | - | |
| 1062 | + | |
| 1063 | + | |
1059 | 1064 | | |
1060 | | - | |
| 1065 | + | |
| 1066 | + | |
1061 | 1067 | | |
1062 | 1068 | | |
1063 | 1069 | | |
| |||
9396 | 9402 | | |
9397 | 9403 | | |
9398 | 9404 | | |
| 9405 | + | |
| 9406 | + | |
| 9407 | + | |
| 9408 | + | |
9399 | 9409 | | |
9400 | 9410 | | |
9401 | 9411 | | |
| |||
10631 | 10641 | | |
10632 | 10642 | | |
10633 | 10643 | | |
| 10644 | + | |
| 10645 | + | |
| 10646 | + | |
10634 | 10647 | | |
10635 | 10648 | | |
10636 | 10649 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
961 | 961 | | |
962 | 962 | | |
963 | 963 | | |
| 964 | + | |
| 965 | + | |
| 966 | + | |
| 967 | + | |
| 968 | + | |
| 969 | + | |
| 970 | + | |
| 971 | + | |
| 972 | + | |
| 973 | + | |
| 974 | + | |
| 975 | + | |
| 976 | + | |
| 977 | + | |
| 978 | + | |
| 979 | + | |
| 980 | + | |
| 981 | + | |
| 982 | + | |
| 983 | + | |
| 984 | + | |
| 985 | + | |
| 986 | + | |
| 987 | + | |
| 988 | + | |
| 989 | + | |
| 990 | + | |
| 991 | + | |
964 | 992 | | |
965 | 993 | | |
966 | 994 | | |
| |||
0 commit comments