alamb commented on issue #1862: URL: https://github.com/apache/arrow-datafusion/issues/1862#issuecomment-1055666673
I am sorry for the late review. So we have something like this in IOx where we have context we want to use and pass down when we run plans using DataFusion and it supports multi-tenancy quite well. The approach we went with is to create a `Executor` struct [code](https://github.com/influxdata/influxdb_iox/blob/main/query/src/exec.rs) that contains the `DiskManager` and `MemoryManager` which creates `IOxExecutionContext`s which wrap the DataFusion `ExecutionContext` (as well as registering UDFs, etc) I am a little worried about introducing a "global singleton" into DataFusion -- it may save plumbing work in the short term but I think it makes it hard to write tests and cause other hard to diagnose problems. I think it is more maintainable longer term to explicitly provide all contexts required If you are describing a change to Ballista (to add a global singleton into Ballista) I think that makes much more sense. -- 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]
