diff --git a/tests/unit/query_plan.cpp b/tests/unit/query_plan.cpp index 5b574c1ff..a059bc18b 100644 --- a/tests/unit/query_plan.cpp +++ b/tests/unit/query_plan.cpp @@ -1704,6 +1704,13 @@ TYPED_TEST(TestPlanner, ScanAllById) { CheckPlan(query, this->storage, ExpectScanAllById(), ExpectProduce()); } +TYPED_TEST(TestPlanner, ScanAllByEdgeId) { + // Test MATCH ()-[r]->() WHERE id(r) = 42 RETURN r + auto *query = QUERY(SINGLE_QUERY(MATCH(PATTERN(NODE("anon1"), EDGE("r"), NODE("anon2"))), + WHERE(EQ(FN("id", IDENT("r")), LITERAL(42))), RETURN("r"))); + CheckPlan(query, this->storage, ExpectScanAllByEdgeId(), ExpectProduce()); +} + TYPED_TEST(TestPlanner, BfsToExisting) { // Test MATCH (n)-[r *bfs]-(m) WHERE id(m) = 42 RETURN r auto *bfs = this->storage.template Create(