timsaucer opened a new pull request, #18918:
URL: https://github.com/apache/datafusion/pull/18918

   ## Which issue does this PR close?
   
   Addresses part of https://github.com/apache/datafusion/issues/18671 but does 
not close it.
   
   ## Rationale for this change
   
   We have an issue in the current FFI code in that we will need access to the 
`TaskContext` to do function encoding and decoding to pass logical expressions 
across the boundary. We use the proto crate for this operations.
   
   We cannot encode and decode functions that have been registered since our 
current code creates a default session context. This causes problems in crates 
where we are using UDFs as inputs to either aggregations, window functions, or 
table filters.
   
   With this change we keep a _weak_ reference to a new trait, a 
`TaskContextProvider`. By keeping a weak trait we make sure we do not create a 
circular dependency between function that is internally holding on to the 
provider, which holds the task context, which holds the function.
   
   ## What changes are included in this PR?
   
   - Introduce the `TaskContextProvider` trait
   - Implement FFI versions of `TaskContext` and `TaskContextProvider`.
   
   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?
   
   - [ ] TODO add unit tests
   
   ## Are there any user-facing changes?
   
   No.


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]


---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to