Details
-
Type:
Story
-
Status: Done
-
Resolution: Done
-
Fix Version/s: None
-
Component/s: None
-
Labels:None
-
Story Points:2
-
Epic Link:
-
Sprint:DRP S17-4
-
Team:Data Release Production
Description
pybind11 usually casts base-class references or pointers to the most-derived wrapped type, using RTTI and dynamic casts. This does not seem to work for Table and Record objects, where we instead have to wrap derived-class accessors that return the appropriate type.
I suspect this is because the true types are defined in anonymous namespaces in C++ files, so the most-derived types are not actually accessible to pybind11, and it's doing some sort of dict lookup on std::type_info rather than a tree of dynamic_casts (what Boost.Python did). If that's the case, a invisible change to how these classes are implemented could clean up our pybind11 wrappers. I imagine we wouldn't want to try to fix this upstream, as pybind11's approach is almost certainly faster than Boost.Python's and works as well in the vast majority of cases.
Attachments
Issue Links
- relates to
-
DM-8716 Use visitor pattern to clean up afw::table pybind11 wrappers
- Done
Can we move this to cleanup epic?