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


   > I had another thought on this. We do need the `ExecutionContextState` to 
be mutable, but only up until execution begins. Perhaps we should rename 
`ExecutionContextState` to `MutableExecutionContextState` and create a new 
`ExecutionContextState` that does not have mutexes and just contains a 
read-only copy of state that is needed during execution?
   
   @andygrove  that sounds like a better idea to me. What I don't get is why a 
separate type would be needed to differentiate between mutable and non mutable 
versions of state -- the Rust type system has the notion of mutable/non-mutable 
built in deeply.
   
   So maybe, for example, anything that needs a mutable `ExecutionContextState` 
could be passed a `&mut ExecutionContextState` (the conversion to physical 
plan, for example), and anything during execution that needs a read only 
`ExecutionContextState` could be passed an `Arc<ExecutionContextState`.
   
   I am probably missing something obvious


----------------------------------------------------------------
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:
[email protected]


Reply via email to