This issue is related to #380, but it goes beyond its scope. Consider the query: ``` UNWIND [1, 2] AS tagId MATCH (tag:Tag {tagId: tagId}) RETURN tag ``` This is currently compiled to a join with two legs: * `Dual` -> `Unwind` -> `Join` * `GetVertices` -> `Selection` -> `Join` For correlated queries, it would make sense to use a 'unary GetVertices' operator, which can take the output of an `Unwind` operator. For reference, Neo4j also uses a sort of lazy join operator, `Apply`, which is an efficient approach.  cc @jmarton
This issue is related to #380, but it goes beyond its scope.
Consider the query:
This is currently compiled to a join with two legs:
Dual->Unwind->JoinGetVertices->Selection->JoinFor correlated queries, it would make sense to use a 'unary GetVertices' operator, which can take the output of an
Unwindoperator.For reference, Neo4j also uses a sort of lazy join operator,
Apply, which is an efficient approach.cc @jmarton