From be4e4536a72543a875c1acf1e27fefc188eefb3b Mon Sep 17 00:00:00 2001 From: yixinglu <2520865+yixinglu@users.noreply.github.com> Date: Tue, 16 May 2023 16:25:04 +0800 Subject: [PATCH] Update tck tests --- .../executor/query/IndexScanExecutor.cpp | 11 +- .../features/match/MatchByVariable.feature | 551 ++++++++++++++++-- 2 files changed, 518 insertions(+), 44 deletions(-) diff --git a/src/graph/executor/query/IndexScanExecutor.cpp b/src/graph/executor/query/IndexScanExecutor.cpp index 68c7b47a04e..9164c79cab7 100644 --- a/src/graph/executor/query/IndexScanExecutor.cpp +++ b/src/graph/executor/query/IndexScanExecutor.cpp @@ -30,13 +30,16 @@ folly::Future IndexScanExecutor::indexScan() { auto filterStr = lookup->queryContext().front().get_filter(); Expression *filter = Expression::decode(qctx()->objPool(), filterStr); if (filter->kind() != Expression::Kind::kRelEQ && filter->kind() != Expression::Kind::kRelIn) { - return Status::Error("The kind of filter expression is invalid."); + return Status::Error("The kind of filter expression is invalid: %s", + filter->toString().c_str()); } auto relFilter = static_cast(filter); - if (relFilter->right()->kind() != Expression::Kind::kLabel) { - return Status::Error("The kind of expression is not label expression."); + auto right = DCHECK_NOTNULL(relFilter->right()); + if (right->kind() != Expression::Kind::kLabel) { + return Status::Error("The kind of expression is not label expression: %s", + right->toString().c_str()); } - const auto &colName = static_cast(relFilter->right())->name(); + const auto &colName = static_cast(right)->name(); const auto &result = ectx_->getResult(lookup->inputVar()); std::vector ops; std::unordered_set unique; diff --git a/tests/tck/features/match/MatchByVariable.feature b/tests/tck/features/match/MatchByVariable.feature index 40ea41ce0f1..baaf5082fd1 100644 --- a/tests/tck/features/match/MatchByVariable.feature +++ b/tests/tck/features/match/MatchByVariable.feature @@ -813,7 +813,20 @@ Feature: Match By Variable return count(*) as n """ Then the result should be, in any order, with relax comparison: - | n | + | n | + | 20 | + And the execution plan should be: + | id | name | dependencies | profiling data | operator info | + | 10 | Aggregate | 9 | | | + | 9 | Filter | 8 | | | + | 8 | CrossJoin | 1,7 | | | + | 1 | Project | 2 | | | + | 2 | Start | | | | + | 7 | Project | 12 | | | + | 12 | AppendVertices | 11 | | | + | 11 | Traverse | 4 | | | + | 4 | IndexScan | 3 | | | + | 3 | Argument | | | | When profiling query: """ with ['Tim Duncan', 'Yao Ming'] as names @@ -822,7 +835,21 @@ Feature: Match By Variable return count(*) as n """ Then the result should be, in any order, with relax comparison: - | n | + | n | + | 0 | + And the execution plan should be: + | id | name | dependencies | profiling data | operator info | + | 10 | Aggregate | 14 | | | + | 14 | Filter | 13 | | | + | 13 | CrossJoin | 1,16 | | | + | 1 | Project | 2 | | | + | 2 | Start | | | | + | 16 | Project | 15 | | | + | 15 | Filter | 18 | | | + | 18 | AppendVertices | 17 | | | + | 17 | Traverse | 4 | | | + | 4 | IndexScan | 3 | | | + | 3 | Argument | | | | When profiling query: """ with ['Tim Duncan', 'Yao Ming'] as names @@ -831,7 +858,20 @@ Feature: Match By Variable return count(*) as n """ Then the result should be, in any order, with relax comparison: - | n | + | n | + | 0 | + And the execution plan should be: + | id | name | dependencies | profiling data | operator info | + | 10 | Aggregate | 9 | | | + | 9 | Filter | 8 | | | + | 8 | CrossJoin | 1,7 | | | + | 1 | Project | 2 | | | + | 2 | Start | | | | + | 7 | Project | 12 | | | + | 12 | AppendVertices | 11 | | | + | 11 | Traverse | 4 | | | + | 4 | IndexScan | 3 | | | + | 3 | Argument | | | | When profiling query: """ with ['Tim Duncan', 'Yao Ming'] as names @@ -840,7 +880,22 @@ Feature: Match By Variable return count(*) as n """ Then the result should be, in any order, with relax comparison: - | n | + | n | + | 20 | + And the execution plan should be: + | id | name | dependencies | profiling data | operator info | + | 11 | Aggregate | 15 | | | + | 15 | Filter | 14 | | | + | 14 | CrossJoin | 1,17 | | | + | 1 | Project | 2 | | | + | 2 | Start | | | | + | 17 | Project | 21 | | | + | 21 | AppendVertices | 20 | | | + | 20 | Filter | 18 | | | + | 18 | Traverse | 4 | | | + | 4 | Dedup | 3 | | | + | 3 | PassThrough | 5 | | | + | 5 | Start | | | | When profiling query: """ with ['Tim Duncan', 'Yao Ming'] as names @@ -849,7 +904,22 @@ Feature: Match By Variable return count(*) as n """ Then the result should be, in any order, with relax comparison: - | n | + | n | + | 0 | + And the execution plan should be: + | id | name | dependencies | profiling data | operator info | + | 11 | Aggregate | 15 | | | + | 15 | Filter | 14 | | | + | 14 | CrossJoin | 1,17 | | | + | 1 | Project | 2 | | | + | 2 | Start | | | | + | 17 | Project | 21 | | | + | 21 | AppendVertices | 20 | | | + | 20 | Filter | 18 | | | + | 18 | Traverse | 4 | | | + | 4 | Dedup | 3 | | | + | 3 | PassThrough | 5 | | | + | 5 | Start | | | | Scenario: [2] match by prop index from with When profiling query: @@ -861,8 +931,21 @@ Feature: Match By Variable where v1.player.name in names return count(*) as n """ - Then the result should be, in any order, with relax comparison: - | n | + Then a ExecutionError should be raised at runtime: Failed to evaluate condition: (v1.player.name IN $names). For boolean conditions, please write in their full forms like == or IS [NOT] NULL. + | id | name | dependencies | profiling data | operator info | + | 14 | Aggregate | 13 | | | + | 13 | Filter | 12 | | | + | 12 | CrossJoin | 6,11 | | | + | 6 | Project | 16 | | | + | 16 | AppendVertices | 2 | | | + | 2 | Dedup | 1 | | | + | 1 | PassThrough | 3 | | | + | 3 | Start | | | | + | 11 | Project | 18 | | | + | 18 | AppendVertices | 17 | | | + | 17 | Traverse | 8 | | | + | 8 | IndexScan | 7 | | | + | 7 | Argument | | | | When profiling query: """ match (v:player) @@ -873,7 +956,24 @@ Feature: Match By Variable return count(*) as n """ Then the result should be, in any order, with relax comparison: - | n | + | n | + | 0 | + And the execution plan should be: + | id | name | dependencies | profiling data | operator info | + | 14 | Aggregate | 18 | | | + | 18 | Filter | 17 | | | + | 17 | CrossJoin | 6,21 | | | + | 6 | Project | 22 | | | + | 22 | AppendVertices | 2 | | | + | 2 | Dedup | 1 | | | + | 1 | PassThrough | 3 | | | + | 3 | Start | | | | + | 21 | Project | 20 | | | + | 20 | Filter | 24 | | | + | 24 | AppendVertices | 23 | | | + | 23 | Traverse | 8 | | | + | 8 | IndexScan | 7 | | | + | 7 | Argument | | | | When profiling query: """ match (v:player) @@ -883,8 +983,22 @@ Feature: Match By Variable where v1.player.name in names and v2.player.name in names return count(*) as n """ - Then the result should be, in any order, with relax comparison: - | n | + Then a ExecutionError should be raised at runtime: Failed to evaluate condition: ((v1.player.name IN $names) AND (v2.player.name IN $names)). For boolean conditions, please write in their full forms like == or IS [NOT] NULL. + And the execution plan should be: + | id | name | dependencies | profiling data | operator info | + | 14 | Aggregate | 13 | | | + | 13 | Filter | 12 | | | + | 12 | CrossJoin | 6,11 | | | + | 6 | Project | 16 | | | + | 16 | AppendVertices | 2 | | | + | 2 | Dedup | 1 | | | + | 1 | PassThrough | 3 | | | + | 3 | Start | | | | + | 11 | Project | 18 | | | + | 18 | AppendVertices | 17 | | | + | 17 | Traverse | 8 | | | + | 8 | IndexScan | 7 | | | + | 7 | Argument | | | | When profiling query: """ match (v:player) @@ -894,8 +1008,24 @@ Feature: Match By Variable where v1.player.name in names and id(v1) in ['Tim Duncan', 'Yao Ming'] return count(*) as n """ - Then the result should be, in any order, with relax comparison: - | n | + Then a ExecutionError should be raised at runtime: Failed to evaluate condition: (v1.player.name IN $names). For boolean conditions, please write in their full forms like == or IS [NOT] NULL. + And the execution plan should be: + | id | name | dependencies | profiling data | operator info | + | 15 | Aggregate | 19 | | | + | 19 | Filter | 18 | | | + | 18 | CrossJoin | 6,22 | | | + | 6 | Project | 23 | | | + | 23 | AppendVertices | 2 | | | + | 2 | Dedup | 1 | | | + | 1 | PassThrough | 3 | | | + | 3 | Start | | | | + | 22 | Project | 27 | | | + | 27 | AppendVertices | 26 | | | + | 26 | Filter | 24 | | | + | 24 | Traverse | 8 | | | + | 8 | Dedup | 7 | | | + | 7 | PassThrough | 9 | | | + | 9 | Start | | | | When profiling query: """ match (v:player) @@ -905,8 +1035,24 @@ Feature: Match By Variable where v1.player.name in names and id(v2) in ['Tim Duncan', 'Yao Ming'] return count(*) as n """ - Then the result should be, in any order, with relax comparison: - | n | + Then a ExecutionError should be raised at runtime: Failed to evaluate condition: (v1.player.name IN $names). For boolean conditions, please write in their full forms like == or IS [NOT] NULL. + And the execution plan should be: + | id | name | dependencies | profiling data | operator info | + | 15 | Aggregate | 19 | | | + | 19 | Filter | 18 | | | + | 18 | CrossJoin | 6,22 | | | + | 6 | Project | 23 | | | + | 23 | AppendVertices | 2 | | | + | 2 | Dedup | 1 | | | + | 1 | PassThrough | 3 | | | + | 3 | Start | | | | + | 22 | Project | 27 | | | + | 27 | AppendVertices | 26 | | | + | 26 | Filter | 24 | | | + | 24 | Traverse | 8 | | | + | 8 | Dedup | 7 | | | + | 7 | PassThrough | 9 | | | + | 9 | Start | | | | Scenario: [3] match by prop index from with When profiling query: @@ -918,8 +1064,22 @@ Feature: Match By Variable where v1.player.name in names return count(*) as n """ - Then the result should be, in any order, with relax comparison: - | n | + Then a ExecutionError should be raised at runtime: Failed to evaluate condition: (v1.player.name IN $names). For boolean conditions, please write in their full forms like == or IS [NOT] NULL. + And the execution plan should be: + | id | name | dependencies | profiling data | operator info | + | 14 | Aggregate | 13 | | | + | 13 | Filter | 12 | | | + | 12 | CrossJoin | 6,11 | | | + | 6 | Project | 5 | | | + | 5 | Filter | 16 | | | + | 16 | AppendVertices | 1 | | | + | 1 | IndexScan | 2 | | | + | 2 | Start | | | | + | 11 | Project | 18 | | | + | 18 | AppendVertices | 17 | | | + | 17 | Traverse | 8 | | | + | 8 | IndexScan | 7 | | | + | 7 | Argument | | | | When profiling query: """ match (v:player) @@ -929,8 +1089,23 @@ Feature: Match By Variable where v1.player.name in names and v2.player.name in ['Tim Duncan', 'Yao Ming'] return count(*) as n """ - Then the result should be, in any order, with relax comparison: - | n | + Then a ExecutionError should be raised at runtime: Failed to evaluate condition: (v1.player.name IN $names). For boolean conditions, please write in their full forms like == or IS [NOT] NULL. + And the execution plan should be: + | id | name | dependencies | profiling data | operator info | + | 14 | Aggregate | 18 | | | + | 18 | Filter | 17 | | | + | 17 | CrossJoin | 6,21 | | | + | 6 | Project | 5 | | | + | 5 | Filter | 22 | | | + | 22 | AppendVertices | 1 | | | + | 1 | IndexScan | 2 | | | + | 2 | Start | | | | + | 21 | Project | 20 | | | + | 20 | Filter | 24 | | | + | 24 | AppendVertices | 23 | | | + | 23 | Traverse | 8 | | | + | 8 | IndexScan | 7 | | | + | 7 | Argument | | | | When profiling query: """ match (v:player) @@ -940,8 +1115,22 @@ Feature: Match By Variable where v1.player.name in names and v2.player.name in names return count(*) as n """ - Then the result should be, in any order, with relax comparison: - | n | + Then a ExecutionError should be raised at runtime: Failed to evaluate condition: ((v1.player.name IN $names) AND (v2.player.name IN $names)). For boolean conditions, please write in their full forms like == or IS [NOT] NULL. + And the execution plan should be: + | id | name | dependencies | profiling data | operator info | + | 14 | Aggregate | 13 | | | + | 13 | Filter | 12 | | | + | 12 | CrossJoin | 6,11 | | | + | 6 | Project | 5 | | | + | 5 | Filter | 16 | | | + | 16 | AppendVertices | 1 | | | + | 1 | IndexScan | 2 | | | + | 2 | Start | | | | + | 11 | Project | 18 | | | + | 18 | AppendVertices | 17 | | | + | 17 | Traverse | 8 | | | + | 8 | IndexScan | 7 | | | + | 7 | Argument | | | | When profiling query: """ match (v:player) @@ -951,8 +1140,24 @@ Feature: Match By Variable where v1.player.name in names and id(v1) in ['Tim Duncan', 'Yao Ming'] return count(*) as n """ - Then the result should be, in any order, with relax comparison: - | n | + Then a ExecutionError should be raised at runtime: Failed to evaluate condition: (v1.player.name IN $names). For boolean conditions, please write in their full forms like == or IS [NOT] NULL. + And the execution plan should be: + | id | name | dependencies | profiling data | operator info | + | 15 | Aggregate | 19 | | | + | 19 | Filter | 18 | | | + | 18 | CrossJoin | 6,22 | | | + | 6 | Project | 5 | | | + | 5 | Filter | 23 | | | + | 23 | AppendVertices | 1 | | | + | 1 | IndexScan | 2 | | | + | 2 | Start | | | | + | 22 | Project | 27 | | | + | 27 | AppendVertices | 26 | | | + | 26 | Filter | 24 | | | + | 24 | Traverse | 8 | | | + | 8 | Dedup | 7 | | | + | 7 | PassThrough | 9 | | | + | 9 | Start | | | | When profiling query: """ match (v:player) @@ -962,8 +1167,24 @@ Feature: Match By Variable where v1.player.name in names and id(v2) in ['Tim Duncan', 'Yao Ming'] return count(*) as n """ - Then the result should be, in any order, with relax comparison: - | n | + Then a ExecutionError should be raised at runtime: Failed to evaluate condition: (v1.player.name IN $names). For boolean conditions, please write in their full forms like == or IS [NOT] NULL. + And the execution plan should be: + | id | name | dependencies | profiling data | operator info | + | 15 | Aggregate | 19 | | | + | 19 | Filter | 18 | | | + | 18 | CrossJoin | 6,22 | | | + | 6 | Project | 5 | | | + | 5 | Filter | 23 | | | + | 23 | AppendVertices | 1 | | | + | 1 | IndexScan | 2 | | | + | 2 | Start | | | | + | 22 | Project | 27 | | | + | 27 | AppendVertices | 26 | | | + | 26 | Filter | 24 | | | + | 24 | Traverse | 8 | | | + | 8 | Dedup | 7 | | | + | 7 | PassThrough | 9 | | | + | 9 | Start | | | | Scenario: [1] match by prop index from unwind When profiling query: @@ -974,7 +1195,20 @@ Feature: Match By Variable return count(*) as n """ Then the result should be, in any order, with relax comparison: - | n | + | n | + | 20 | + And the execution plan should be: + | id | name | dependencies | profiling data | operator info | + | 10 | Aggregate | 9 | | | + | 9 | Filter | 8 | | | + | 8 | CrossJoin | 1,7 | | | + | 1 | Unwind | 2 | | | + | 2 | Start | | | | + | 7 | Project | 12 | | | + | 12 | AppendVertices | 11 | | | + | 11 | Traverse | 4 | | | + | 4 | IndexScan | 3 | | | + | 3 | Argument | | | | When profiling query: """ unwind ['Tim Duncan', 'Yao Ming'] as name @@ -983,7 +1217,21 @@ Feature: Match By Variable return count(*) as n """ Then the result should be, in any order, with relax comparison: - | n | + | n | + | 0 | + And the execution plan should be: + | id | name | dependencies | profiling data | operator info | + | 10 | Aggregate | 14 | | | + | 14 | Filter | 13 | | | + | 13 | CrossJoin | 1,16 | | | + | 1 | Unwind | 2 | | | + | 2 | Start | | | | + | 16 | Project | 15 | | | + | 15 | Filter | 18 | | | + | 18 | AppendVertices | 17 | | | + | 17 | Traverse | 4 | | | + | 4 | IndexScan | 3 | | | + | 3 | Argument | | | | When profiling query: """ unwind ['Tim Duncan', 'Yao Ming'] as name @@ -992,7 +1240,20 @@ Feature: Match By Variable return count(*) as n """ Then the result should be, in any order, with relax comparison: - | n | + | n | + | 0 | + And the execution plan should be: + | id | name | dependencies | profiling data | operator info | + | 10 | Aggregate | 9 | | | + | 9 | Filter | 8 | | | + | 8 | CrossJoin | 1,7 | | | + | 1 | Unwind | 2 | | | + | 2 | Start | | | | + | 7 | Project | 12 | | | + | 12 | AppendVertices | 11 | | | + | 11 | Traverse | 4 | | | + | 4 | IndexScan | 3 | | | + | 3 | Argument | | | | When profiling query: """ unwind ['Tim Duncan', 'Yao Ming'] as name @@ -1001,7 +1262,22 @@ Feature: Match By Variable return count(*) as n """ Then the result should be, in any order, with relax comparison: - | n | + | n | + | 20 | + And the execution plan should be: + | id | name | dependencies | profiling data | operator info | + | 11 | Aggregate | 15 | | | + | 15 | Filter | 14 | | | + | 14 | CrossJoin | 1,17 | | | + | 1 | Unwind | 2 | | | + | 2 | Start | | | | + | 17 | Project | 21 | | | + | 21 | AppendVertices | 20 | | | + | 20 | Filter | 18 | | | + | 18 | Traverse | 4 | | | + | 4 | Dedup | 3 | | | + | 3 | PassThrough | 5 | | | + | 5 | Start | | | | When profiling query: """ unwind ['Tim Duncan', 'Yao Ming'] as name @@ -1010,7 +1286,22 @@ Feature: Match By Variable return count(*) as n """ Then the result should be, in any order, with relax comparison: - | n | + | n | + | 0 | + And the execution plan should be: + | id | name | dependencies | profiling data | operator info | + | 11 | Aggregate | 15 | | | + | 15 | Filter | 14 | | | + | 14 | CrossJoin | 1,17 | | | + | 1 | Unwind | 2 | | | + | 2 | Start | | | | + | 17 | Project | 21 | | | + | 21 | AppendVertices | 20 | | | + | 20 | Filter | 18 | | | + | 18 | Traverse | 4 | | | + | 4 | Dedup | 3 | | | + | 3 | PassThrough | 5 | | | + | 5 | Start | | | | Scenario: [2] match by prop index from unwind When profiling query: @@ -1023,7 +1314,23 @@ Feature: Match By Variable return count(*) as n """ Then the result should be, in any order, with relax comparison: - | n | + | n | + | 2 | + And the execution plan should be: + | id | name | dependencies | profiling data | operator info | + | 14 | Aggregate | 13 | | | + | 13 | Filter | 12 | | | + | 12 | CrossJoin | 6,11 | | | + | 6 | Project | 16 | | | + | 16 | AppendVertices | 2 | | | + | 2 | Dedup | 1 | | | + | 1 | PassThrough | 3 | | | + | 3 | Start | | | | + | 11 | Project | 18 | | | + | 18 | AppendVertices | 17 | | | + | 17 | Traverse | 8 | | | + | 8 | IndexScan | 7 | | | + | 7 | Argument | | | | When profiling query: """ match (v:player) @@ -1034,7 +1341,24 @@ Feature: Match By Variable return count(*) as n """ Then the result should be, in any order, with relax comparison: - | n | + | n | + | 0 | + And the execution plan should be: + | id | name | dependencies | profiling data | operator info | + | 14 | Aggregate | 18 | | | + | 18 | Filter | 17 | | | + | 17 | CrossJoin | 6,21 | | | + | 6 | Project | 22 | | | + | 22 | AppendVertices | 2 | | | + | 2 | Dedup | 1 | | | + | 1 | PassThrough | 3 | | | + | 3 | Start | | | | + | 21 | Project | 20 | | | + | 20 | Filter | 24 | | | + | 24 | AppendVertices | 23 | | | + | 23 | Traverse | 8 | | | + | 8 | IndexScan | 7 | | | + | 7 | Argument | | | | When profiling query: """ match (v:player) @@ -1045,7 +1369,23 @@ Feature: Match By Variable return count(*) as n """ Then the result should be, in any order, with relax comparison: - | n | + | n | + | 0 | + And the execution plan should be: + | id | name | dependencies | profiling data | operator info | + | 14 | Aggregate | 13 | | | + | 13 | Filter | 12 | | | + | 12 | CrossJoin | 6,11 | | | + | 6 | Project | 16 | | | + | 16 | AppendVertices | 2 | | | + | 2 | Dedup | 1 | | | + | 1 | PassThrough | 3 | | | + | 3 | Start | | | | + | 11 | Project | 18 | | | + | 18 | AppendVertices | 17 | | | + | 17 | Traverse | 8 | | | + | 8 | IndexScan | 7 | | | + | 7 | Argument | | | | When profiling query: """ match (v:player) @@ -1056,7 +1396,25 @@ Feature: Match By Variable return count(*) as n """ Then the result should be, in any order, with relax comparison: - | n | + | n | + | 2 | + And the execution plan should be: + | id | name | dependencies | profiling data | operator info | + | 15 | Aggregate | 19 | | | + | 19 | Filter | 18 | | | + | 18 | CrossJoin | 6,22 | | | + | 6 | Project | 23 | | | + | 23 | AppendVertices | 2 | | | + | 2 | Dedup | 1 | | | + | 1 | PassThrough | 3 | | | + | 3 | Start | | | | + | 22 | Project | 27 | | | + | 27 | AppendVertices | 26 | | | + | 26 | Filter | 24 | | | + | 24 | Traverse | 8 | | | + | 8 | Dedup | 7 | | | + | 7 | PassThrough | 9 | | | + | 9 | Start | | | | When profiling query: """ match (v:player) @@ -1067,7 +1425,25 @@ Feature: Match By Variable return count(*) as n """ Then the result should be, in any order, with relax comparison: - | n | + | n | + | 0 | + And the execution plan should be: + | id | name | dependencies | profiling data | operator info | + | 15 | Aggregate | 19 | | | + | 19 | Filter | 18 | | | + | 18 | CrossJoin | 6,22 | | | + | 6 | Project | 23 | | | + | 23 | AppendVertices | 2 | | | + | 2 | Dedup | 1 | | | + | 1 | PassThrough | 3 | | | + | 3 | Start | | | | + | 22 | Project | 27 | | | + | 27 | AppendVertices | 26 | | | + | 26 | Filter | 24 | | | + | 24 | Traverse | 8 | | | + | 8 | Dedup | 7 | | | + | 7 | PassThrough | 9 | | | + | 9 | Start | | | | Scenario: [3] match by prop index from unwind When profiling query: @@ -1080,7 +1456,23 @@ Feature: Match By Variable return count(*) as n """ Then the result should be, in any order, with relax comparison: - | n | + | n | + | 40 | + And the execution plan should be: + | id | name | dependencies | profiling data | operator info | + | 14 | Aggregate | 13 | | | + | 13 | Filter | 12 | | | + | 12 | CrossJoin | 6,11 | | | + | 6 | Project | 5 | | | + | 5 | Filter | 16 | | | + | 16 | AppendVertices | 1 | | | + | 1 | IndexScan | 2 | | | + | 2 | Start | | | | + | 11 | Project | 18 | | | + | 18 | AppendVertices | 17 | | | + | 17 | Traverse | 8 | | | + | 8 | IndexScan | 7 | | | + | 7 | Argument | | | | When profiling query: """ match (v:player) @@ -1091,7 +1483,24 @@ Feature: Match By Variable return count(*) as n """ Then the result should be, in any order, with relax comparison: - | n | + | n | + | 6 | + And the execution plan should be: + | id | name | dependencies | profiling data | operator info | + | 14 | Aggregate | 18 | | | + | 18 | Filter | 17 | | | + | 17 | CrossJoin | 6,21 | | | + | 6 | Project | 5 | | | + | 5 | Filter | 22 | | | + | 22 | AppendVertices | 1 | | | + | 1 | IndexScan | 2 | | | + | 2 | Start | | | | + | 21 | Project | 20 | | | + | 20 | Filter | 24 | | | + | 24 | AppendVertices | 23 | | | + | 23 | Traverse | 8 | | | + | 8 | IndexScan | 7 | | | + | 7 | Argument | | | | When profiling query: """ match (v:player) @@ -1102,7 +1511,23 @@ Feature: Match By Variable return count(*) as n """ Then the result should be, in any order, with relax comparison: - | n | + | n | + | 0 | + And the execution plan should be: + | id | name | dependencies | profiling data | operator info | + | 14 | Aggregate | 13 | | | + | 13 | Filter | 12 | | | + | 12 | CrossJoin | 6,11 | | | + | 6 | Project | 5 | | | + | 5 | Filter | 16 | | | + | 16 | AppendVertices | 1 | | | + | 1 | IndexScan | 2 | | | + | 2 | Start | | | | + | 11 | Project | 18 | | | + | 18 | AppendVertices | 17 | | | + | 17 | Traverse | 8 | | | + | 8 | IndexScan | 7 | | | + | 7 | Argument | | | | When profiling query: """ match (v:player) @@ -1113,7 +1538,25 @@ Feature: Match By Variable return count(*) as n """ Then the result should be, in any order, with relax comparison: - | n | + | n | + | 18 | + And the execution plan should be: + | id | name | dependencies | profiling data | operator info | + | 15 | Aggregate | 19 | | | + | 19 | Filter | 18 | | | + | 18 | CrossJoin | 6,22 | | | + | 6 | Project | 5 | | | + | 5 | Filter | 23 | | | + | 23 | AppendVertices | 1 | | | + | 1 | IndexScan | 2 | | | + | 2 | Start | | | | + | 22 | Project | 27 | | | + | 27 | AppendVertices | 26 | | | + | 26 | Filter | 24 | | | + | 24 | Traverse | 8 | | | + | 8 | Dedup | 7 | | | + | 7 | PassThrough | 9 | | | + | 9 | Start | | | | When profiling query: """ match (v:player) @@ -1124,7 +1567,25 @@ Feature: Match By Variable return count(*) as n """ Then the result should be, in any order, with relax comparison: - | n | + | n | + | 6 | + And the execution plan should be: + | id | name | dependencies | profiling data | operator info | + | 15 | Aggregate | 19 | | | + | 19 | Filter | 18 | | | + | 18 | CrossJoin | 6,22 | | | + | 6 | Project | 5 | | | + | 5 | Filter | 23 | | | + | 23 | AppendVertices | 1 | | | + | 1 | IndexScan | 2 | | | + | 2 | Start | | | | + | 22 | Project | 27 | | | + | 27 | AppendVertices | 26 | | | + | 26 | Filter | 24 | | | + | 24 | Traverse | 8 | | | + | 8 | Dedup | 7 | | | + | 7 | PassThrough | 9 | | | + | 9 | Start | | | | Scenario: reference invalid variable When profiling query: @@ -1134,4 +1595,14 @@ Feature: Match By Variable return count(*) as n """ Then the result should be, in any order, with relax comparison: - | n | + | n | + | 0 | + And the execution plan should be: + | id | name | dependencies | profiling data | operator info | + | 7 | Aggregate | 9 | | | + | 9 | Project | 8 | | | + | 8 | Filter | 4 | | | + | 4 | AppendVertices | 10 | | | + | 10 | Traverse | 1 | | | + | 1 | IndexScan | 2 | | | + | 2 | Start | | | |