Commit ad9b779
authored
Implement physical and logical codecs in FFI (#19079)
## Which issue does this PR close?
Addresses part of #18671 but
does not close it.
## Rationale for this change
We have a major restriction in our current FFI crates. They use protobuf
encoding and decoding to pass around logical expressions. This encoding
and decoding will fail when we encounter a user defined function because
we only currently use the default extension codecs. This PR introduces
the FFI variants for both logical and physical extension codecs. A
follow on PR will enable these in our code base, on order to keep these
PRs to a reasonable length for review.
In addition to the benefit to the FFI crate for passing expressions,
this will also enable sending plans across FFI boundaries, which may be
useful for `datafusion-distributed`.
## What changes are included in this PR?
- Implement `FFI_LogicalExtensionCodec`
- Implement `FFI_PhysicalExtensionCodec`
This PR does _not_ use these structures in the current code. That is
coming as part of a later PR in an effort to keep the size of the PRs
small for effective code review.
## Are these changes tested?
Unit tests are added. Coverage report:
<img width="523" height="222" alt="Screenshot 2025-12-03 at 4 37 23 PM"
src="https://github.com/user-attachments/assets/4e139052-c74c-4e32-a057-66bd4bd68e21"
/>
## Are there any user-facing changes?
No.1 parent 83736ef commit ad9b779
File tree
8 files changed
+1444
-7
lines changed- datafusion/ffi
- src
- proto
8 files changed
+1444
-7
lines changedSome generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
47 | 47 | | |
48 | 48 | | |
49 | 49 | | |
| 50 | + | |
50 | 51 | | |
| 52 | + | |
51 | 53 | | |
52 | 54 | | |
53 | 55 | | |
54 | 56 | | |
55 | 57 | | |
| 58 | + | |
56 | 59 | | |
57 | 60 | | |
58 | 61 | | |
| |||
63 | 66 | | |
64 | 67 | | |
65 | 68 | | |
| 69 | + | |
| 70 | + | |
| 71 | + | |
| 72 | + | |
66 | 73 | | |
67 | 74 | | |
68 | 75 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
301 | 301 | | |
302 | 302 | | |
303 | 303 | | |
304 | | - | |
| 304 | + | |
305 | 305 | | |
306 | 306 | | |
307 | 307 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
34 | 34 | | |
35 | 35 | | |
36 | 36 | | |
| 37 | + | |
37 | 38 | | |
38 | 39 | | |
39 | 40 | | |
| |||
0 commit comments