jorgecarleitao commented on pull request #8018:
URL: https://github.com/apache/arrow/pull/8018#issuecomment-678609613


   Hey both, I think I implemented what we discussed, but the devil is always 
in the details.
   
   The main changes are:
   
   * `ExecutionContextState::datasources` and 
`ExecutionContextState::scalar_functions` are now boxed, not `Arc`. This is so 
that when we lock `ExecutionContextState`, both get locked, which means that we 
only need to lock `ExecutionContextState` (but threads can't change each 
independently).
   * `ExecutionContextState` is no longer clonable.
   * optimizers now expect references, not `Arc<Mutex<_>>`.
   * `SqlToRel` is now lifetimed, as it is now bound to `ExecutionContextState`.
   
   I feel that we should probably have a test to demonstrate the that 
`ExecutionContext` is thread safe (e.g. run two queries from two different 
threads).


----------------------------------------------------------------
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.

For queries about this service, please contact Infrastructure at:
us...@infra.apache.org


Reply via email to