Commit b482f67
authored
### Related
* part of RR-2901
* fixes RR-2938
### What
This PR introduces Python wrapper for `Entry`, `DatasetEntry`, and
`TableEntry`.
In more details:
- No user-facing API changes except:
- RR-2938 is fixed
- `CatalogClient.all_entries()` is now implemented in python, and is
basically just `datasets()` + `tables()`. That means it doesn't return
blueprint dataset (if it at all did before). This aligns with the
intention to hide as much as possible the internal blueprint dataset
machinery.
- The `__repr__` of `Entry` is now more explicit with the `EntryKind`
(see snapshot diff). This comes from it now being implemented in python.
I think it's more in line with staying close too "runnable code" for
repr.
- The `DatasetEntry` <- `Entry` -> `TableEntry` hierarchy is now in pure
python.
- The previous Rust-based hierarchy is now flattened: `PyEntry` is
removed and it's functionality is integrated to now-named
`PyDatasetEntryInternal` and `PyTableEntryInternal`.
- Not having a python hierarchy on rust side simplifies/removes a whole
lot of boilerplate.
- Because it's not possible to expose a trait (e.g. `trait PyEntry`)
across the FFI using pyo3, the following is done to mitigate code
duplication:
- A new `PyEntryDetailsInternal` object is introduced, which is used to
expose the basic entry properties in `Entry`
- An helper function for updating entries.
- At the end of the day, there remain a rust-side `Entry` informal
protocol implementation that is duplicated, but imo worth the overall
simplifications
1 parent 0be1ced commit b482f67
File tree
15 files changed
+902
-658
lines changed- rerun_py
- rerun_bindings
- rerun_sdk/rerun
- catalog
- utilities/datafusion/functions
- src/catalog
- tests
- api_sandbox
- rerun_draft
- test_draft
- e2e_redap_tests
15 files changed
+902
-658
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
170 | 170 | | |
171 | 171 | | |
172 | 172 | | |
| 173 | + | |
| 174 | + | |
| 175 | + | |
| 176 | + | |
| 177 | + | |
| 178 | + | |
| 179 | + | |
| 180 | + | |
| 181 | + | |
| 182 | + | |
| 183 | + | |
| 184 | + | |
| 185 | + | |
| 186 | + | |
| 187 | + | |
0 commit comments