Commit 95eee71
feat: type SessionContext codec setters with exportable Protocols
PR #1541 introduced `with_logical_extension_codec` /
`with_physical_extension_codec` setters typed as `codec: Any`. The Rust
extractors accept either a raw `PyCapsule` or any object exposing
`__datafusion_logical_extension_codec__` /
`__datafusion_physical_extension_codec__`.
Add `LogicalExtensionCodecExportable` / `PhysicalExtensionCodecExportable`
Protocols in `python/datafusion/user_defined.py` (matching the existing
`ScalarUDFExportable` pattern) and tighten both setter signatures to
`Protocol | _PyCapsule`. Pure typing change; no runtime behavior diff.
Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>1 parent a2e086d commit 95eee71
2 files changed
Lines changed: 27 additions & 4 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
86 | 86 | | |
87 | 87 | | |
88 | 88 | | |
| 89 | + | |
89 | 90 | | |
90 | 91 | | |
91 | 92 | | |
92 | 93 | | |
93 | 94 | | |
94 | 95 | | |
95 | 96 | | |
| 97 | + | |
| 98 | + | |
96 | 99 | | |
97 | 100 | | |
98 | 101 | | |
| |||
1744 | 1747 | | |
1745 | 1748 | | |
1746 | 1749 | | |
1747 | | - | |
| 1750 | + | |
| 1751 | + | |
| 1752 | + | |
1748 | 1753 | | |
1749 | 1754 | | |
1750 | 1755 | | |
1751 | | - | |
| 1756 | + | |
| 1757 | + | |
| 1758 | + | |
1752 | 1759 | | |
1753 | 1760 | | |
1754 | 1761 | | |
| |||
1759 | 1766 | | |
1760 | 1767 | | |
1761 | 1768 | | |
1762 | | - | |
| 1769 | + | |
| 1770 | + | |
| 1771 | + | |
1763 | 1772 | | |
1764 | 1773 | | |
1765 | 1774 | | |
1766 | | - | |
| 1775 | + | |
| 1776 | + | |
| 1777 | + | |
1767 | 1778 | | |
1768 | 1779 | | |
1769 | 1780 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
113 | 113 | | |
114 | 114 | | |
115 | 115 | | |
| 116 | + | |
| 117 | + | |
| 118 | + | |
| 119 | + | |
| 120 | + | |
| 121 | + | |
| 122 | + | |
| 123 | + | |
| 124 | + | |
| 125 | + | |
| 126 | + | |
| 127 | + | |
116 | 128 | | |
117 | 129 | | |
118 | 130 | | |
| |||
0 commit comments