Is your feature request related to a problem or challenge? Please describe what you are trying to do.
Currently a Tokio runtime is created outside of the control of DataFusion, and requires another user to specify a #[tokio::main] or a custom runtime.
The downside of this is that the config is outside of the control of DataFusion and depends on it being configured externally.
Describe the solution you'd like
Create a custom Runtime when creating the execution context.
Here we can also configure the worker thread count and max threads for the blocking thread pool based on a config or on number of CPU cores.
Possibly, for some usecases it would be nice to allow plugging in a runtime (e.g. when you want to share the runtime).
Describe alternatives you've considered
Additional context
Related to #924
Is your feature request related to a problem or challenge? Please describe what you are trying to do.
Currently a Tokio runtime is created outside of the control of DataFusion, and requires another user to specify a
#[tokio::main]or a custom runtime.The downside of this is that the config is outside of the control of DataFusion and depends on it being configured externally.
Describe the solution you'd like
Create a custom
Runtimewhen creating the execution context.Here we can also configure the worker thread count and max threads for the blocking thread pool based on a config or on number of CPU cores.
Possibly, for some usecases it would be nice to allow plugging in a runtime (e.g. when you want to share the runtime).
Describe alternatives you've considered
Additional context
Related to #924