alamb opened a new pull request #8031:
URL: https://github.com/apache/arrow/pull/8031


   Inspired by the conversation on 
https://github.com/apache/arrow/pull/8018/files, I have been bothered by the 
use of Arc/Mutex and the resulting code complication in ExecutionContext and 
LogicalPlanning.
   
   The more I read the code, the more I am convinced that 
`ExecutionContextState` needs to be mutable *before* planning, but once 
planning has started the state is all read only (and any relevant state is 
copied / cloned into the `ExecutionPlan`) so the only thing Mutex/Arc are doing 
is making lurking bugs like ARROW-9815 more likely and requiring copies. 
   
   This PR proposes a modest change to add a trait for looking up scalar 
functions by name, and thus removes the direct use of Box / HashMaps / etc in 
the TypeCoercion optimizer pass.
   
   I have several other changes in mind to avoid the need for Box / Mutex 
entirely in ExecutionContext but I want to keep the individual PRs small.
   


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