Weston Pace created ARROW-13741:
-----------------------------------
Summary: [C++] An ExecContext with no executor should not be valid
Key: ARROW-13741
URL: https://issues.apache.org/jira/browse/ARROW-13741
Project: Apache Arrow
Issue Type: Improvement
Components: C++
Reporter: Weston Pace
I believe the current interpretation of `ExecContext::executor == null` is that
the exec plan should run serially. However, I do not believe this will hold up
once any form of scheduling begins.
For a simple example, consider back pressure. What should an exec plan do if
it is not ready to consume data. My assumption is that somehow a future task
will be created to resume once the back pressure has been relieved. If there
is no executor to receive a future task then I don't see how this happens.
Or, to look at it another way, if an exec plan is going to start using a
scheduler of some kind, then it makes sense for that scheduler to always be
there.
This does not mean that you must run in parallel. We have an executor which
handles serial execution ("SerialExecutor" obtained by "RunInSerialExecutor").
This essentially converts the calling thread into an event-loop style thread
pool of size one and then uses that as the executor.
--
This message was sent by Atlassian Jira
(v8.3.4#803005)