[BUG] Unexpected results of query `Apply` with `Iterate` in subtask in Pegasus
- Dominant language
- C++
- Stars
- 3.6k
- Forks
- 468
- Avg merge
- 29m
- Merged PRs (30d)
- 1
Description
**Describe the bug**
A clear and concise description of what the bug is.
The following query (on LDBC dataset) output errors:
```
g.V().hasLabel('forum').as('forum')
.select('forum').by(out('containerOf').in('1..3', 'replyOf').endV().has('id', 6047318147162))
```
The error info client gets is:
```
GremlinServerError: 500: Status{code=UNKNOWN, description=execution_error: system error: kind(IOError), caused
by:IOError(kind=System(NotConnected)), occurred at:
/work/interactive_engine/executor/engine/pegasus/pegasus/src/data_plane/intra_process.rs:43, ;, cause=null}
```
and internal error info (in pegasus) is:
```
thread 'reactor 2' panicked at 'iteration of [13] not found;', /root/moran/new/GraphScope/interactive_engine/executor/engine/pegasus/pegasus/src/operator/iteration/switch.rs:271:21
```
**Additional context**
As an optional solution, we can modify the query as following, and it runs well.
```
g.V().hasLabel('forum').as('forum').select('forum').
by(out('containerOf').union(__.in('replyOf'), __.in('replyOf').in('replyOf')).has('id', 6047318147162).as('message'))
```
Contributor guide
Assessment
This issue has not been assessed yet.