morpheus icon indicating copy to clipboard operation
morpheus copied to clipboard

Compute detailed relationship type from WHERE clause

Open pstutz opened this issue 6 years ago • 2 comments

https://github.com/opencypher/cypher-for-apache-spark/blob/3afbaabb55d6ec808e7b181f80911e332fef8aa1/src/test/scala/org/opencypher/caps/ir/impl/block/TypedMatchBlockTest.scala#L47

pstutz avatar Oct 31 '17 13:10 pstutz

Move to trello

boggle avatar Nov 01 '17 09:11 boggle

These should be able to have the same plan:

it("should plan efficiently") {
  val given = initGraph("CREATE ()-[:FOO]->()-[:BAR]->()")

  PrintRelationalPlan.set()

  given.cypher(
    """
      |MATCH ()-[r]->()
      |WHERE type(r) = 'FOO'
      |RETURN r
    """.stripMargin).show
  
  given.cypher(
    """
      |MATCH ()-[r:FOO]->()
      |RETURN r
    """.stripMargin).show
}

Mats-SX avatar Oct 18 '18 12:10 Mats-SX