mingmwang commented on pull request #1924:
URL: 
https://github.com/apache/arrow-datafusion/pull/1924#issuecomment-1061291910


   > I think another consideration is
   > 
   > I agree with @yjshen (and I think @thinkharderdev ) that for the 
datafusion (use as a library) feature, a single static `RuntimeEnv` is a 
challenge because of how many different ways it may be deployed / embedded. I 
can imagine people using DataFusion to build systems that attempt to build in 
isolation (by using separate `RuntimeEnv` for different subsets of users / 
queries) as well as systems that use other technologies (e.g. kubernetes) to 
implement isolation
   > 
   > I think passing around the `RuntimeEnv` is the most flexible, if annoying, 
approach.
   > 
   > I also wanted to reiterate that I liked pretty much all of the rest of 
this PR (like adding TaskContext, SessionContext, cleanups, etc) so perhaps we 
can proceed with adding in those pieces incremental while we work out the 
"global" vs "non global" context thing
   
   Ok, I will remove the the static singleton RuntimeEnv in DataFusion, and go 
with the approach to pass through the required structure in the ExecutionPlan 
execute() method.  It can still achieve the current goal and make the plan's 
major execution path configuration aware. But in the same time it will lose 
some capabilities for example in other methods like display() or stats(), if we 
want to add some session configuration to control the plan display(short 
plan/long plan displaying etc) or stats collection(columnar stats, support 
histogram etc).


-- 
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: github-unsubscr...@arrow.apache.org

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


Reply via email to