这个 Gremlin 查询是如何执行的?

How does this Gremlin query be executed?

我想了解以下 Gremlin 查询将如何执行?

g.V('california').repeat(out('interstate')).emit().repeat(out('highway')).emit().tree()

我假设遍历从 californiainterstate edge 找到所有 nodes/vertices对于每个 interstate vertex,它会找到所有 highways。然后它用 interstate 创建一个树结构,它是 highways。这是正确的吗?

california 开始,遍历器遵循所有向外的 interstate 边,直到没有更多的 interstate 边为止。从沿路径找到的所有顶点开始,遍历器将遵循所有向外的 highway 边,再次直到没有 highway 边。

两次重复都可以很好的运行进入循环路径(也就是说,遍历永远不会结束)。但是,如果找到终点,所有路径将合并为树结构。