The following sequence can lead to a crash:
- Client sets result cache size to N
- Client issues query with #results < N
- Client fetches all results, triggering eos and tearing down Coordinator::root_sink_.
- Client restarts query with FETCH_FIRST.
- Client reads all results again. After cache is exhausted, Coordinator::GetNext() is called to detect eos condition again.
- GetNext() hits DCHECK(root_sink_ != nullptr).
Either the QES or the coordinator need to remember that eos was once true, and turn GetNext() into a no-op if so.