Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Implement index based list access for complex lists #569

Open
DarthMax opened this issue Jul 26, 2018 · 1 comment
Open

Implement index based list access for complex lists #569

DarthMax opened this issue Jul 26, 2018 · 1 comment

Comments

@DarthMax
Copy link
Contributor

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

@Mats-SX
Copy link
Member

Mats-SX commented Oct 15, 2018

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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants