Commit c3dd12b
committed
fix: support JSON serialization of FragmentMetadata with stable row IDs
`FragmentMetadata.to_json()` raised `NotImplementedError` when
`row_id_meta` was present (i.e. `enable_stable_row_ids=True`), because
`PyRowIdMeta.asdict()` was not implemented.
Implement `asdict()` using `pythonize` to convert the Rust enum directly
to a Python dict. Also fix `from_json()` to deserialize `row_id_meta`
via `RowIdMeta.from_json()` instead of attempting `RowIdMeta(**dict)`.1 parent 2c20d75 commit c3dd12b
File tree
3 files changed
+14
-7
lines changed- python
- python
- lance
- tests
- src
3 files changed
+14
-7
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
143 | 143 | | |
144 | 144 | | |
145 | 145 | | |
146 | | - | |
| 146 | + | |
147 | 147 | | |
148 | 148 | | |
149 | 149 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
470 | 470 | | |
471 | 471 | | |
472 | 472 | | |
473 | | - | |
| 473 | + | |
474 | 474 | | |
475 | | - | |
476 | 475 | | |
477 | 476 | | |
| 477 | + | |
| 478 | + | |
| 479 | + | |
| 480 | + | |
| 481 | + | |
| 482 | + | |
| 483 | + | |
| 484 | + | |
478 | 485 | | |
479 | 486 | | |
480 | 487 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
627 | 627 | | |
628 | 628 | | |
629 | 629 | | |
630 | | - | |
631 | | - | |
632 | | - | |
633 | | - | |
| 630 | + | |
| 631 | + | |
| 632 | + | |
| 633 | + | |
634 | 634 | | |
635 | 635 | | |
636 | 636 | | |
| |||
0 commit comments