morpheus icon indicating copy to clipboard operation
morpheus copied to clipboard

Implement index based list access for complex lists

Open DarthMax opened this issue 5 years ago • 1 comments

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

DarthMax avatar Jul 26 '18 13:07 DarthMax

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.

Mats-SX avatar Oct 15 '18 14:10 Mats-SX