morpheus
morpheus copied to clipboard
Implement index based list access for complex lists
Index base list access for complex lists (e.g. lists of relationships) needs to work differently than for simple lists.
Essentially this becomes a projection of the list entry column and all it's children
To reproduce bug:
it("foo") {
val g = initGraph("CREATE (:F {val: 1}), (:F {val: 1}), (:F {val: 1})")
g.cypher(
"""
|MATCH (n)
|WITH collect(n) AS list
|RETURN list[2] AS n
""".stripMargin).show
}
This should print
╔═══════════════════╗
║ n ║
╠═══════════════════╣
║ (:`F` {`val`: 1}) ║
╚═══════════════════╝
(1 row)
Currently it prints an empty node, because labels and properties have been lost.