Commit 39a1f75
authored
Implement FFI_Session (#19223)
## Which issue does this PR close?
Addresses part of #18671 but
does not close it.
## Rationale for this change
One of the reasons we are unable to remove `SessionContext` from the FFI
crate is that we rely on building a session in the `TableProvider::scan`
function. This is because our current implementation uses
`FFI_SessionConfig` and passes around a hashmap of String->String values
of config options. Then in the other side of the FFI boundary we build a
temporary session. This is not ideal because those table provider cannot
utilize the actual current session.
By implementing a FFI safe version of the `Session` trait we can
overcome this limitation.
## What changes are included in this PR?
- Implement `FFI_Session`
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="531" height="185" alt="Screenshot 2025-12-09 at 8 35 56 AM"
src="https://github.com/user-attachments/assets/1b6de980-e048-49cf-a8fe-961d5e902e06"
/>
## Are there any user-facing changes?
No.1 parent c1aa1b5 commit 39a1f75
File tree
7 files changed
+612
-3
lines changed- datafusion/ffi
- src
- execution
- session
7 files changed
+612
-3
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 | |
|---|---|---|---|
| |||
58 | 58 | | |
59 | 59 | | |
60 | 60 | | |
| 61 | + | |
61 | 62 | | |
62 | 63 | | |
63 | 64 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
28 | 28 | | |
29 | 29 | | |
30 | 30 | | |
31 | | - | |
| 31 | + | |
32 | 32 | | |
33 | 33 | | |
34 | 34 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
37 | 37 | | |
38 | 38 | | |
39 | 39 | | |
40 | | - | |
| 40 | + | |
41 | 41 | | |
42 | 42 | | |
43 | 43 | | |
| |||
File renamed without changes.
0 commit comments