diff --git a/src/graph/validator/GetSubgraphValidator.cpp b/src/graph/validator/GetSubgraphValidator.cpp index c0d9f4a5576..e69a5ae582c 100644 --- a/src/graph/validator/GetSubgraphValidator.cpp +++ b/src/graph/validator/GetSubgraphValidator.cpp @@ -94,30 +94,21 @@ Status GetSubgraphValidator::validateBothInOutBound(BothInOutClause* out) { } Status GetSubgraphValidator::validateYield(YieldClause* yield) { - auto pool = qctx_->objPool(); if (yield == nullptr) { - // version 3.0: return Status::SemanticError("No Yield Clause"); - auto* yieldColumns = new YieldColumns(); - auto* vertex = new YieldColumn(LabelExpression::make(pool, "_vertices")); - yieldColumns->addColumn(vertex); - if (subgraphCtx_->steps.steps() != 0) { - auto* edge = new YieldColumn(LabelExpression::make(pool, "_edges")); - yieldColumns->addColumn(edge); - } - yield = pool->add(new YieldClause(yieldColumns)); + return Status::SemanticError("Missing yield clause."); } auto size = yield->columns().size(); outputs_.reserve(size); + auto pool = qctx_->objPool(); YieldColumns* newCols = pool->add(new YieldColumns()); for (const auto& col : yield->columns()) { - std::string lowerStr = col->expr()->toString(); - folly::toLowerAscii(lowerStr); - if (lowerStr == "vertices" || lowerStr == "_vertices") { + const std::string& colStr = col->expr()->toString(); + if (colStr == "VERTICES") { subgraphCtx_->getVertexProp = true; auto* newCol = new YieldColumn(InputPropertyExpression::make(pool, "VERTICES"), col->name()); newCols->addColumn(newCol); - } else if (lowerStr == "edges" || lowerStr == "_edges") { + } else if (colStr == "EDGES") { if (subgraphCtx_->steps.steps() == 0) { return Status::SemanticError("Get Subgraph 0 STEPS only support YIELD vertices"); } diff --git a/src/graph/validator/LookupValidator.cpp b/src/graph/validator/LookupValidator.cpp index d5d18e7eb4a..6426b8975fc 100644 --- a/src/graph/validator/LookupValidator.cpp +++ b/src/graph/validator/LookupValidator.cpp @@ -160,36 +160,21 @@ Status LookupValidator::validateYieldTag() { } Status LookupValidator::validateYield() { - auto pool = qctx_->objPool(); - auto* newCols = pool->add(new YieldColumns()); - lookupCtx_->yieldExpr = newCols; - if (lookupCtx_->isEdge) { - idxReturnCols_.emplace_back(kSrc); - idxReturnCols_.emplace_back(kDst); - idxReturnCols_.emplace_back(kRank); - idxReturnCols_.emplace_back(kType); - outputs_.emplace_back(kSrcVID, vidType_); - outputs_.emplace_back(kDstVID, vidType_); - outputs_.emplace_back(kRanking, Value::Type::INT); - newCols->addColumn(new YieldColumn(ColumnExpression::make(pool, 0), kSrcVID)); - newCols->addColumn(new YieldColumn(ColumnExpression::make(pool, 1), kDstVID)); - newCols->addColumn(new YieldColumn(ColumnExpression::make(pool, 2), kRanking)); - } else { - idxReturnCols_.emplace_back(kVid); - outputs_.emplace_back(kVertexID, vidType_); - newCols->addColumn(new YieldColumn(ColumnExpression::make(pool, 0), kVertexID)); - } - auto yieldClause = sentence()->yieldClause(); if (yieldClause == nullptr) { - extractExprProps(); - return Status::OK(); + return Status::SemanticError("Missing yield clause."); } lookupCtx_->dedup = yieldClause->isDistinct(); + lookupCtx_->yieldExpr = qctx_->objPool()->add(new YieldColumns()); if (lookupCtx_->isEdge) { + idxReturnCols_.emplace_back(nebula::kSrc); + idxReturnCols_.emplace_back(nebula::kDst); + idxReturnCols_.emplace_back(nebula::kRank); + idxReturnCols_.emplace_back(nebula::kType); NG_RETURN_IF_ERROR(validateYieldEdge()); } else { + idxReturnCols_.emplace_back(nebula::kVid); NG_RETURN_IF_ERROR(validateYieldTag()); } if (exprProps_.hasInputVarProperty()) { diff --git a/src/graph/validator/test/GetSubgraphValidatorTest.cpp b/src/graph/validator/test/GetSubgraphValidatorTest.cpp index 61ef6d9814e..46d86e1a36e 100644 --- a/src/graph/validator/test/GetSubgraphValidatorTest.cpp +++ b/src/graph/validator/test/GetSubgraphValidatorTest.cpp @@ -19,7 +19,7 @@ using PK = nebula::graph::PlanNode::Kind; TEST_F(GetSubgraphValidatorTest, Base) { { - std::string query = "GET SUBGRAPH FROM \"1\""; + std::string query = "GET SUBGRAPH FROM \"1\" YIELD vertices as nodes"; std::vector expected = { PK::kProject, PK::kDataCollect, @@ -32,7 +32,7 @@ TEST_F(GetSubgraphValidatorTest, Base) { EXPECT_TRUE(checkResult(query, expected)); } { - std::string query = "GET SUBGRAPH WITH PROP 3 STEPS FROM \"1\""; + std::string query = "GET SUBGRAPH WITH PROP 3 STEPS FROM \"1\" YIELD edges as relationships"; std::vector expected = { PK::kProject, PK::kDataCollect, @@ -58,7 +58,8 @@ TEST_F(GetSubgraphValidatorTest, Base) { EXPECT_TRUE(checkResult(query, expected)); } { - std::string query = "GET SUBGRAPH WITH PROP FROM \"1\", \"2\" IN like"; + std::string query = + "GET SUBGRAPH WITH PROP FROM \"1\", \"2\" IN like YIELD vertices as a, edges as b"; std::vector expected = { PK::kProject, PK::kDataCollect, @@ -76,7 +77,7 @@ TEST_F(GetSubgraphValidatorTest, Input) { { std::string query = "GO FROM \"1\" OVER like YIELD like._src AS src | GET SUBGRAPH WITH " - "PROP FROM $-.src"; + "PROP FROM $-.src YIELD vertices as a, edges as b"; std::vector expected = { PK::kProject, PK::kDataCollect, @@ -95,7 +96,7 @@ TEST_F(GetSubgraphValidatorTest, Input) { { std::string query = "$a = GO FROM \"1\" OVER like YIELD like._src AS src; GET SUBGRAPH " - "FROM $a.src"; + "FROM $a.src YIELD vertices as a, edges as b"; std::vector expected = { PK::kProject, PK::kDataCollect, @@ -112,7 +113,7 @@ TEST_F(GetSubgraphValidatorTest, Input) { EXPECT_TRUE(checkResult(query, expected)); } { - std::string query = "GET SUBGRAPH 0 STEPS FROM \"1\""; + std::string query = "GET SUBGRAPH 0 STEPS FROM \"1\" YIELD vertices as nodes"; std::vector expected = { PK::kAggregate, PK::kGetVertices, @@ -121,7 +122,8 @@ TEST_F(GetSubgraphValidatorTest, Input) { EXPECT_TRUE(checkResult(query, expected)); } { - std::string query = "GET SUBGRAPH WITH PROP 0 STEPS FROM \"1\", \"2\", \"3\""; + std::string query = + "GET SUBGRAPH WITH PROP 0 STEPS FROM \"1\", \"2\", \"3\" YIELD vertices as nodes"; std::vector expected = { PK::kAggregate, PK::kGetVertices, @@ -132,7 +134,7 @@ TEST_F(GetSubgraphValidatorTest, Input) { { std::string query = "GO FROM \"1\" OVER like YIELD like._src AS src | GET SUBGRAPH WITH " - "PROP 0 STEPS FROM $-.src"; + "PROP 0 STEPS FROM $-.src YIELD vertices as nodes"; std::vector expected = { PK::kAggregate, PK::kGetVertices, @@ -147,7 +149,7 @@ TEST_F(GetSubgraphValidatorTest, Input) { { std::string query = "$a = GO FROM \"1\" OVER like YIELD like._src AS src; GET SUBGRAPH " - "WITH PROP 0 STEPS FROM $a.src"; + "WITH PROP 0 STEPS FROM $a.src YIELD vertices as nodes"; std::vector expected = { PK::kAggregate, PK::kGetVertices, @@ -162,6 +164,11 @@ TEST_F(GetSubgraphValidatorTest, Input) { } TEST_F(GetSubgraphValidatorTest, invalidYield) { + { + std::string query = "GET SUBGRAPH WITH PROP FROM \"Tim Duncan\""; + auto result = checkResult(query); + EXPECT_EQ(std::string(result.message()), "SemanticError: Missing yield clause."); + } { std::string query = "GET SUBGRAPH WITH PROP FROM \"Tim Duncan\" YIELD vertice"; auto result = checkResult(query); @@ -202,19 +209,19 @@ TEST_F(GetSubgraphValidatorTest, invalidYield) { TEST_F(GetSubgraphValidatorTest, RefNotExist) { { - std::string query = "GET SUBGRAPH WITH PROP FROM $-.id"; + std::string query = "GET SUBGRAPH WITH PROP FROM $-.id YIELD edges as b"; auto result = checkResult(query); EXPECT_EQ(std::string(result.message()), "SemanticError: `$-.id', not exist prop `id'"); } { - std::string query = "GET SUBGRAPH WITH PROP FROM $a.id"; + std::string query = "GET SUBGRAPH WITH PROP FROM $a.id YIELD edges as b"; auto result = checkResult(query); EXPECT_EQ(std::string(result.message()), "SemanticError: `$a.id', not exist variable `a'"); } { std::string query = "GO FROM \"1\" OVER like YIELD $$.person.age AS id | GET SUBGRAPH WITH " - "PROP FROM $-.id"; + "PROP FROM $-.id YIELD vertices as nodes"; auto result = checkResult(query); EXPECT_EQ(std::string(result.message()), "SemanticError: `$-.id', the srcs should be type of " @@ -223,7 +230,7 @@ TEST_F(GetSubgraphValidatorTest, RefNotExist) { { std::string query = "$a = GO FROM \"1\" OVER like YIELD $$.person.age AS ID; GET SUBGRAPH " - "FROM $a.ID"; + "FROM $a.ID YIELD edges as relationships"; auto result = checkResult(query); EXPECT_EQ(std::string(result.message()), "SemanticError: `$a.ID', the srcs should be type of " @@ -232,21 +239,21 @@ TEST_F(GetSubgraphValidatorTest, RefNotExist) { { std::string query = "$a = GO FROM \"1\" OVER like YIELD like._src AS src; GET SUBGRAPH " - "WITH PROP FROM $b.src"; + "WITH PROP FROM $b.src YIELD vertices as nodes"; auto result = checkResult(query); EXPECT_EQ(std::string(result.message()), "SemanticError: `$b.src', not exist variable `b'"); } { std::string query = "GO FROM \"1\" OVER like YIELD like._dst AS id, like._src AS id | GET " - "SUBGRAPH FROM $-.id"; + "SUBGRAPH FROM $-.id YIELD edges as relationships"; auto result = checkResult(query); EXPECT_EQ(std::string(result.message()), "SemanticError: Duplicate Column Name : `id'"); } { std::string query = "$a = GO FROM \"1\" OVER like YIELD like._dst AS id, like._src AS id; " - "GET SUBGRAPH WITH PROP FROM $a.id"; + "GET SUBGRAPH WITH PROP FROM $a.id YIELD vertices as nodes"; auto result = checkResult(query); EXPECT_EQ(std::string(result.message()), "SemanticError: Duplicate Column Name : `id'"); } diff --git a/src/graph/validator/test/LookupValidatorTest.cpp b/src/graph/validator/test/LookupValidatorTest.cpp index 397b87bcb13..239deb2e261 100644 --- a/src/graph/validator/test/LookupValidatorTest.cpp +++ b/src/graph/validator/test/LookupValidatorTest.cpp @@ -18,8 +18,8 @@ TEST_F(LookupValidatorTest, InputOutput) { // pipe { const std::string query = - "LOOKUP ON person where person.age == 35 | " - "FETCH PROP ON person $-.VertexID YIELD vertex as node"; + "LOOKUP ON person where person.age == 35 YIELD id(vertex) as id | " + "FETCH PROP ON person $-.id YIELD vertex as node"; EXPECT_TRUE(checkResult(query, { PlanNode::Kind::kProject, @@ -48,8 +48,8 @@ TEST_F(LookupValidatorTest, InputOutput) { // variable { const std::string query = - "$a = LOOKUP ON person where person.age == 35; " - "FETCH PROP ON person $a.VertexID YIELD vertex as node"; + "$a = LOOKUP ON person where person.age == 35 YIELD id(vertex) as id; " + "FETCH PROP ON person $a.id YIELD vertex as node"; EXPECT_TRUE(checkResult(query, { PlanNode::Kind::kProject, @@ -63,8 +63,7 @@ TEST_F(LookupValidatorTest, InputOutput) { // var with yield { const std::string query = - "$a = LOOKUP ON person where person.age == 35 YIELD person.name AS " - "name;" + "$a = LOOKUP ON person where person.age == 35 YIELD person.name AS name;" "FETCH PROP ON person $a.name YIELD vertex as node"; EXPECT_TRUE(checkResult(query, { @@ -79,7 +78,10 @@ TEST_F(LookupValidatorTest, InputOutput) { } TEST_F(LookupValidatorTest, InvalidYieldExpression) { - // TODO(shylock) + { + const std::string query = "LOOKUP ON person where person.age > 20;"; + EXPECT_FALSE(checkResult(query, {})); + } { const std::string query = "LOOKUP ON person where person.age == 35 YIELD person.age + 1 AS age;"; @@ -95,40 +97,49 @@ TEST_F(LookupValidatorTest, InvalidYieldExpression) { TEST_F(LookupValidatorTest, InvalidFilterExpression) { { - const std::string query = "LOOKUP ON person where person.age == person.name;"; + const std::string query = + "LOOKUP ON person where person.age == person.name YIELD vertex as node;"; EXPECT_FALSE(checkResult(query, {})); } { - const std::string query = "LOOKUP ON person where person.age > person.name;"; + const std::string query = + "LOOKUP ON person where person.age > person.name YIELD vertex as node;"; EXPECT_FALSE(checkResult(query, {})); } { - const std::string query = "LOOKUP ON person where person.age != person.name;"; + const std::string query = + "LOOKUP ON person where person.age != person.name YIELD vertex as node;"; EXPECT_FALSE(checkResult(query, {})); } { - const std::string query = "LOOKUP ON person where person.age + 1 > 5;"; + const std::string query = "LOOKUP ON person where person.age + 1 > 5 YIELD person.age;"; EXPECT_FALSE(checkResult(query, {})); } { - const std::string query = "LOOKUP ON person where person.age > person.name + 5;"; + const std::string query = + "LOOKUP ON person where person.age > person.name + 5 YIELD id(vertex);"; EXPECT_FALSE(checkResult(query, {})); } { - const std::string query = "LOOKUP ON person where 1 + 5 < person.age;"; + const std::string query = "LOOKUP ON person where 1 + 5 < person.age YIELD vertex as node;"; EXPECT_TRUE(checkResult(query, {})); } { - const std::string query = "LOOKUP ON person where person.age > 1 + 5;"; + const std::string query = "LOOKUP ON person where person.age > 1 + 5 YIELD vertex as node;"; EXPECT_TRUE(checkResult(query, {})); } { - const std::string query = "LOOKUP ON person where person.age > abs(-5);"; + const std::string query = "LOOKUP ON person where person.age > abs(-5) YIELD id(vertex);"; EXPECT_TRUE(checkResult(query, {})); } } TEST_F(LookupValidatorTest, wrongYield) { + { + std::string query = "LOOKUP ON person"; + auto result = checkResult(query); + EXPECT_EQ(std::string(result.message()), "SemanticError: Missing yield clause."); + } { std::string query = "LOOKUP ON person YIELD vertex"; auto result = checkResult(query); diff --git a/tests/tck/features/bugfix/TruncatedStringIndex.feature b/tests/tck/features/bugfix/TruncatedStringIndex.feature index f1f30ecccc7..149d775e4ff 100644 --- a/tests/tck/features/bugfix/TruncatedStringIndex.feature +++ b/tests/tck/features/bugfix/TruncatedStringIndex.feature @@ -25,16 +25,16 @@ Feature: Truncated string index Then the execution should be successful When executing query: """ - LOOKUP ON person WHERE person.name=="abc" + LOOKUP ON person WHERE person.name=="abc" YIELD id(vertex) as id """ Then the result should be, in any order: - | VertexID | + | id | When executing query: """ LOOKUP ON person WHERE person.name=="abc" YIELD person.name """ Then the result should be, in any order: - | VertexID | person.name | + | person.name | When executing query: """ match (v:person) where v.name == "abc" return v; diff --git a/tests/tck/features/delete/DeleteTag.IntVid.feature b/tests/tck/features/delete/DeleteTag.IntVid.feature index 2eb8c0df69a..af279dd4701 100644 --- a/tests/tck/features/delete/DeleteTag.IntVid.feature +++ b/tests/tck/features/delete/DeleteTag.IntVid.feature @@ -23,10 +23,10 @@ Feature: Delete int vid of tag | "Tim Duncan" | "psychology" | When executing query: """ - LOOKUP ON player WHERE player.name == "Tim Duncan" + LOOKUP ON player WHERE player.name == "Tim Duncan" YIELD id(vertex) as id """ Then the result should be, in any order, and the columns 0 should be hashed: - | VertexID | + | id | | "Tim Duncan" | # delete one tag When executing query: @@ -50,10 +50,10 @@ Feature: Delete int vid of tag | "Tim Duncan" | "psychology" | When executing query: """ - LOOKUP ON player WHERE player.name == "Tim Duncan" + LOOKUP ON player WHERE player.name == "Tim Duncan" YIELD id(vertex) as id """ Then the result should be, in any order, and the columns 0 should be hashed: - | VertexID | + | id | Then drop the used space Scenario: delete int vid one vertex multiple tag @@ -76,10 +76,10 @@ Feature: Delete int vid of tag | "Tim Duncan" | "psychology" | When executing query: """ - LOOKUP ON player WHERE player.name == "Tim Duncan" + LOOKUP ON player WHERE player.name == "Tim Duncan" YIELD id(vertex) as id """ Then the result should be, in any order, and the columns 0 should be hashed: - | VertexID | + | id | | "Tim Duncan" | # delete one tag When executing query: @@ -102,10 +102,10 @@ Feature: Delete int vid of tag | bachelor.name | bachelor.speciality | When executing query: """ - LOOKUP ON player WHERE player.name == "Tim Duncan" + LOOKUP ON player WHERE player.name == "Tim Duncan" YIELD id(vertex) as id """ Then the result should be, in any order, and the columns 0 should be hashed: - | VertexID | + | id | Then drop the used space Scenario: delete int vid one vertex all tag @@ -128,10 +128,10 @@ Feature: Delete int vid of tag | "Tim Duncan" | "psychology" | When executing query: """ - LOOKUP ON player WHERE player.name == "Tim Duncan" + LOOKUP ON player WHERE player.name == "Tim Duncan" YIELD id(vertex) as id """ Then the result should be, in any order, and the columns 0 should be hashed: - | VertexID | + | id | | "Tim Duncan" | # delete one tag When executing query: @@ -154,10 +154,10 @@ Feature: Delete int vid of tag | bachelor.name | bachelor.speciality | When executing query: """ - LOOKUP ON player WHERE player.name == "Tim Duncan" + LOOKUP ON player WHERE player.name == "Tim Duncan" YIELD id(vertex) as id """ Then the result should be, in any order, and the columns 0 should be hashed: - | VertexID | + | id | Then drop the used space Scenario: delete int vid multiple vertex one tag @@ -180,17 +180,17 @@ Feature: Delete int vid of tag | "Tony Parker" | 36 | When executing query: """ - LOOKUP ON player WHERE player.name == "Tim Duncan" + LOOKUP ON player WHERE player.name == "Tim Duncan" YIELD id(vertex) as id """ Then the result should be, in any order, and the columns 0 should be hashed: - | VertexID | + | id | | "Tim Duncan" | When executing query: """ - LOOKUP ON player WHERE player.name == "Tony Parker" + LOOKUP ON player WHERE player.name == "Tony Parker" YIELD id(vertex) as id """ Then the result should be, in any order, and the columns 0 should be hashed: - | VertexID | + | id | | "Tony Parker" | # delete one tag When executing query: @@ -213,16 +213,16 @@ Feature: Delete int vid of tag | player.name | player.age | When executing query: """ - LOOKUP ON player WHERE player.name == "Tim Duncan" + LOOKUP ON player WHERE player.name == "Tim Duncan" YIELD id(vertex) as id """ Then the result should be, in any order, and the columns 0 should be hashed: - | VertexID | + | id | When executing query: """ - LOOKUP ON player WHERE player.name == "Tony Parker" + LOOKUP ON player WHERE player.name == "Tony Parker" YIELD id(vertex) as id """ Then the result should be, in any order, and the columns 0 should be hashed: - | VertexID | + | id | Then drop the used space Scenario: delete int vid from pipe diff --git a/tests/tck/features/delete/DeleteTag.feature b/tests/tck/features/delete/DeleteTag.feature index e2ac581883c..4e01b0cdeff 100644 --- a/tests/tck/features/delete/DeleteTag.feature +++ b/tests/tck/features/delete/DeleteTag.feature @@ -23,10 +23,10 @@ Feature: Delete string vid of tag | "Tim Duncan" | "psychology" | When executing query: """ - LOOKUP ON player WHERE player.name == "Tim Duncan" + LOOKUP ON player WHERE player.name == "Tim Duncan" YIELD id(vertex) as id """ Then the result should be, in any order: - | VertexID | + | id | | "Tim Duncan" | # delete one tag When executing query: @@ -50,10 +50,10 @@ Feature: Delete string vid of tag | "Tim Duncan" | "psychology" | When executing query: """ - LOOKUP ON player WHERE player.name == "Tim Duncan" + LOOKUP ON player WHERE player.name == "Tim Duncan" YIELD id(vertex) as id """ Then the result should be, in any order: - | VertexID | + | id | Then drop the used space Scenario: delete string vid one vertex multiple tag @@ -76,10 +76,10 @@ Feature: Delete string vid of tag | "Tim Duncan" | "psychology" | When executing query: """ - LOOKUP ON player WHERE player.name == "Tim Duncan" + LOOKUP ON player WHERE player.name == "Tim Duncan" YIELD id(vertex) as id """ Then the result should be, in any order: - | VertexID | + | id | | "Tim Duncan" | # delete one tag When executing query: @@ -102,10 +102,10 @@ Feature: Delete string vid of tag | bachelor.name | bachelor.speciality | When executing query: """ - LOOKUP ON player WHERE player.name == "Tim Duncan" + LOOKUP ON player WHERE player.name == "Tim Duncan" YIELD id(vertex) as id """ Then the result should be, in any order: - | VertexID | + | id | Then drop the used space Scenario: delete string vid one vertex all tag @@ -128,10 +128,10 @@ Feature: Delete string vid of tag | "Tim Duncan" | "psychology" | When executing query: """ - LOOKUP ON player WHERE player.name == "Tim Duncan" + LOOKUP ON player WHERE player.name == "Tim Duncan" YIELD id(vertex) as id """ Then the result should be, in any order: - | VertexID | + | id | | "Tim Duncan" | # delete one tag When executing query: @@ -154,10 +154,10 @@ Feature: Delete string vid of tag | bachelor.name | bachelor.speciality | When executing query: """ - LOOKUP ON player WHERE player.name == "Tim Duncan" + LOOKUP ON player WHERE player.name == "Tim Duncan" YIELD id(vertex) as id """ Then the result should be, in any order: - | VertexID | + | id | Then drop the used space Scenario: delete string vid multiple vertex one tag @@ -180,17 +180,17 @@ Feature: Delete string vid of tag | "Tony Parker" | 36 | When executing query: """ - LOOKUP ON player WHERE player.name == "Tim Duncan" + LOOKUP ON player WHERE player.name == "Tim Duncan" YIELD id(vertex) as id """ Then the result should be, in any order: - | VertexID | + | id | | "Tim Duncan" | When executing query: """ - LOOKUP ON player WHERE player.name == "Tony Parker" + LOOKUP ON player WHERE player.name == "Tony Parker" YIELD id(vertex) as id """ Then the result should be, in any order: - | VertexID | + | id | | "Tony Parker" | # delete one tag When executing query: @@ -213,16 +213,16 @@ Feature: Delete string vid of tag | player.name | player.age | When executing query: """ - LOOKUP ON player WHERE player.name == "Tim Duncan" + LOOKUP ON player WHERE player.name == "Tim Duncan" YIELD id(vertex) as id """ Then the result should be, in any order: - | VertexID | + | id | When executing query: """ - LOOKUP ON player WHERE player.name == "Tony Parker" + LOOKUP ON player WHERE player.name == "Tony Parker" YIELD id(vertex) as id """ Then the result should be, in any order: - | VertexID | + | id | Then drop the used space Scenario: delete string vid from pipe diff --git a/tests/tck/features/geo/GeoBase.feature b/tests/tck/features/geo/GeoBase.feature index 24983b3e051..31705b7e9ca 100644 --- a/tests/tck/features/geo/GeoBase.feature +++ b/tests/tck/features/geo/GeoBase.feature @@ -276,10 +276,10 @@ Feature: Geo base LOOKUP ON any_shape YIELD ST_ASText(any_shape.geo); """ Then the result should be, in any order: - | VertexID | ST_ASText(any_shape.geo) | - | "101" | "POINT(3 8)" | - | "102" | "LINESTRING(3 8, 4.7 73.23)" | - | "103" | "POLYGON((0 1, 1 2, 2 3, 0 1))" | + | ST_ASText(any_shape.geo) | + | "POINT(3 8)" | + | "LINESTRING(3 8, 4.7 73.23)" | + | "POLYGON((0 1, 1 2, 2 3, 0 1))" | And the execution plan should be: | id | name | dependencies | operator info | | 2 | Project | 3 | | @@ -290,29 +290,29 @@ Feature: Geo base LOOKUP ON only_point YIELD ST_ASText(only_point.geo); """ Then the result should be, in any order: - | VertexID | ST_ASText(only_point.geo) | - | "201" | "POINT(3 8)" | + | ST_ASText(only_point.geo) | + | "POINT(3 8)" | When executing query: """ LOOKUP ON only_linestring YIELD ST_ASText(only_linestring.geo); """ Then the result should be, in any order: - | VertexID | ST_ASText(only_linestring.geo) | - | "302" | "LINESTRING(3 8, 4.7 73.23)" | + | ST_ASText(only_linestring.geo) | + | "LINESTRING(3 8, 4.7 73.23)" | When executing query: """ LOOKUP ON only_polygon YIELD ST_ASText(only_polygon.geo); """ Then the result should be, in any order: - | VertexID | ST_ASText(only_polygon.geo) | - | "403" | "POLYGON((0 1, 1 2, 2 3, 0 1))" | + | ST_ASText(only_polygon.geo) | + | "POLYGON((0 1, 1 2, 2 3, 0 1))" | When executing query: """ LOOKUP ON any_shape_edge YIELD ST_ASText(any_shape_edge.geo); """ Then the result should be, in any order: - | SrcVID | DstVID | Ranking | ST_ASText(any_shape_edge.geo) | - | "201" | "302" | 0 | "POLYGON((0 1, 1 2, 2 3, 0 1))" | + | ST_ASText(any_shape_edge.geo) | + | "POLYGON((0 1, 1 2, 2 3, 0 1))" | # Match with geo index When executing query: """ @@ -352,77 +352,77 @@ Feature: Geo base # Lookup on geo index again When executing query: """ - LOOKUP ON any_shape YIELD ST_ASText(any_shape.geo); + LOOKUP ON any_shape YIELD id(vertex) as id, ST_ASText(any_shape.geo); """ Then the result should be, in any order: - | VertexID | ST_ASText(any_shape.geo) | - | "101" | "POINT(3 8)" | - | "102" | "LINESTRING(3 8, 4.7 73.23)" | - | "103" | "POLYGON((0 1, 1 2, 2 3, 0 1))" | - | "108" | "POINT(72.3 84.6)" | + | id | ST_ASText(any_shape.geo) | + | "101" | "POINT(3 8)" | + | "102" | "LINESTRING(3 8, 4.7 73.23)" | + | "103" | "POLYGON((0 1, 1 2, 2 3, 0 1))" | + | "108" | "POINT(72.3 84.6)" | When executing query: """ - LOOKUP ON only_point YIELD ST_ASText(only_point.geo); + LOOKUP ON only_point YIELD id(vertex) as id, ST_ASText(only_point.geo); """ Then the result should be, in any order: - | VertexID | ST_ASText(only_point.geo) | - | "201" | "POINT(3 8)" | - | "208" | "POINT(0.01 0.01)" | + | id | ST_ASText(only_point.geo) | + | "201" | "POINT(3 8)" | + | "208" | "POINT(0.01 0.01)" | When executing query: """ - LOOKUP ON only_linestring YIELD ST_ASText(only_linestring.geo); + LOOKUP ON only_linestring YIELD id(vertex) as id, ST_ASText(only_linestring.geo); """ Then the result should be, in any order: - | VertexID | ST_ASText(only_linestring.geo) | - | "302" | "LINESTRING(3 8, 4.7 73.23)" | - | "308" | "LINESTRING(9 9, 8 8, 7 7, 9 9)" | + | id | ST_ASText(only_linestring.geo) | + | "302" | "LINESTRING(3 8, 4.7 73.23)" | + | "308" | "LINESTRING(9 9, 8 8, 7 7, 9 9)" | When executing query: """ - LOOKUP ON only_polygon YIELD ST_ASText(only_polygon.geo); + LOOKUP ON only_polygon YIELD id(vertex) as id, ST_ASText(only_polygon.geo); """ Then the result should be, in any order: - | VertexID | ST_ASText(only_polygon.geo) | - | "403" | "POLYGON((0 1, 1 2, 2 3, 0 1))" | - | "408" | "POLYGON((0 1, 1 2, 2 3, 0 1))" | + | id | ST_ASText(only_polygon.geo) | + | "403" | "POLYGON((0 1, 1 2, 2 3, 0 1))" | + | "408" | "POLYGON((0 1, 1 2, 2 3, 0 1))" | When executing query: """ - LOOKUP ON any_shape_edge YIELD ST_ASText(any_shape_edge.geo); + LOOKUP ON any_shape_edge YIELD src(edge) as src, dst(edge) as dst, rank(edge) as rank, ST_ASText(any_shape_edge.geo); """ Then the result should be, in any order: - | SrcVID | DstVID | Ranking | ST_ASText(any_shape_edge.geo) | - | "108" | "408" | 0 | "POLYGON((-20 -20, -20 20, 20 20, 20 -20, -20 -20), (1 1, 2 2, 0 2, 1 1))" | - | "201" | "302" | 0 | "POLYGON((0 1, 1 2, 2 3, 0 1))" | + | src | dst | rank | ST_ASText(any_shape_edge.geo) | + | "108" | "408" | 0 | "POLYGON((-20 -20, -20 20, 20 20, 20 -20, -20 -20), (1 1, 2 2, 0 2, 1 1))" | + | "201" | "302" | 0 | "POLYGON((0 1, 1 2, 2 3, 0 1))" | # Lookup and Yield geo functions When executing query: """ - LOOKUP ON any_shape YIELD S2_CellIdFromPoint(any_shape.geo); + LOOKUP ON any_shape YIELD id(vertex) as id, S2_CellIdFromPoint(any_shape.geo); """ Then the result should be, in any order: - | VertexID | S2_CellIdFromPoint(any_shape.geo) | - | "101" | 1166542697063163289 | - | "102" | BAD_DATA | - | "103" | BAD_DATA | - | "108" | 4987215245349669805 | + | id | S2_CellIdFromPoint(any_shape.geo) | + | "101" | 1166542697063163289 | + | "102" | BAD_DATA | + | "103" | BAD_DATA | + | "108" | 4987215245349669805 | When executing query: """ - LOOKUP ON any_shape YIELD S2_CoveringCellIds(any_shape.geo); + LOOKUP ON any_shape YIELD id(vertex) as id, S2_CoveringCellIds(any_shape.geo); """ Then the result should be, in any order: - | VertexID | S2_CoveringCellIds(any_shape.geo) | - | "101" | [1166542697063163289] | - | "102" | [1167558203395801088, 1279022294173220864, 1315051091192184832, 1351079888211148800, 5039527983027585024, 5062045981164437504, 5174635971848699904, 5183643171103440896] | - | "103" | [1152391494368201343, 1153466862374223872, 1153554823304445952, 1153836298281156608, 1153959443583467520, 1154240918560178176, 1160503736791990272, 1160591697722212352] | - | "108" | [4987215245349669805] | + | id | S2_CoveringCellIds(any_shape.geo) | + | "101" | [1166542697063163289] | + | "102" | [1167558203395801088, 1279022294173220864, 1315051091192184832, 1351079888211148800, 5039527983027585024, 5062045981164437504, 5174635971848699904, 5183643171103440896] | + | "103" | [1152391494368201343, 1153466862374223872, 1153554823304445952, 1153836298281156608, 1153959443583467520, 1154240918560178176, 1160503736791990272, 1160591697722212352] | + | "108" | [4987215245349669805] | # Lookup with geo predicates which could be index accelerated # ST_Intersects When profiling query: """ - LOOKUP ON any_shape WHERE ST_Intersects(any_shape.geo, ST_GeogFromText('POINT(3 8)')) YIELD ST_ASText(any_shape.geo); + LOOKUP ON any_shape WHERE ST_Intersects(any_shape.geo, ST_GeogFromText('POINT(3 8)')) YIELD id(vertex) as id, ST_ASText(any_shape.geo); """ Then the result should be, in any order: - | VertexID | ST_ASText(any_shape.geo) | - | "101" | "POINT(3 8)" | - | "102" | "LINESTRING(3 8, 4.7 73.23)" | + | id | ST_ASText(any_shape.geo) | + | "101" | "POINT(3 8)" | + | "102" | "LINESTRING(3 8, 4.7 73.23)" | And the execution plan should be: | id | name | dependencies | operator info | | 3 | Project | 4 | | @@ -433,29 +433,29 @@ Feature: Geo base LOOKUP ON any_shape WHERE ST_Intersects(any_shape.geo, ST_GeogFromText('POINT(0 1)')) YIELD ST_ASText(any_shape.geo); """ Then the result should be, in any order: - | VertexID | ST_ASText(any_shape.geo) | - | "103" | "POLYGON((0 1, 1 2, 2 3, 0 1))" | + | ST_ASText(any_shape.geo) | + | "POLYGON((0 1, 1 2, 2 3, 0 1))" | When executing query: """ LOOKUP ON any_shape WHERE ST_Intersects(any_shape.geo, ST_GeogFromText('POINT(4.7 73.23)')) YIELD ST_ASText(any_shape.geo); """ Then the result should be, in any order: - | VertexID | ST_ASText(any_shape.geo) | - | "102" | "LINESTRING(3 8, 4.7 73.23)" | + | ST_ASText(any_shape.geo) | + | "LINESTRING(3 8, 4.7 73.23)" | When executing query: """ LOOKUP ON any_shape WHERE ST_Intersects(any_shape.geo, ST_Point(72.3, 84.6)) YIELD ST_ASText(any_shape.geo); """ Then the result should be, in any order: - | VertexID | ST_ASText(any_shape.geo) | - | "108" | "POINT(72.3 84.6)" | + | ST_ASText(any_shape.geo) | + | "POINT(72.3 84.6)" | When executing query: """ LOOKUP ON any_shape WHERE ST_Intersects(ST_Point(72.3, 84.6), any_shape.geo) YIELD ST_ASText(any_shape.geo); """ Then the result should be, in any order: - | VertexID | ST_ASText(any_shape.geo) | - | "108" | "POINT(72.3 84.6)" | + | ST_ASText(any_shape.geo) | + | "POINT(72.3 84.6)" | When executing query: """ LOOKUP ON any_shape WHERE ST_Intersects(any_shape.geo, any_shape.geo) YIELD ST_ASText(any_shape.geo); @@ -486,65 +486,65 @@ Feature: Geo base LOOKUP ON any_shape WHERE ST_Distance(any_shape.geo, ST_Point(3, 8)) < 1.0 YIELD ST_ASText(any_shape.geo); """ Then the result should be, in any order: - | VertexID | ST_ASText(any_shape.geo) | - | "101" | "POINT(3 8)" | - | "102" | "LINESTRING(3 8, 4.7 73.23)" | + | ST_ASText(any_shape.geo) | + | "POINT(3 8)" | + | "LINESTRING(3 8, 4.7 73.23)" | When executing query: """ LOOKUP ON any_shape WHERE ST_Distance(any_shape.geo, ST_Point(3, 8)) <= 1.0 YIELD ST_ASText(any_shape.geo); """ Then the result should be, in any order: - | VertexID | ST_ASText(any_shape.geo) | - | "101" | "POINT(3 8)" | - | "102" | "LINESTRING(3 8, 4.7 73.23)" | + | ST_ASText(any_shape.geo) | + | "POINT(3 8)" | + | "LINESTRING(3 8, 4.7 73.23)" | When executing query: """ LOOKUP ON any_shape WHERE ST_Distance(any_shape.geo, ST_Point(3, 8)) <= 8909524.383934561 YIELD ST_ASText(any_shape.geo); """ Then the result should be, in any order: - | VertexID | ST_ASText(any_shape.geo) | - | "101" | "POINT(3 8)" | - | "102" | "LINESTRING(3 8, 4.7 73.23)" | - | "103" | "POLYGON((0 1, 1 2, 2 3, 0 1))" | - | "108" | "POINT(72.3 84.6)" | + | ST_ASText(any_shape.geo) | + | "POINT(3 8)" | + | "LINESTRING(3 8, 4.7 73.23)" | + | "POLYGON((0 1, 1 2, 2 3, 0 1))" | + | "POINT(72.3 84.6)" | When executing query: """ LOOKUP ON any_shape WHERE ST_Distance(any_shape.geo, ST_Point(3, 8)) < 8909524.383934561 YIELD ST_ASText(any_shape.geo); """ Then the result should be, in any order: - | VertexID | ST_ASText(any_shape.geo) | - | "101" | "POINT(3 8)" | - | "102" | "LINESTRING(3 8, 4.7 73.23)" | - | "103" | "POLYGON((0 1, 1 2, 2 3, 0 1))" | + | ST_ASText(any_shape.geo) | + | "POINT(3 8)" | + | "LINESTRING(3 8, 4.7 73.23)" | + | "POLYGON((0 1, 1 2, 2 3, 0 1))" | When executing query: """ LOOKUP ON any_shape WHERE ST_Distance(any_shape.geo, ST_Point(3, 8)) < 8909524.383934563 YIELD ST_ASText(any_shape.geo); """ Then the result should be, in any order: - | VertexID | ST_ASText(any_shape.geo) | - | "101" | "POINT(3 8)" | - | "102" | "LINESTRING(3 8, 4.7 73.23)" | - | "103" | "POLYGON((0 1, 1 2, 2 3, 0 1))" | - | "108" | "POINT(72.3 84.6)" | + | ST_ASText(any_shape.geo) | + | "POINT(3 8)" | + | "LINESTRING(3 8, 4.7 73.23)" | + | "POLYGON((0 1, 1 2, 2 3, 0 1))" | + | "POINT(72.3 84.6)" | When executing query: """ LOOKUP ON any_shape WHERE 8909524.383934560 > ST_Distance(any_shape.geo, ST_Point(3, 8)) YIELD ST_ASText(any_shape.geo); """ Then the result should be, in any order: - | VertexID | ST_ASText(any_shape.geo) | - | "101" | "POINT(3 8)" | - | "102" | "LINESTRING(3 8, 4.7 73.23)" | - | "103" | "POLYGON((0 1, 1 2, 2 3, 0 1))" | + | ST_ASText(any_shape.geo) | + | "POINT(3 8)" | + | "LINESTRING(3 8, 4.7 73.23)" | + | "POLYGON((0 1, 1 2, 2 3, 0 1))" | When executing query: """ LOOKUP ON any_shape WHERE 8909524.3839345630 >= ST_Distance(any_shape.geo, ST_Point(3, 8)) YIELD ST_ASText(any_shape.geo); """ Then the result should be, in any order: - | VertexID | ST_ASText(any_shape.geo) | - | "101" | "POINT(3 8)" | - | "102" | "LINESTRING(3 8, 4.7 73.23)" | - | "103" | "POLYGON((0 1, 1 2, 2 3, 0 1))" | - | "108" | "POINT(72.3 84.6)" | + | ST_ASText(any_shape.geo) | + | "POINT(3 8)" | + | "LINESTRING(3 8, 4.7 73.23)" | + | "POLYGON((0 1, 1 2, 2 3, 0 1))" | + | "POINT(72.3 84.6)" | When executing query: """ LOOKUP ON any_shape WHERE ST_Distance(any_shape.geo, ST_Point(3, 8)) > 1.0 YIELD ST_ASText(any_shape.geo); @@ -561,58 +561,58 @@ Feature: Geo base LOOKUP ON any_shape WHERE ST_DWithin(any_shape.geo, ST_Point(3, 8), 8909524.383934561) YIELD ST_ASText(any_shape.geo); """ Then the result should be, in any order: - | VertexID | ST_ASText(any_shape.geo) | - | "101" | "POINT(3 8)" | - | "102" | "LINESTRING(3 8, 4.7 73.23)" | - | "103" | "POLYGON((0 1, 1 2, 2 3, 0 1))" | - | "108" | "POINT(72.3 84.6)" | + | ST_ASText(any_shape.geo) | + | "POINT(3 8)" | + | "LINESTRING(3 8, 4.7 73.23)" | + | "POLYGON((0 1, 1 2, 2 3, 0 1))" | + | "POINT(72.3 84.6)" | When executing query: """ LOOKUP ON any_shape WHERE ST_DWithin(any_shape.geo, ST_Point(3, 8), 100.0) YIELD ST_ASText(any_shape.geo); """ Then the result should be, in any order: - | VertexID | ST_ASText(any_shape.geo) | - | "101" | "POINT(3 8)" | - | "102" | "LINESTRING(3 8, 4.7 73.23)" | + | ST_ASText(any_shape.geo) | + | "POINT(3 8)" | + | "LINESTRING(3 8, 4.7 73.23)" | When executing query: """ LOOKUP ON any_shape WHERE ST_DWithin(any_shape.geo, ST_Point(3, 8), 100) YIELD ST_ASText(any_shape.geo); """ Then the result should be, in any order: - | VertexID | ST_ASText(any_shape.geo) | - | "101" | "POINT(3 8)" | - | "102" | "LINESTRING(3 8, 4.7 73.23)" | + | ST_ASText(any_shape.geo) | + | "POINT(3 8)" | + | "LINESTRING(3 8, 4.7 73.23)" | # ST_Covers When executing query: """ LOOKUP ON any_shape WHERE ST_Covers(any_shape.geo, ST_Point(3, 8)) YIELD ST_ASText(any_shape.geo); """ Then the result should be, in any order: - | VertexID | ST_ASText(any_shape.geo) | - | "101" | "POINT(3 8)" | - | "102" | "LINESTRING(3 8, 4.7 73.23)" | + | ST_ASText(any_shape.geo) | + | "POINT(3 8)" | + | "LINESTRING(3 8, 4.7 73.23)" | When executing query: """ LOOKUP ON any_shape WHERE ST_Covers(any_shape.geo, ST_Point(3, 8)) YIELD ST_ASText(any_shape.geo); """ Then the result should be, in any order: - | VertexID | ST_ASText(any_shape.geo) | - | "101" | "POINT(3 8)" | - | "102" | "LINESTRING(3 8, 4.7 73.23)" | + | ST_ASText(any_shape.geo) | + | "POINT(3 8)" | + | "LINESTRING(3 8, 4.7 73.23)" | When executing query: """ LOOKUP ON any_shape WHERE ST_Covers(ST_GeogFromText('POLYGON((-0.7 3.8,3.6 3.2,1.8 -0.8,-3.4 2.4,-0.7 3.8))'), any_shape.geo) YIELD ST_ASText(any_shape.geo); """ Then the result should be, in any order: - | VertexID | ST_ASText(any_shape.geo) | - | "103" | "POLYGON((0 1, 1 2, 2 3, 0 1))" | + | ST_ASText(any_shape.geo) | + | "POLYGON((0 1, 1 2, 2 3, 0 1))" | When executing query: """ LOOKUP ON any_shape WHERE ST_CoveredBy(any_shape.geo, ST_GeogFromText('POLYGON((-0.7 3.8,3.6 3.2,1.8 -0.8,-3.4 2.4,-0.7 3.8))')) YIELD ST_ASText(any_shape.geo); """ Then the result should be, in any order: - | VertexID | ST_ASText(any_shape.geo) | - | "103" | "POLYGON((0 1, 1 2, 2 3, 0 1))" | + | ST_ASText(any_shape.geo) | + | "POLYGON((0 1, 1 2, 2 3, 0 1))" | # Update vertex with index When executing query: """ @@ -631,19 +631,19 @@ Feature: Geo base LOOKUP ON any_shape YIELD ST_ASText(any_shape.geo); """ Then the result should be, in any order: - | VertexID | ST_ASText(any_shape.geo) | - | "101" | "LINESTRING(3 8, 6 16)" | - | "102" | "LINESTRING(3 8, 4.7 73.23)" | - | "103" | "POLYGON((0 1, 1 2, 2 3, 0 1))" | - | "108" | "POINT(72.3 84.6)" | + | ST_ASText(any_shape.geo) | + | "LINESTRING(3 8, 6 16)" | + | "LINESTRING(3 8, 4.7 73.23)" | + | "POLYGON((0 1, 1 2, 2 3, 0 1))" | + | "POINT(72.3 84.6)" | When executing query: """ LOOKUP ON any_shape WHERE ST_DWithin(any_shape.geo, ST_Point(3, 8), 100.0) YIELD ST_ASText(any_shape.geo); """ Then the result should be, in any order: - | VertexID | ST_ASText(any_shape.geo) | - | "101" | "LINESTRING(3 8, 6 16)" | - | "102" | "LINESTRING(3 8, 4.7 73.23)" | + | ST_ASText(any_shape.geo) | + | "LINESTRING(3 8, 6 16)" | + | "LINESTRING(3 8, 4.7 73.23)" | # Update edge with index When executing query: """ @@ -662,17 +662,17 @@ Feature: Geo base LOOKUP ON any_shape_edge YIELD ST_ASText(any_shape_edge.geo); """ Then the result should be, in any order: - | SrcVID | DstVID | Ranking | ST_ASText(any_shape_edge.geo) | - | "108" | "408" | 0 | "POLYGON((-20 -20, -20 20, 20 20, 20 -20, -20 -20), (1 1, 2 2, 0 2, 1 1))" | - | "201" | "302" | 0 | "POINT(-1 -1)" | + | ST_ASText(any_shape_edge.geo) | + | "POLYGON((-20 -20, -20 20, 20 20, 20 -20, -20 -20), (1 1, 2 2, 0 2, 1 1))" | + | "POINT(-1 -1)" | When executing query: """ LOOKUP ON any_shape_edge WHERE ST_Intersects(any_shape_edge.geo, ST_Point(-1, -1)) YIELD ST_ASText(any_shape_edge.geo); """ Then the result should be, in any order: - | SrcVID | DstVID | Ranking | ST_ASText(any_shape_edge.geo) | - | "108" | "408" | 0 | "POLYGON((-20 -20, -20 20, 20 20, 20 -20, -20 -20), (1 1, 2 2, 0 2, 1 1))" | - | "201" | "302" | 0 | "POINT(-1 -1)" | + | ST_ASText(any_shape_edge.geo) | + | "POLYGON((-20 -20, -20 20, 20 20, 20 -20, -20 -20), (1 1, 2 2, 0 2, 1 1))" | + | "POINT(-1 -1)" | # Delete vertex with index When executing query: """ @@ -690,17 +690,17 @@ Feature: Geo base LOOKUP ON any_shape YIELD ST_ASText(any_shape.geo); """ Then the result should be, in any order: - | VertexID | ST_ASText(any_shape.geo) | - | "102" | "LINESTRING(3 8, 4.7 73.23)" | - | "103" | "POLYGON((0 1, 1 2, 2 3, 0 1))" | - | "108" | "POINT(72.3 84.6)" | + | ST_ASText(any_shape.geo) | + | "LINESTRING(3 8, 4.7 73.23)" | + | "POLYGON((0 1, 1 2, 2 3, 0 1))" | + | "POINT(72.3 84.6)" | When executing query: """ LOOKUP ON any_shape WHERE ST_Covers(any_shape.geo, ST_Point(3, 8)) YIELD ST_ASText(any_shape.geo); """ Then the result should be, in any order: - | VertexID | ST_ASText(any_shape.geo) | - | "102" | "LINESTRING(3 8, 4.7 73.23)" | + | ST_ASText(any_shape.geo) | + | "LINESTRING(3 8, 4.7 73.23)" | # Delete edge with index When executing query: """ @@ -718,14 +718,14 @@ Feature: Geo base LOOKUP ON any_shape_edge YIELD ST_ASText(any_shape_edge.geo); """ Then the result should be, in any order: - | SrcVID | DstVID | Ranking | ST_ASText(any_shape_edge.geo) | - | "108" | "408" | 0 | "POLYGON((-20 -20, -20 20, 20 20, 20 -20, -20 -20), (1 1, 2 2, 0 2, 1 1))" | + | ST_ASText(any_shape_edge.geo) | + | "POLYGON((-20 -20, -20 20, 20 20, 20 -20, -20 -20), (1 1, 2 2, 0 2, 1 1))" | When executing query: """ LOOKUP ON any_shape WHERE ST_Intersects(ST_Point(-1, -1), any_shape.geo) YIELD ST_ASText(any_shape.geo); """ Then the result should be, in any order: - | VertexID | ST_ASText(any_shape.geo) | + | ST_ASText(any_shape.geo) | # Drop tag index When executing query: """ @@ -735,7 +735,7 @@ Feature: Geo base And wait 3 seconds When executing query: """ - LOOKUP ON any_shape; + LOOKUP ON any_shape YIELD id(vertex) as id; """ Then a ExecutionError should be raised at runtime: There is no index to use at runtime # Drop edge index @@ -747,7 +747,7 @@ Feature: Geo base And wait 3 seconds When executing query: """ - LOOKUP ON any_shape_edge; + LOOKUP ON any_shape_edge YIELD edge as e; """ Then a ExecutionError should be raised at runtime: There is no index to use at runtime # Drop tag diff --git a/tests/tck/features/index/Index.IntVid.feature b/tests/tck/features/index/Index.IntVid.feature index a5534596fcd..c28f438d2de 100644 --- a/tests/tck/features/index/Index.IntVid.feature +++ b/tests/tck/features/index/Index.IntVid.feature @@ -554,15 +554,15 @@ Feature: IndexTest_Vid_Int LOOKUP ON tag_1 WHERE tag_1.col5 == 5 YIELD tag_1.col5, tag_1.col1 """ Then the result should be, in any order: - | VertexID | tag_1.col5 | tag_1.col1 | - | 100 | 5 | true | + | tag_1.col5 | tag_1.col1 | + | 5 | true | When executing query: """ LOOKUP ON tag_1 WHERE tag_1.col5 == 5 YIELD tag_1.col1, tag_1.col5 """ Then the result should be, in any order: - | VertexID | tag_1.col1 | tag_1.col5 | - | 100 | true | 5 | + | tag_1.col1 | tag_1.col5 | + | true | 5 | Then drop the used space Scenario: IndexTest IntVid RebuildTagIndexStatusInfo diff --git a/tests/tck/features/index/Index.feature b/tests/tck/features/index/Index.feature index 12e7336994e..bef4eae033e 100644 --- a/tests/tck/features/index/Index.feature +++ b/tests/tck/features/index/Index.feature @@ -560,15 +560,15 @@ Feature: IndexTest_Vid_String LOOKUP ON tag_1 WHERE tag_1.col5 == 5 YIELD tag_1.col5, tag_1.col1 """ Then the result should be, in any order: - | VertexID | tag_1.col5 | tag_1.col1 | - | "100" | 5 | true | + | tag_1.col5 | tag_1.col1 | + | 5 | true | When executing query: """ LOOKUP ON tag_1 WHERE tag_1.col5 == 5 YIELD tag_1.col1, tag_1.col5 """ Then the result should be, in any order: - | VertexID | tag_1.col1 | tag_1.col5 | - | "100" | true | 5 | + | tag_1.col1 | tag_1.col5 | + | true | 5 | Then drop the used space Scenario: IndexTest RebuildTagIndexStatusInfo @@ -740,20 +740,20 @@ Feature: IndexTest_Vid_String | "rebuild_tag_space_all_tag_indexes" | "FINISHED" | When executing query: """ - LOOKUP ON id_tag WHERE id_tag.id == 100 + LOOKUP ON id_tag WHERE id_tag.id == 100 YIELD id(vertex) as id """ Then the result should be, in any order: - | VertexID | - | "100" | - | "200" | + | id | + | "100" | + | "200" | When executing query: """ - LOOKUP ON name_tag WHERE name_tag.name == "100" + LOOKUP ON name_tag WHERE name_tag.name == "100" YIELD id(vertex) as id """ Then the result should be, in any order: - | VertexID | - | "300" | - | "400" | + | id | + | "300" | + | "400" | Then drop the used space Scenario: IndexTest rebuild all tag indexes by multi input @@ -795,26 +795,26 @@ Feature: IndexTest_Vid_String | "id_tag_index,name_tag_index" | "FINISHED" | When executing query: """ - LOOKUP ON id_tag WHERE id_tag.id == 100 + LOOKUP ON id_tag WHERE id_tag.id == 100 YIELD id(vertex) as id """ Then the result should be, in any order: - | VertexID | - | "100" | - | "200" | + | id | + | "100" | + | "200" | When executing query: """ - LOOKUP ON name_tag WHERE name_tag.name == "100" + LOOKUP ON name_tag WHERE name_tag.name == "100" YIELD id(vertex) as id """ Then the result should be, in any order: - | VertexID | - | "300" | - | "400" | + | id | + | "300" | + | "400" | When executing query: """ - LOOKUP ON age_tag WHERE age_tag.age == 8 + LOOKUP ON age_tag WHERE age_tag.age == 8 YIELD id(vertex) as id """ Then the result should be, in any order: - | VertexID | + | id | Then drop the used space Scenario: IndexTest rebuild all edge indexes by empty input @@ -854,18 +854,18 @@ Feature: IndexTest_Vid_String | "rebuild_edge_space_all_edge_indexes" | "FINISHED" | When executing query: """ - LOOKUP ON id_edge WHERE id_edge.id == 100 + LOOKUP ON id_edge WHERE id_edge.id == 100 YIELD src(edge) as src, dst(edge) as dst, rank(edge) as rank """ Then the result should be, in any order: - | SrcVID | DstVID | Ranking | - | "100" | "200" | 0 | + | src | dst | rank | + | "100" | "200" | 0 | When executing query: """ - LOOKUP ON name_edge WHERE name_edge.name == "100" + LOOKUP ON name_edge WHERE name_edge.name == "100" YIELD src(edge) as src, dst(edge) as dst, rank(edge) as rank """ Then the result should be, in any order: - | SrcVID | DstVID | Ranking | - | "300" | "400" | 0 | + | src | dst | rank | + | "300" | "400" | 0 | Then drop the used space Scenario: IndexTest rebuild all edge indexes by multi input @@ -907,24 +907,24 @@ Feature: IndexTest_Vid_String | "id_edge_index,name_edge_index" | "FINISHED" | When executing query: """ - LOOKUP ON id_edge WHERE id_edge.id == 100 + LOOKUP ON id_edge WHERE id_edge.id == 100 YIELD src(edge) as src, dst(edge) as dst, rank(edge) as rank """ Then the result should be, in any order: - | SrcVID | DstVID | Ranking | - | "100" | "200" | 0 | + | src | dst | rank | + | "100" | "200" | 0 | When executing query: """ - LOOKUP ON name_edge WHERE name_edge.name == "100" + LOOKUP ON name_edge WHERE name_edge.name == "100" YIELD src(edge) as src, dst(edge) as dst, rank(edge) as rank """ Then the result should be, in any order: - | SrcVID | DstVID | Ranking | - | "300" | "400" | 0 | + | src | dst | rank | + | "300" | "400" | 0 | When executing query: """ - LOOKUP ON age_edge WHERE age_edge.age == 8 + LOOKUP ON age_edge WHERE age_edge.age == 8 YIELD src(edge) as src, dst(edge) as dst, rank(edge) as rank """ Then the result should be, in any order: - | SrcVID | DstVID | Ranking | + | src | dst | rank | Then drop the used space Scenario: show create tag index diff --git a/tests/tck/features/index/TagEdgeIndex.feature b/tests/tck/features/index/TagEdgeIndex.feature index 2412243eb56..bed05641186 100644 --- a/tests/tck/features/index/TagEdgeIndex.feature +++ b/tests/tck/features/index/TagEdgeIndex.feature @@ -105,23 +105,23 @@ Feature: tag and edge index tests from pytest LOOKUP ON tag_1 WHERE tag_1.col2 == 18 YIELD tag_1.col1 """ Then the result should be, in any order: - | VertexID | tag_1.col1 | - | '101' | 'Tom' | + | tag_1.col1 | + | 'Tom' | When executing query: """ LOOKUP ON tag_1 WHERE tag_1.col3 > 35.7 YIELD tag_1.col1 """ Then the result should be, in any order: - | VertexID | tag_1.col1 | - | '102' | 'Jerry' | - | '103' | 'Bob' | + | tag_1.col1 | + | 'Jerry' | + | 'Bob' | When executing query: """ LOOKUP ON tag_1 WHERE tag_1.col2 > 18 AND tag_1.col3 < 37.2 YIELD tag_1.col1 """ Then the result should be, in any order: - | VertexID | tag_1.col1 | - | '103' | 'Bob' | + | tag_1.col1 | + | 'Bob' | When executing query: """ DESC TAG INDEX single_tag_index @@ -343,23 +343,23 @@ Feature: tag and edge index tests from pytest LOOKUP ON edge_1 WHERE edge_1.col2 == 22 YIELD edge_1.col2 """ Then the result should be, in any order: - | SrcVID | DstVID | Ranking | edge_1.col2 | - | '102' | '103' | 0 | 22 | + | edge_1.col2 | + | 22 | When executing query: """ LOOKUP ON edge_1 WHERE edge_1.col3 > 43.4 YIELD edge_1.col1 """ Then the result should be, in any order: - | SrcVID | DstVID | Ranking | edge_1.col1 | - | '102' | '103' | 0 | 'Yellow' | - | '101' | '102' | 0 | 'Red' | + | edge_1.col1 | + | 'Yellow' | + | 'Red' | When executing query: """ LOOKUP ON edge_1 WHERE edge_1.col2 > 45 AND edge_1.col3 < 44.3 YIELD edge_1.col1 """ Then the result should be, in any order: - | SrcVID | DstVID | Ranking | edge_1.col1 | - | '103' | '101' | 0 | 'Blue' | + | edge_1.col1 | + | 'Blue' | # Describe Edge Index When executing query: """ diff --git a/tests/tck/features/insert/Insert.feature b/tests/tck/features/insert/Insert.feature index 884de390357..c30210c8d54 100644 --- a/tests/tck/features/insert/Insert.feature +++ b/tests/tck/features/insert/Insert.feature @@ -520,14 +520,14 @@ Feature: Insert string vid of vertex and edge LOOKUP on course YIELD course.name, course.introduce """ Then the result should be, in any order: - | VertexID | course.name | course.introduce | - | 'English' | 'Engli' | NULL | - | 'Math' | 'Math' | NULL | + | course.name | course.introduce | + | 'Engli' | NULL | + | 'Math' | NULL | When executing query: """ LOOKUP ON student YIELD student.name, student.age """ Then the result should be, in any order: - | VertexID | student.name | student.age | - | '' | 'Tom' | 12 | + | student.name | student.age | + | 'Tom' | 12 | Then drop the used space diff --git a/tests/tck/features/lookup/ByIndex.feature b/tests/tck/features/lookup/ByIndex.feature index f12621b80fd..b845ec3d249 100644 --- a/tests/tck/features/lookup/ByIndex.feature +++ b/tests/tck/features/lookup/ByIndex.feature @@ -7,10 +7,10 @@ Feature: Lookup by index itself Given a graph with space named "nba" When executing query: """ - LOOKUP ON team + LOOKUP ON team YIELD id(vertex) as teamID """ Then the result should be, in any order: - | VertexID | + | teamID | | 'Nets' | | 'Pistons' | | 'Bucks' | @@ -46,37 +46,37 @@ Feature: Lookup by index itself LOOKUP ON team YIELD team.name AS Name """ Then the result should be, in any order: - | VertexID | Name | - | 'Nets' | 'Nets' | - | 'Pistons' | 'Pistons' | - | 'Bucks' | 'Bucks' | - | 'Mavericks' | 'Mavericks' | - | 'Clippers' | 'Clippers' | - | 'Thunders' | 'Thunders' | - | 'Lakers' | 'Lakers' | - | 'Jazz' | 'Jazz' | - | 'Nuggets' | 'Nuggets' | - | 'Wizards' | 'Wizards' | - | 'Pacers' | 'Pacers' | - | 'Timberwolves' | 'Timberwolves' | - | 'Hawks' | 'Hawks' | - | 'Warriors' | 'Warriors' | - | 'Magic' | 'Magic' | - | 'Rockets' | 'Rockets' | - | 'Pelicans' | 'Pelicans' | - | 'Raptors' | 'Raptors' | - | 'Spurs' | 'Spurs' | - | 'Heat' | 'Heat' | - | 'Grizzlies' | 'Grizzlies' | - | 'Knicks' | 'Knicks' | - | 'Suns' | 'Suns' | - | 'Hornets' | 'Hornets' | - | 'Cavaliers' | 'Cavaliers' | - | 'Kings' | 'Kings' | - | 'Celtics' | 'Celtics' | - | '76ers' | '76ers' | - | 'Trail Blazers' | 'Trail Blazers' | - | 'Bulls' | 'Bulls' | + | Name | + | 'Nets' | + | 'Pistons' | + | 'Bucks' | + | 'Mavericks' | + | 'Clippers' | + | 'Thunders' | + | 'Lakers' | + | 'Jazz' | + | 'Nuggets' | + | 'Wizards' | + | 'Pacers' | + | 'Timberwolves' | + | 'Hawks' | + | 'Warriors' | + | 'Magic' | + | 'Rockets' | + | 'Pelicans' | + | 'Raptors' | + | 'Spurs' | + | 'Heat' | + | 'Grizzlies' | + | 'Knicks' | + | 'Suns' | + | 'Hornets' | + | 'Cavaliers' | + | 'Kings' | + | 'Celtics' | + | '76ers' | + | 'Trail Blazers' | + | 'Bulls' | Scenario: [1] Tag TODO Given a graph with space named "nba" @@ -92,12 +92,12 @@ Feature: Lookup by index itself Then a SemanticError should be raised at runtime: When executing query: """ - LOOKUP ON player WHERE player.age > 9223372036854775807+1 + LOOKUP ON player WHERE player.age > 9223372036854775807+1 YIELD player.name """ Then a SemanticError should be raised at runtime: result of (9223372036854775807+1) cannot be represented as an integer When executing query: """ - LOOKUP ON player WHERE player.age > -9223372036854775808-1 + LOOKUP ON player WHERE player.age > -9223372036854775808-1 YIELD player.name """ Then a SemanticError should be raised at runtime: result of (-9223372036854775808-1) cannot be represented as an integer @@ -105,326 +105,326 @@ Feature: Lookup by index itself Given a graph with space named "nba" When executing query: """ - LOOKUP ON serve + LOOKUP ON serve YIELD src(edge) as src, dst(edge) as dst, rank(edge) as rank """ Then the result should be, in any order: - | SrcVID | DstVID | Ranking | - | "Amar'e Stoudemire" | 'Suns' | 0 | - | "Amar'e Stoudemire" | 'Knicks' | 0 | - | "Amar'e Stoudemire" | 'Heat' | 0 | - | 'Russell Westbrook' | 'Thunders' | 0 | - | 'James Harden' | 'Thunders' | 0 | - | 'James Harden' | 'Rockets' | 0 | - | 'Kobe Bryant' | 'Lakers' | 0 | - | 'Tracy McGrady' | 'Raptors' | 0 | - | 'Tracy McGrady' | 'Magic' | 0 | - | 'Tracy McGrady' | 'Rockets' | 0 | - | 'Tracy McGrady' | 'Spurs' | 0 | - | 'Chris Paul' | 'Hornets' | 0 | - | 'Chris Paul' | 'Clippers' | 0 | - | 'Chris Paul' | 'Rockets' | 0 | - | 'Boris Diaw' | 'Hawks' | 0 | - | 'Boris Diaw' | 'Suns' | 0 | - | 'Boris Diaw' | 'Hornets' | 0 | - | 'Boris Diaw' | 'Spurs' | 0 | - | 'Boris Diaw' | 'Jazz' | 0 | - | 'LeBron James' | 'Cavaliers' | 0 | - | 'LeBron James' | 'Heat' | 0 | - | 'LeBron James' | 'Cavaliers' | 1 | - | 'LeBron James' | 'Lakers' | 0 | - | 'Klay Thompson' | 'Warriors' | 0 | - | 'Kristaps Porzingis' | 'Knicks' | 0 | - | 'Kristaps Porzingis' | 'Mavericks' | 0 | - | 'Jonathon Simmons' | 'Spurs' | 0 | - | 'Jonathon Simmons' | 'Magic' | 0 | - | 'Jonathon Simmons' | '76ers' | 0 | - | 'Marco Belinelli' | 'Warriors' | 0 | - | 'Marco Belinelli' | 'Raptors' | 0 | - | 'Marco Belinelli' | 'Hornets' | 0 | - | 'Marco Belinelli' | 'Bulls' | 0 | - | 'Marco Belinelli' | 'Spurs' | 0 | - | 'Marco Belinelli' | 'Kings' | 0 | - | 'Marco Belinelli' | 'Hornets' | 1 | - | 'Marco Belinelli' | 'Hawks' | 0 | - | 'Marco Belinelli' | '76ers' | 0 | - | 'Marco Belinelli' | 'Spurs' | 1 | - | 'Luka Doncic' | 'Mavericks' | 0 | - | 'David West' | 'Hornets' | 0 | - | 'David West' | 'Pacers' | 0 | - | 'David West' | 'Spurs' | 0 | - | 'David West' | 'Warriors' | 0 | - | 'Tony Parker' | 'Spurs' | 0 | - | 'Tony Parker' | 'Hornets' | 0 | - | 'Danny Green' | 'Cavaliers' | 0 | - | 'Danny Green' | 'Spurs' | 0 | - | 'Danny Green' | 'Raptors' | 0 | - | 'Rudy Gay' | 'Grizzlies' | 0 | - | 'Rudy Gay' | 'Raptors' | 0 | - | 'Rudy Gay' | 'Kings' | 0 | - | 'Rudy Gay' | 'Spurs' | 0 | - | 'LaMarcus Aldridge' | 'Trail Blazers' | 0 | - | 'LaMarcus Aldridge' | 'Spurs' | 0 | - | 'Tim Duncan' | 'Spurs' | 0 | - | 'Kevin Durant' | 'Thunders' | 0 | - | 'Kevin Durant' | 'Warriors' | 0 | - | 'Stephen Curry' | 'Warriors' | 0 | - | 'Ray Allen' | 'Bucks' | 0 | - | 'Ray Allen' | 'Thunders' | 0 | - | 'Ray Allen' | 'Celtics' | 0 | - | 'Ray Allen' | 'Heat' | 0 | - | 'Tiago Splitter' | 'Spurs' | 0 | - | 'Tiago Splitter' | 'Hawks' | 0 | - | 'Tiago Splitter' | '76ers' | 0 | - | 'DeAndre Jordan' | 'Clippers' | 0 | - | 'DeAndre Jordan' | 'Mavericks' | 0 | - | 'DeAndre Jordan' | 'Knicks' | 0 | - | 'Paul Gasol' | 'Grizzlies' | 0 | - | 'Paul Gasol' | 'Lakers' | 0 | - | 'Paul Gasol' | 'Bulls' | 0 | - | 'Paul Gasol' | 'Spurs' | 0 | - | 'Paul Gasol' | 'Bucks' | 0 | - | 'Aron Baynes' | 'Spurs' | 0 | - | 'Aron Baynes' | 'Pistons' | 0 | - | 'Aron Baynes' | 'Celtics' | 0 | - | 'Cory Joseph' | 'Spurs' | 0 | - | 'Cory Joseph' | 'Raptors' | 0 | - | 'Cory Joseph' | 'Pacers' | 0 | - | 'Vince Carter' | 'Raptors' | 0 | - | 'Vince Carter' | 'Nets' | 0 | - | 'Vince Carter' | 'Magic' | 0 | - | 'Vince Carter' | 'Suns' | 0 | - | 'Vince Carter' | 'Mavericks' | 0 | - | 'Vince Carter' | 'Grizzlies' | 0 | - | 'Vince Carter' | 'Kings' | 0 | - | 'Vince Carter' | 'Hawks' | 0 | - | 'Marc Gasol' | 'Grizzlies' | 0 | - | 'Marc Gasol' | 'Raptors' | 0 | - | 'Ricky Rubio' | 'Timberwolves' | 0 | - | 'Ricky Rubio' | 'Jazz' | 0 | - | 'Ben Simmons' | '76ers' | 0 | - | 'Giannis Antetokounmpo' | 'Bucks' | 0 | - | 'Rajon Rondo' | 'Celtics' | 0 | - | 'Rajon Rondo' | 'Mavericks' | 0 | - | 'Rajon Rondo' | 'Kings' | 0 | - | 'Rajon Rondo' | 'Bulls' | 0 | - | 'Rajon Rondo' | 'Pelicans' | 0 | - | 'Rajon Rondo' | 'Lakers' | 0 | - | 'Manu Ginobili' | 'Spurs' | 0 | - | 'Kyrie Irving' | 'Cavaliers' | 0 | - | 'Kyrie Irving' | 'Celtics' | 0 | - | 'Carmelo Anthony' | 'Nuggets' | 0 | - | 'Carmelo Anthony' | 'Knicks' | 0 | - | 'Carmelo Anthony' | 'Thunders' | 0 | - | 'Carmelo Anthony' | 'Rockets' | 0 | - | 'Dwyane Wade' | 'Heat' | 0 | - | 'Dwyane Wade' | 'Bulls' | 0 | - | 'Dwyane Wade' | 'Cavaliers' | 0 | - | 'Dwyane Wade' | 'Heat' | 1 | - | 'Joel Embiid' | '76ers' | 0 | - | 'Damian Lillard' | 'Trail Blazers' | 0 | - | 'Yao Ming' | 'Rockets' | 0 | - | 'Kyle Anderson' | 'Spurs' | 0 | - | 'Kyle Anderson' | 'Grizzlies' | 0 | - | 'Dejounte Murray' | 'Spurs' | 0 | - | 'Blake Griffin' | 'Clippers' | 0 | - | 'Blake Griffin' | 'Pistons' | 0 | - | 'Steve Nash' | 'Suns' | 0 | - | 'Steve Nash' | 'Mavericks' | 0 | - | 'Steve Nash' | 'Suns' | 1 | - | 'Steve Nash' | 'Lakers' | 0 | - | 'Jason Kidd' | 'Mavericks' | 0 | - | 'Jason Kidd' | 'Suns' | 0 | - | 'Jason Kidd' | 'Nets' | 0 | - | 'Jason Kidd' | 'Mavericks' | 1 | - | 'Jason Kidd' | 'Knicks' | 0 | - | 'Dirk Nowitzki' | 'Mavericks' | 0 | - | 'Paul George' | 'Pacers' | 0 | - | 'Paul George' | 'Thunders' | 0 | - | 'Grant Hill' | 'Pistons' | 0 | - | 'Grant Hill' | 'Magic' | 0 | - | 'Grant Hill' | 'Suns' | 0 | - | 'Grant Hill' | 'Clippers' | 0 | - | "Shaquille O'Neal" | 'Magic' | 0 | - | "Shaquille O'Neal" | 'Lakers' | 0 | - | "Shaquille O'Neal" | 'Heat' | 0 | - | "Shaquille O'Neal" | 'Suns' | 0 | - | "Shaquille O'Neal" | 'Cavaliers' | 0 | - | "Shaquille O'Neal" | 'Celtics' | 0 | - | 'JaVale McGee' | 'Wizards' | 0 | - | 'JaVale McGee' | 'Nuggets' | 0 | - | 'JaVale McGee' | 'Mavericks' | 0 | - | 'JaVale McGee' | 'Warriors' | 0 | - | 'JaVale McGee' | 'Lakers' | 0 | - | 'Dwight Howard' | 'Magic' | 0 | - | 'Dwight Howard' | 'Lakers' | 0 | - | 'Dwight Howard' | 'Rockets' | 0 | - | 'Dwight Howard' | 'Hawks' | 0 | - | 'Dwight Howard' | 'Hornets' | 0 | - | 'Dwight Howard' | 'Wizards' | 0 | + | src | dst | rank | + | "Amar'e Stoudemire" | 'Suns' | 0 | + | "Amar'e Stoudemire" | 'Knicks' | 0 | + | "Amar'e Stoudemire" | 'Heat' | 0 | + | 'Russell Westbrook' | 'Thunders' | 0 | + | 'James Harden' | 'Thunders' | 0 | + | 'James Harden' | 'Rockets' | 0 | + | 'Kobe Bryant' | 'Lakers' | 0 | + | 'Tracy McGrady' | 'Raptors' | 0 | + | 'Tracy McGrady' | 'Magic' | 0 | + | 'Tracy McGrady' | 'Rockets' | 0 | + | 'Tracy McGrady' | 'Spurs' | 0 | + | 'Chris Paul' | 'Hornets' | 0 | + | 'Chris Paul' | 'Clippers' | 0 | + | 'Chris Paul' | 'Rockets' | 0 | + | 'Boris Diaw' | 'Hawks' | 0 | + | 'Boris Diaw' | 'Suns' | 0 | + | 'Boris Diaw' | 'Hornets' | 0 | + | 'Boris Diaw' | 'Spurs' | 0 | + | 'Boris Diaw' | 'Jazz' | 0 | + | 'LeBron James' | 'Cavaliers' | 0 | + | 'LeBron James' | 'Heat' | 0 | + | 'LeBron James' | 'Cavaliers' | 1 | + | 'LeBron James' | 'Lakers' | 0 | + | 'Klay Thompson' | 'Warriors' | 0 | + | 'Kristaps Porzingis' | 'Knicks' | 0 | + | 'Kristaps Porzingis' | 'Mavericks' | 0 | + | 'Jonathon Simmons' | 'Spurs' | 0 | + | 'Jonathon Simmons' | 'Magic' | 0 | + | 'Jonathon Simmons' | '76ers' | 0 | + | 'Marco Belinelli' | 'Warriors' | 0 | + | 'Marco Belinelli' | 'Raptors' | 0 | + | 'Marco Belinelli' | 'Hornets' | 0 | + | 'Marco Belinelli' | 'Bulls' | 0 | + | 'Marco Belinelli' | 'Spurs' | 0 | + | 'Marco Belinelli' | 'Kings' | 0 | + | 'Marco Belinelli' | 'Hornets' | 1 | + | 'Marco Belinelli' | 'Hawks' | 0 | + | 'Marco Belinelli' | '76ers' | 0 | + | 'Marco Belinelli' | 'Spurs' | 1 | + | 'Luka Doncic' | 'Mavericks' | 0 | + | 'David West' | 'Hornets' | 0 | + | 'David West' | 'Pacers' | 0 | + | 'David West' | 'Spurs' | 0 | + | 'David West' | 'Warriors' | 0 | + | 'Tony Parker' | 'Spurs' | 0 | + | 'Tony Parker' | 'Hornets' | 0 | + | 'Danny Green' | 'Cavaliers' | 0 | + | 'Danny Green' | 'Spurs' | 0 | + | 'Danny Green' | 'Raptors' | 0 | + | 'Rudy Gay' | 'Grizzlies' | 0 | + | 'Rudy Gay' | 'Raptors' | 0 | + | 'Rudy Gay' | 'Kings' | 0 | + | 'Rudy Gay' | 'Spurs' | 0 | + | 'LaMarcus Aldridge' | 'Trail Blazers' | 0 | + | 'LaMarcus Aldridge' | 'Spurs' | 0 | + | 'Tim Duncan' | 'Spurs' | 0 | + | 'Kevin Durant' | 'Thunders' | 0 | + | 'Kevin Durant' | 'Warriors' | 0 | + | 'Stephen Curry' | 'Warriors' | 0 | + | 'Ray Allen' | 'Bucks' | 0 | + | 'Ray Allen' | 'Thunders' | 0 | + | 'Ray Allen' | 'Celtics' | 0 | + | 'Ray Allen' | 'Heat' | 0 | + | 'Tiago Splitter' | 'Spurs' | 0 | + | 'Tiago Splitter' | 'Hawks' | 0 | + | 'Tiago Splitter' | '76ers' | 0 | + | 'DeAndre Jordan' | 'Clippers' | 0 | + | 'DeAndre Jordan' | 'Mavericks' | 0 | + | 'DeAndre Jordan' | 'Knicks' | 0 | + | 'Paul Gasol' | 'Grizzlies' | 0 | + | 'Paul Gasol' | 'Lakers' | 0 | + | 'Paul Gasol' | 'Bulls' | 0 | + | 'Paul Gasol' | 'Spurs' | 0 | + | 'Paul Gasol' | 'Bucks' | 0 | + | 'Aron Baynes' | 'Spurs' | 0 | + | 'Aron Baynes' | 'Pistons' | 0 | + | 'Aron Baynes' | 'Celtics' | 0 | + | 'Cory Joseph' | 'Spurs' | 0 | + | 'Cory Joseph' | 'Raptors' | 0 | + | 'Cory Joseph' | 'Pacers' | 0 | + | 'Vince Carter' | 'Raptors' | 0 | + | 'Vince Carter' | 'Nets' | 0 | + | 'Vince Carter' | 'Magic' | 0 | + | 'Vince Carter' | 'Suns' | 0 | + | 'Vince Carter' | 'Mavericks' | 0 | + | 'Vince Carter' | 'Grizzlies' | 0 | + | 'Vince Carter' | 'Kings' | 0 | + | 'Vince Carter' | 'Hawks' | 0 | + | 'Marc Gasol' | 'Grizzlies' | 0 | + | 'Marc Gasol' | 'Raptors' | 0 | + | 'Ricky Rubio' | 'Timberwolves' | 0 | + | 'Ricky Rubio' | 'Jazz' | 0 | + | 'Ben Simmons' | '76ers' | 0 | + | 'Giannis Antetokounmpo' | 'Bucks' | 0 | + | 'Rajon Rondo' | 'Celtics' | 0 | + | 'Rajon Rondo' | 'Mavericks' | 0 | + | 'Rajon Rondo' | 'Kings' | 0 | + | 'Rajon Rondo' | 'Bulls' | 0 | + | 'Rajon Rondo' | 'Pelicans' | 0 | + | 'Rajon Rondo' | 'Lakers' | 0 | + | 'Manu Ginobili' | 'Spurs' | 0 | + | 'Kyrie Irving' | 'Cavaliers' | 0 | + | 'Kyrie Irving' | 'Celtics' | 0 | + | 'Carmelo Anthony' | 'Nuggets' | 0 | + | 'Carmelo Anthony' | 'Knicks' | 0 | + | 'Carmelo Anthony' | 'Thunders' | 0 | + | 'Carmelo Anthony' | 'Rockets' | 0 | + | 'Dwyane Wade' | 'Heat' | 0 | + | 'Dwyane Wade' | 'Bulls' | 0 | + | 'Dwyane Wade' | 'Cavaliers' | 0 | + | 'Dwyane Wade' | 'Heat' | 1 | + | 'Joel Embiid' | '76ers' | 0 | + | 'Damian Lillard' | 'Trail Blazers' | 0 | + | 'Yao Ming' | 'Rockets' | 0 | + | 'Kyle Anderson' | 'Spurs' | 0 | + | 'Kyle Anderson' | 'Grizzlies' | 0 | + | 'Dejounte Murray' | 'Spurs' | 0 | + | 'Blake Griffin' | 'Clippers' | 0 | + | 'Blake Griffin' | 'Pistons' | 0 | + | 'Steve Nash' | 'Suns' | 0 | + | 'Steve Nash' | 'Mavericks' | 0 | + | 'Steve Nash' | 'Suns' | 1 | + | 'Steve Nash' | 'Lakers' | 0 | + | 'Jason Kidd' | 'Mavericks' | 0 | + | 'Jason Kidd' | 'Suns' | 0 | + | 'Jason Kidd' | 'Nets' | 0 | + | 'Jason Kidd' | 'Mavericks' | 1 | + | 'Jason Kidd' | 'Knicks' | 0 | + | 'Dirk Nowitzki' | 'Mavericks' | 0 | + | 'Paul George' | 'Pacers' | 0 | + | 'Paul George' | 'Thunders' | 0 | + | 'Grant Hill' | 'Pistons' | 0 | + | 'Grant Hill' | 'Magic' | 0 | + | 'Grant Hill' | 'Suns' | 0 | + | 'Grant Hill' | 'Clippers' | 0 | + | "Shaquille O'Neal" | 'Magic' | 0 | + | "Shaquille O'Neal" | 'Lakers' | 0 | + | "Shaquille O'Neal" | 'Heat' | 0 | + | "Shaquille O'Neal" | 'Suns' | 0 | + | "Shaquille O'Neal" | 'Cavaliers' | 0 | + | "Shaquille O'Neal" | 'Celtics' | 0 | + | 'JaVale McGee' | 'Wizards' | 0 | + | 'JaVale McGee' | 'Nuggets' | 0 | + | 'JaVale McGee' | 'Mavericks' | 0 | + | 'JaVale McGee' | 'Warriors' | 0 | + | 'JaVale McGee' | 'Lakers' | 0 | + | 'Dwight Howard' | 'Magic' | 0 | + | 'Dwight Howard' | 'Lakers' | 0 | + | 'Dwight Howard' | 'Rockets' | 0 | + | 'Dwight Howard' | 'Hawks' | 0 | + | 'Dwight Howard' | 'Hornets' | 0 | + | 'Dwight Howard' | 'Wizards' | 0 | When executing query: """ LOOKUP ON serve YIELD serve.start_year AS startYear """ Then the result should be, in any order: - | SrcVID | DstVID | Ranking | startYear | - | "Amar'e Stoudemire" | 'Suns' | 0 | 2002 | - | "Amar'e Stoudemire" | 'Knicks' | 0 | 2010 | - | "Amar'e Stoudemire" | 'Heat' | 0 | 2015 | - | 'Russell Westbrook' | 'Thunders' | 0 | 2008 | - | 'James Harden' | 'Thunders' | 0 | 2009 | - | 'James Harden' | 'Rockets' | 0 | 2012 | - | 'Kobe Bryant' | 'Lakers' | 0 | 1996 | - | 'Tracy McGrady' | 'Raptors' | 0 | 1997 | - | 'Tracy McGrady' | 'Magic' | 0 | 2000 | - | 'Tracy McGrady' | 'Rockets' | 0 | 2004 | - | 'Tracy McGrady' | 'Spurs' | 0 | 2013 | - | 'Chris Paul' | 'Hornets' | 0 | 2005 | - | 'Chris Paul' | 'Clippers' | 0 | 2011 | - | 'Chris Paul' | 'Rockets' | 0 | 2017 | - | 'Boris Diaw' | 'Hawks' | 0 | 2003 | - | 'Boris Diaw' | 'Suns' | 0 | 2005 | - | 'Boris Diaw' | 'Hornets' | 0 | 2008 | - | 'Boris Diaw' | 'Spurs' | 0 | 2012 | - | 'Boris Diaw' | 'Jazz' | 0 | 2016 | - | 'LeBron James' | 'Cavaliers' | 0 | 2003 | - | 'LeBron James' | 'Heat' | 0 | 2010 | - | 'LeBron James' | 'Cavaliers' | 1 | 2014 | - | 'LeBron James' | 'Lakers' | 0 | 2018 | - | 'Klay Thompson' | 'Warriors' | 0 | 2011 | - | 'Kristaps Porzingis' | 'Knicks' | 0 | 2015 | - | 'Kristaps Porzingis' | 'Mavericks' | 0 | 2019 | - | 'Jonathon Simmons' | 'Spurs' | 0 | 2015 | - | 'Jonathon Simmons' | 'Magic' | 0 | 2017 | - | 'Jonathon Simmons' | '76ers' | 0 | 2019 | - | 'Marco Belinelli' | 'Warriors' | 0 | 2007 | - | 'Marco Belinelli' | 'Raptors' | 0 | 2009 | - | 'Marco Belinelli' | 'Hornets' | 0 | 2010 | - | 'Marco Belinelli' | 'Bulls' | 0 | 2012 | - | 'Marco Belinelli' | 'Spurs' | 0 | 2013 | - | 'Marco Belinelli' | 'Kings' | 0 | 2015 | - | 'Marco Belinelli' | 'Hornets' | 1 | 2016 | - | 'Marco Belinelli' | 'Hawks' | 0 | 2017 | - | 'Marco Belinelli' | '76ers' | 0 | 2018 | - | 'Marco Belinelli' | 'Spurs' | 1 | 2018 | - | 'Luka Doncic' | 'Mavericks' | 0 | 2018 | - | 'David West' | 'Hornets' | 0 | 2003 | - | 'David West' | 'Pacers' | 0 | 2011 | - | 'David West' | 'Spurs' | 0 | 2015 | - | 'David West' | 'Warriors' | 0 | 2016 | - | 'Tony Parker' | 'Spurs' | 0 | 1999 | - | 'Tony Parker' | 'Hornets' | 0 | 2018 | - | 'Danny Green' | 'Cavaliers' | 0 | 2009 | - | 'Danny Green' | 'Spurs' | 0 | 2010 | - | 'Danny Green' | 'Raptors' | 0 | 2018 | - | 'Rudy Gay' | 'Grizzlies' | 0 | 2006 | - | 'Rudy Gay' | 'Raptors' | 0 | 2013 | - | 'Rudy Gay' | 'Kings' | 0 | 2013 | - | 'Rudy Gay' | 'Spurs' | 0 | 2017 | - | 'LaMarcus Aldridge' | 'Trail Blazers' | 0 | 2006 | - | 'LaMarcus Aldridge' | 'Spurs' | 0 | 2015 | - | 'Tim Duncan' | 'Spurs' | 0 | 1997 | - | 'Kevin Durant' | 'Thunders' | 0 | 2007 | - | 'Kevin Durant' | 'Warriors' | 0 | 2016 | - | 'Stephen Curry' | 'Warriors' | 0 | 2009 | - | 'Ray Allen' | 'Bucks' | 0 | 1996 | - | 'Ray Allen' | 'Thunders' | 0 | 2003 | - | 'Ray Allen' | 'Celtics' | 0 | 2007 | - | 'Ray Allen' | 'Heat' | 0 | 2012 | - | 'Tiago Splitter' | 'Spurs' | 0 | 2010 | - | 'Tiago Splitter' | 'Hawks' | 0 | 2015 | - | 'Tiago Splitter' | '76ers' | 0 | 2017 | - | 'DeAndre Jordan' | 'Clippers' | 0 | 2008 | - | 'DeAndre Jordan' | 'Mavericks' | 0 | 2018 | - | 'DeAndre Jordan' | 'Knicks' | 0 | 2019 | - | 'Paul Gasol' | 'Grizzlies' | 0 | 2001 | - | 'Paul Gasol' | 'Lakers' | 0 | 2008 | - | 'Paul Gasol' | 'Bulls' | 0 | 2014 | - | 'Paul Gasol' | 'Spurs' | 0 | 2016 | - | 'Paul Gasol' | 'Bucks' | 0 | 2019 | - | 'Aron Baynes' | 'Spurs' | 0 | 2013 | - | 'Aron Baynes' | 'Pistons' | 0 | 2015 | - | 'Aron Baynes' | 'Celtics' | 0 | 2017 | - | 'Cory Joseph' | 'Spurs' | 0 | 2011 | - | 'Cory Joseph' | 'Raptors' | 0 | 2015 | - | 'Cory Joseph' | 'Pacers' | 0 | 2017 | - | 'Vince Carter' | 'Raptors' | 0 | 1998 | - | 'Vince Carter' | 'Nets' | 0 | 2004 | - | 'Vince Carter' | 'Magic' | 0 | 2009 | - | 'Vince Carter' | 'Suns' | 0 | 2010 | - | 'Vince Carter' | 'Mavericks' | 0 | 2011 | - | 'Vince Carter' | 'Grizzlies' | 0 | 2014 | - | 'Vince Carter' | 'Kings' | 0 | 2017 | - | 'Vince Carter' | 'Hawks' | 0 | 2018 | - | 'Marc Gasol' | 'Grizzlies' | 0 | 2008 | - | 'Marc Gasol' | 'Raptors' | 0 | 2019 | - | 'Ricky Rubio' | 'Timberwolves' | 0 | 2011 | - | 'Ricky Rubio' | 'Jazz' | 0 | 2017 | - | 'Ben Simmons' | '76ers' | 0 | 2016 | - | 'Giannis Antetokounmpo' | 'Bucks' | 0 | 2013 | - | 'Rajon Rondo' | 'Celtics' | 0 | 2006 | - | 'Rajon Rondo' | 'Mavericks' | 0 | 2014 | - | 'Rajon Rondo' | 'Kings' | 0 | 2015 | - | 'Rajon Rondo' | 'Bulls' | 0 | 2016 | - | 'Rajon Rondo' | 'Pelicans' | 0 | 2017 | - | 'Rajon Rondo' | 'Lakers' | 0 | 2018 | - | 'Manu Ginobili' | 'Spurs' | 0 | 2002 | - | 'Kyrie Irving' | 'Cavaliers' | 0 | 2011 | - | 'Kyrie Irving' | 'Celtics' | 0 | 2017 | - | 'Carmelo Anthony' | 'Nuggets' | 0 | 2003 | - | 'Carmelo Anthony' | 'Knicks' | 0 | 2011 | - | 'Carmelo Anthony' | 'Thunders' | 0 | 2017 | - | 'Carmelo Anthony' | 'Rockets' | 0 | 2018 | - | 'Dwyane Wade' | 'Heat' | 0 | 2003 | - | 'Dwyane Wade' | 'Bulls' | 0 | 2016 | - | 'Dwyane Wade' | 'Cavaliers' | 0 | 2017 | - | 'Dwyane Wade' | 'Heat' | 1 | 2018 | - | 'Joel Embiid' | '76ers' | 0 | 2014 | - | 'Damian Lillard' | 'Trail Blazers' | 0 | 2012 | - | 'Yao Ming' | 'Rockets' | 0 | 2002 | - | 'Kyle Anderson' | 'Spurs' | 0 | 2014 | - | 'Kyle Anderson' | 'Grizzlies' | 0 | 2018 | - | 'Dejounte Murray' | 'Spurs' | 0 | 2016 | - | 'Blake Griffin' | 'Clippers' | 0 | 2009 | - | 'Blake Griffin' | 'Pistons' | 0 | 2018 | - | 'Steve Nash' | 'Suns' | 0 | 1996 | - | 'Steve Nash' | 'Mavericks' | 0 | 1998 | - | 'Steve Nash' | 'Suns' | 1 | 2004 | - | 'Steve Nash' | 'Lakers' | 0 | 2012 | - | 'Jason Kidd' | 'Mavericks' | 0 | 1994 | - | 'Jason Kidd' | 'Suns' | 0 | 1996 | - | 'Jason Kidd' | 'Nets' | 0 | 2001 | - | 'Jason Kidd' | 'Mavericks' | 1 | 2008 | - | 'Jason Kidd' | 'Knicks' | 0 | 2012 | - | 'Dirk Nowitzki' | 'Mavericks' | 0 | 1998 | - | 'Paul George' | 'Pacers' | 0 | 2010 | - | 'Paul George' | 'Thunders' | 0 | 2017 | - | 'Grant Hill' | 'Pistons' | 0 | 1994 | - | 'Grant Hill' | 'Magic' | 0 | 2000 | - | 'Grant Hill' | 'Suns' | 0 | 2007 | - | 'Grant Hill' | 'Clippers' | 0 | 2012 | - | "Shaquille O'Neal" | 'Magic' | 0 | 1992 | - | "Shaquille O'Neal" | 'Lakers' | 0 | 1996 | - | "Shaquille O'Neal" | 'Heat' | 0 | 2004 | - | "Shaquille O'Neal" | 'Suns' | 0 | 2008 | - | "Shaquille O'Neal" | 'Cavaliers' | 0 | 2009 | - | "Shaquille O'Neal" | 'Celtics' | 0 | 2010 | - | 'JaVale McGee' | 'Wizards' | 0 | 2008 | - | 'JaVale McGee' | 'Nuggets' | 0 | 2012 | - | 'JaVale McGee' | 'Mavericks' | 0 | 2015 | - | 'JaVale McGee' | 'Warriors' | 0 | 2016 | - | 'JaVale McGee' | 'Lakers' | 0 | 2018 | - | 'Dwight Howard' | 'Magic' | 0 | 2004 | - | 'Dwight Howard' | 'Lakers' | 0 | 2012 | - | 'Dwight Howard' | 'Rockets' | 0 | 2013 | - | 'Dwight Howard' | 'Hawks' | 0 | 2016 | - | 'Dwight Howard' | 'Hornets' | 0 | 2017 | - | 'Dwight Howard' | 'Wizards' | 0 | 2018 | + | startYear | + | 2002 | + | 2010 | + | 2015 | + | 2008 | + | 2009 | + | 2012 | + | 1996 | + | 1997 | + | 2000 | + | 2004 | + | 2013 | + | 2005 | + | 2011 | + | 2017 | + | 2003 | + | 2005 | + | 2008 | + | 2012 | + | 2016 | + | 2003 | + | 2010 | + | 2014 | + | 2018 | + | 2011 | + | 2015 | + | 2019 | + | 2015 | + | 2017 | + | 2019 | + | 2007 | + | 2009 | + | 2010 | + | 2012 | + | 2013 | + | 2015 | + | 2016 | + | 2017 | + | 2018 | + | 2018 | + | 2018 | + | 2003 | + | 2011 | + | 2015 | + | 2016 | + | 1999 | + | 2018 | + | 2009 | + | 2010 | + | 2018 | + | 2006 | + | 2013 | + | 2013 | + | 2017 | + | 2006 | + | 2015 | + | 1997 | + | 2007 | + | 2016 | + | 2009 | + | 1996 | + | 2003 | + | 2007 | + | 2012 | + | 2010 | + | 2015 | + | 2017 | + | 2008 | + | 2018 | + | 2019 | + | 2001 | + | 2008 | + | 2014 | + | 2016 | + | 2019 | + | 2013 | + | 2015 | + | 2017 | + | 2011 | + | 2015 | + | 2017 | + | 1998 | + | 2004 | + | 2009 | + | 2010 | + | 2011 | + | 2014 | + | 2017 | + | 2018 | + | 2008 | + | 2019 | + | 2011 | + | 2017 | + | 2016 | + | 2013 | + | 2006 | + | 2014 | + | 2015 | + | 2016 | + | 2017 | + | 2018 | + | 2002 | + | 2011 | + | 2017 | + | 2003 | + | 2011 | + | 2017 | + | 2018 | + | 2003 | + | 2016 | + | 2017 | + | 2018 | + | 2014 | + | 2012 | + | 2002 | + | 2014 | + | 2018 | + | 2016 | + | 2009 | + | 2018 | + | 1996 | + | 1998 | + | 2004 | + | 2012 | + | 1994 | + | 1996 | + | 2001 | + | 2008 | + | 2012 | + | 1998 | + | 2010 | + | 2017 | + | 1994 | + | 2000 | + | 2007 | + | 2012 | + | 1992 | + | 1996 | + | 2004 | + | 2008 | + | 2009 | + | 2010 | + | 2008 | + | 2012 | + | 2015 | + | 2016 | + | 2018 | + | 2004 | + | 2012 | + | 2013 | + | 2016 | + | 2017 | + | 2018 | Scenario: [2] Edge TODO Given a graph with space named "nba" When executing query: """ - LOOKUP ON serve WHERE 1 + 1 == 2 + LOOKUP ON serve WHERE 1 + 1 == 2 YIELD serve.start_year """ Then a SemanticError should be raised at runtime: When executing query: @@ -434,7 +434,7 @@ Feature: Lookup by index itself Then a SemanticError should be raised at runtime: When executing query: """ - LOOKUP ON serve WHERE serve.start_year == serve.end_year + LOOKUP ON serve WHERE serve.start_year == serve.end_year YIELD edge as e """ Then a SemanticError should be raised at runtime: When executing query: @@ -447,18 +447,18 @@ Feature: Lookup by index itself Given a graph with space named "nba" When executing query: """ - LOOKUP ON player WHERE player.age == 40 YIELD player.age AS Age + LOOKUP ON player WHERE player.age == 40 YIELD id(vertex) as name, player.age AS Age """ Then the result should be, in any order: - | VertexID | Age | + | name | Age | | "Dirk Nowitzki" | 40 | | "Kobe Bryant" | 40 | When executing query: """ - LOOKUP ON player WHERE player.age > 40 YIELD player.age AS Age + LOOKUP ON player WHERE player.age > 40 YIELD id(vertex) as name, player.age AS Age """ Then the result should be, in any order: - | VertexID | Age | + | name | Age | | "Grant Hill" | 46 | | "Jason Kidd" | 45 | | "Manu Ginobili" | 41 | @@ -469,10 +469,10 @@ Feature: Lookup by index itself | "Vince Carter" | 42 | When executing query: """ - LOOKUP ON player WHERE player.age >= 40.0 YIELD player.age AS Age + LOOKUP ON player WHERE player.age >= 40.0 YIELD id(vertex) as name, player.age AS Age """ Then the result should be, in any order: - | VertexID | Age | + | name | Age | | "Grant Hill" | 46 | | "Jason Kidd" | 45 | | "Manu Ginobili" | 41 | @@ -485,10 +485,10 @@ Feature: Lookup by index itself | "Kobe Bryant" | 40 | When executing query: """ - LOOKUP ON player WHERE player.age > 40.5 YIELD player.age AS Age + LOOKUP ON player WHERE player.age > 40.5 YIELD id(vertex) as name, player.age AS Age """ Then the result should be, in any order: - | VertexID | Age | + | name | Age | | "Grant Hill" | 46 | | "Jason Kidd" | 45 | | "Manu Ginobili" | 41 | @@ -499,10 +499,10 @@ Feature: Lookup by index itself | "Vince Carter" | 42 | When executing query: """ - LOOKUP ON player WHERE player.age >= 40.5 YIELD player.age AS Age + LOOKUP ON player WHERE player.age >= 40.5 YIELD id(vertex) as name, player.age AS Age """ Then the result should be, in any order: - | VertexID | Age | + | name | Age | | "Grant Hill" | 46 | | "Jason Kidd" | 45 | | "Manu Ginobili" | 41 | @@ -517,34 +517,34 @@ Feature: Lookup by index itself YIELD player.age AS Age, player.name AS Name | order by $-.Age DESC, $-.Name| limit 10 """ Then the result should be, in order, with relax comparison: - | VertexID | Age | Name | - | "Tracy McGrady" | 39 | "Tracy McGrady" | - | "David West" | 38 | "David West" | - | "Paul Gasol" | 38 | "Paul Gasol" | - | "Yao Ming" | 38 | "Yao Ming" | - | "Dwyane Wade" | 37 | "Dwyane Wade" | - | "Amar'e Stoudemire" | 36 | "Amar'e Stoudemire" | - | "Boris Diaw" | 36 | "Boris Diaw" | - | "Tony Parker" | 36 | "Tony Parker" | - | "Carmelo Anthony" | 34 | "Carmelo Anthony" | - | "LeBron James" | 34 | "LeBron James" | + | Age | Name | + | 39 | "Tracy McGrady" | + | 38 | "David West" | + | 38 | "Paul Gasol" | + | 38 | "Yao Ming" | + | 37 | "Dwyane Wade" | + | 36 | "Amar'e Stoudemire" | + | 36 | "Boris Diaw" | + | 36 | "Tony Parker" | + | 34 | "Carmelo Anthony" | + | 34 | "LeBron James" | When executing query: """ LOOKUP ON player WHERE player.age <= 40 YIELD player.age AS Age, player.name AS Name | order by $-.Age DESC, $-.Name| limit 10 """ Then the result should be, in order, with relax comparison: - | VertexID | Age | Name | - | "Dirk Nowitzki" | 40 | "Dirk Nowitzki" | - | "Kobe Bryant" | 40 | "Kobe Bryant" | - | "Tracy McGrady" | 39 | "Tracy McGrady" | - | "David West" | 38 | "David West" | - | "Paul Gasol" | 38 | "Paul Gasol" | - | "Yao Ming" | 38 | "Yao Ming" | - | "Dwyane Wade" | 37 | "Dwyane Wade" | - | "Amar'e Stoudemire" | 36 | "Amar'e Stoudemire" | - | "Boris Diaw" | 36 | "Boris Diaw" | - | "Tony Parker" | 36 | "Tony Parker" | + | Age | Name | + | 40 | "Dirk Nowitzki" | + | 40 | "Kobe Bryant" | + | 39 | "Tracy McGrady" | + | 38 | "David West" | + | 38 | "Paul Gasol" | + | 38 | "Yao Ming" | + | 37 | "Dwyane Wade" | + | 36 | "Amar'e Stoudemire" | + | 36 | "Boris Diaw" | + | 36 | "Tony Parker" | Scenario: [2] Compare INT and FLOAT during IndexScan Given an empty graph @@ -563,26 +563,26 @@ Feature: Lookup by index itself Then the execution should be successful When executing query: """ - LOOKUP ON weight WHERE weight.WEIGHT > 70; + LOOKUP ON weight WHERE weight.WEIGHT > 70 YIELD id(vertex) as name; """ Then the result should be, in any order: - | VertexID | + | name | | "Tim Duncan" | | "Tony Parker" | When executing query: """ - LOOKUP ON weight WHERE weight.WEIGHT > 70.4; + LOOKUP ON weight WHERE weight.WEIGHT > 70.4 YIELD id(vertex) as name; """ Then the result should be, in any order: - | VertexID | + | name | | "Tim Duncan" | | "Tony Parker" | When executing query: """ - LOOKUP ON weight WHERE weight.WEIGHT >= 70.5; + LOOKUP ON weight WHERE weight.WEIGHT >= 70.5 YIELD id(vertex) as name; """ Then the result should be, in any order: - | VertexID | + | name | | "Tim Duncan" | | "Tony Parker" | Then drop the used space diff --git a/tests/tck/features/lookup/ByIndex.intVid.feature b/tests/tck/features/lookup/ByIndex.intVid.feature index 5dd9e4aaa5c..32e74287447 100644 --- a/tests/tck/features/lookup/ByIndex.intVid.feature +++ b/tests/tck/features/lookup/ByIndex.intVid.feature @@ -7,10 +7,10 @@ Feature: Lookup by index itself in integer vid Given a graph with space named "nba_int_vid" When executing query: """ - LOOKUP ON team + LOOKUP ON team YIELD id(vertex) as name """ Then the result should be, in any order, and the columns 0 should be hashed: - | VertexID | + | name | | 'Nets' | | 'Pistons' | | 'Bucks' | @@ -43,10 +43,10 @@ Feature: Lookup by index itself in integer vid | 'Bulls' | When executing query: """ - LOOKUP ON team YIELD team.name AS Name + LOOKUP ON team YIELD id(vertex) as id, team.name AS Name """ Then the result should be, in any order, and the columns 0 should be hashed: - | VertexID | Name | + | id | Name | | 'Nets' | 'Nets' | | 'Pistons' | 'Pistons' | | 'Bucks' | 'Bucks' | @@ -82,7 +82,7 @@ Feature: Lookup by index itself in integer vid Given a graph with space named "nba_int_vid" When executing query: """ - LOOKUP ON team WHERE 1 + 1 == 2 + LOOKUP ON team WHERE 1 + 1 == 2 YIELD vertex as node """ Then a SemanticError should be raised at runtime: When executing query: @@ -92,12 +92,12 @@ Feature: Lookup by index itself in integer vid Then a SemanticError should be raised at runtime: When executing query: """ - LOOKUP ON player WHERE player.age > 9223372036854775807+1 + LOOKUP ON player WHERE player.age > 9223372036854775807+1 YIELD vertex as node """ Then a SemanticError should be raised at runtime: result of (9223372036854775807+1) cannot be represented as an integer When executing query: """ - LOOKUP ON player WHERE player.age > -9223372036854775808-1 + LOOKUP ON player WHERE player.age > -9223372036854775808-1 YIELD vertex as node """ Then a SemanticError should be raised at runtime: result of (-9223372036854775808-1) cannot be represented as an integer @@ -105,326 +105,326 @@ Feature: Lookup by index itself in integer vid Given a graph with space named "nba_int_vid" When executing query: """ - LOOKUP ON serve + LOOKUP ON serve YIELD src(edge) as src, dst(edge) as dst, rank(edge) as rank """ Then the result should be, in any order, and the columns 0,1 should be hashed: - | SrcVID | DstVID | Ranking | - | "Amar'e Stoudemire" | 'Suns' | 0 | - | "Amar'e Stoudemire" | 'Knicks' | 0 | - | "Amar'e Stoudemire" | 'Heat' | 0 | - | 'Russell Westbrook' | 'Thunders' | 0 | - | 'James Harden' | 'Thunders' | 0 | - | 'James Harden' | 'Rockets' | 0 | - | 'Kobe Bryant' | 'Lakers' | 0 | - | 'Tracy McGrady' | 'Raptors' | 0 | - | 'Tracy McGrady' | 'Magic' | 0 | - | 'Tracy McGrady' | 'Rockets' | 0 | - | 'Tracy McGrady' | 'Spurs' | 0 | - | 'Chris Paul' | 'Hornets' | 0 | - | 'Chris Paul' | 'Clippers' | 0 | - | 'Chris Paul' | 'Rockets' | 0 | - | 'Boris Diaw' | 'Hawks' | 0 | - | 'Boris Diaw' | 'Suns' | 0 | - | 'Boris Diaw' | 'Hornets' | 0 | - | 'Boris Diaw' | 'Spurs' | 0 | - | 'Boris Diaw' | 'Jazz' | 0 | - | 'LeBron James' | 'Cavaliers' | 0 | - | 'LeBron James' | 'Heat' | 0 | - | 'LeBron James' | 'Cavaliers' | 1 | - | 'LeBron James' | 'Lakers' | 0 | - | 'Klay Thompson' | 'Warriors' | 0 | - | 'Kristaps Porzingis' | 'Knicks' | 0 | - | 'Kristaps Porzingis' | 'Mavericks' | 0 | - | 'Jonathon Simmons' | 'Spurs' | 0 | - | 'Jonathon Simmons' | 'Magic' | 0 | - | 'Jonathon Simmons' | '76ers' | 0 | - | 'Marco Belinelli' | 'Warriors' | 0 | - | 'Marco Belinelli' | 'Raptors' | 0 | - | 'Marco Belinelli' | 'Hornets' | 0 | - | 'Marco Belinelli' | 'Bulls' | 0 | - | 'Marco Belinelli' | 'Spurs' | 0 | - | 'Marco Belinelli' | 'Kings' | 0 | - | 'Marco Belinelli' | 'Hornets' | 1 | - | 'Marco Belinelli' | 'Hawks' | 0 | - | 'Marco Belinelli' | '76ers' | 0 | - | 'Marco Belinelli' | 'Spurs' | 1 | - | 'Luka Doncic' | 'Mavericks' | 0 | - | 'David West' | 'Hornets' | 0 | - | 'David West' | 'Pacers' | 0 | - | 'David West' | 'Spurs' | 0 | - | 'David West' | 'Warriors' | 0 | - | 'Tony Parker' | 'Spurs' | 0 | - | 'Tony Parker' | 'Hornets' | 0 | - | 'Danny Green' | 'Cavaliers' | 0 | - | 'Danny Green' | 'Spurs' | 0 | - | 'Danny Green' | 'Raptors' | 0 | - | 'Rudy Gay' | 'Grizzlies' | 0 | - | 'Rudy Gay' | 'Raptors' | 0 | - | 'Rudy Gay' | 'Kings' | 0 | - | 'Rudy Gay' | 'Spurs' | 0 | - | 'LaMarcus Aldridge' | 'Trail Blazers' | 0 | - | 'LaMarcus Aldridge' | 'Spurs' | 0 | - | 'Tim Duncan' | 'Spurs' | 0 | - | 'Kevin Durant' | 'Thunders' | 0 | - | 'Kevin Durant' | 'Warriors' | 0 | - | 'Stephen Curry' | 'Warriors' | 0 | - | 'Ray Allen' | 'Bucks' | 0 | - | 'Ray Allen' | 'Thunders' | 0 | - | 'Ray Allen' | 'Celtics' | 0 | - | 'Ray Allen' | 'Heat' | 0 | - | 'Tiago Splitter' | 'Spurs' | 0 | - | 'Tiago Splitter' | 'Hawks' | 0 | - | 'Tiago Splitter' | '76ers' | 0 | - | 'DeAndre Jordan' | 'Clippers' | 0 | - | 'DeAndre Jordan' | 'Mavericks' | 0 | - | 'DeAndre Jordan' | 'Knicks' | 0 | - | 'Paul Gasol' | 'Grizzlies' | 0 | - | 'Paul Gasol' | 'Lakers' | 0 | - | 'Paul Gasol' | 'Bulls' | 0 | - | 'Paul Gasol' | 'Spurs' | 0 | - | 'Paul Gasol' | 'Bucks' | 0 | - | 'Aron Baynes' | 'Spurs' | 0 | - | 'Aron Baynes' | 'Pistons' | 0 | - | 'Aron Baynes' | 'Celtics' | 0 | - | 'Cory Joseph' | 'Spurs' | 0 | - | 'Cory Joseph' | 'Raptors' | 0 | - | 'Cory Joseph' | 'Pacers' | 0 | - | 'Vince Carter' | 'Raptors' | 0 | - | 'Vince Carter' | 'Nets' | 0 | - | 'Vince Carter' | 'Magic' | 0 | - | 'Vince Carter' | 'Suns' | 0 | - | 'Vince Carter' | 'Mavericks' | 0 | - | 'Vince Carter' | 'Grizzlies' | 0 | - | 'Vince Carter' | 'Kings' | 0 | - | 'Vince Carter' | 'Hawks' | 0 | - | 'Marc Gasol' | 'Grizzlies' | 0 | - | 'Marc Gasol' | 'Raptors' | 0 | - | 'Ricky Rubio' | 'Timberwolves' | 0 | - | 'Ricky Rubio' | 'Jazz' | 0 | - | 'Ben Simmons' | '76ers' | 0 | - | 'Giannis Antetokounmpo' | 'Bucks' | 0 | - | 'Rajon Rondo' | 'Celtics' | 0 | - | 'Rajon Rondo' | 'Mavericks' | 0 | - | 'Rajon Rondo' | 'Kings' | 0 | - | 'Rajon Rondo' | 'Bulls' | 0 | - | 'Rajon Rondo' | 'Pelicans' | 0 | - | 'Rajon Rondo' | 'Lakers' | 0 | - | 'Manu Ginobili' | 'Spurs' | 0 | - | 'Kyrie Irving' | 'Cavaliers' | 0 | - | 'Kyrie Irving' | 'Celtics' | 0 | - | 'Carmelo Anthony' | 'Nuggets' | 0 | - | 'Carmelo Anthony' | 'Knicks' | 0 | - | 'Carmelo Anthony' | 'Thunders' | 0 | - | 'Carmelo Anthony' | 'Rockets' | 0 | - | 'Dwyane Wade' | 'Heat' | 0 | - | 'Dwyane Wade' | 'Bulls' | 0 | - | 'Dwyane Wade' | 'Cavaliers' | 0 | - | 'Dwyane Wade' | 'Heat' | 1 | - | 'Joel Embiid' | '76ers' | 0 | - | 'Damian Lillard' | 'Trail Blazers' | 0 | - | 'Yao Ming' | 'Rockets' | 0 | - | 'Kyle Anderson' | 'Spurs' | 0 | - | 'Kyle Anderson' | 'Grizzlies' | 0 | - | 'Dejounte Murray' | 'Spurs' | 0 | - | 'Blake Griffin' | 'Clippers' | 0 | - | 'Blake Griffin' | 'Pistons' | 0 | - | 'Steve Nash' | 'Suns' | 0 | - | 'Steve Nash' | 'Mavericks' | 0 | - | 'Steve Nash' | 'Suns' | 1 | - | 'Steve Nash' | 'Lakers' | 0 | - | 'Jason Kidd' | 'Mavericks' | 0 | - | 'Jason Kidd' | 'Suns' | 0 | - | 'Jason Kidd' | 'Nets' | 0 | - | 'Jason Kidd' | 'Mavericks' | 1 | - | 'Jason Kidd' | 'Knicks' | 0 | - | 'Dirk Nowitzki' | 'Mavericks' | 0 | - | 'Paul George' | 'Pacers' | 0 | - | 'Paul George' | 'Thunders' | 0 | - | 'Grant Hill' | 'Pistons' | 0 | - | 'Grant Hill' | 'Magic' | 0 | - | 'Grant Hill' | 'Suns' | 0 | - | 'Grant Hill' | 'Clippers' | 0 | - | "Shaquille O'Neal" | 'Magic' | 0 | - | "Shaquille O'Neal" | 'Lakers' | 0 | - | "Shaquille O'Neal" | 'Heat' | 0 | - | "Shaquille O'Neal" | 'Suns' | 0 | - | "Shaquille O'Neal" | 'Cavaliers' | 0 | - | "Shaquille O'Neal" | 'Celtics' | 0 | - | 'JaVale McGee' | 'Wizards' | 0 | - | 'JaVale McGee' | 'Nuggets' | 0 | - | 'JaVale McGee' | 'Mavericks' | 0 | - | 'JaVale McGee' | 'Warriors' | 0 | - | 'JaVale McGee' | 'Lakers' | 0 | - | 'Dwight Howard' | 'Magic' | 0 | - | 'Dwight Howard' | 'Lakers' | 0 | - | 'Dwight Howard' | 'Rockets' | 0 | - | 'Dwight Howard' | 'Hawks' | 0 | - | 'Dwight Howard' | 'Hornets' | 0 | - | 'Dwight Howard' | 'Wizards' | 0 | + | src | dst | rank | + | "Amar'e Stoudemire" | 'Suns' | 0 | + | "Amar'e Stoudemire" | 'Knicks' | 0 | + | "Amar'e Stoudemire" | 'Heat' | 0 | + | 'Russell Westbrook' | 'Thunders' | 0 | + | 'James Harden' | 'Thunders' | 0 | + | 'James Harden' | 'Rockets' | 0 | + | 'Kobe Bryant' | 'Lakers' | 0 | + | 'Tracy McGrady' | 'Raptors' | 0 | + | 'Tracy McGrady' | 'Magic' | 0 | + | 'Tracy McGrady' | 'Rockets' | 0 | + | 'Tracy McGrady' | 'Spurs' | 0 | + | 'Chris Paul' | 'Hornets' | 0 | + | 'Chris Paul' | 'Clippers' | 0 | + | 'Chris Paul' | 'Rockets' | 0 | + | 'Boris Diaw' | 'Hawks' | 0 | + | 'Boris Diaw' | 'Suns' | 0 | + | 'Boris Diaw' | 'Hornets' | 0 | + | 'Boris Diaw' | 'Spurs' | 0 | + | 'Boris Diaw' | 'Jazz' | 0 | + | 'LeBron James' | 'Cavaliers' | 0 | + | 'LeBron James' | 'Heat' | 0 | + | 'LeBron James' | 'Cavaliers' | 1 | + | 'LeBron James' | 'Lakers' | 0 | + | 'Klay Thompson' | 'Warriors' | 0 | + | 'Kristaps Porzingis' | 'Knicks' | 0 | + | 'Kristaps Porzingis' | 'Mavericks' | 0 | + | 'Jonathon Simmons' | 'Spurs' | 0 | + | 'Jonathon Simmons' | 'Magic' | 0 | + | 'Jonathon Simmons' | '76ers' | 0 | + | 'Marco Belinelli' | 'Warriors' | 0 | + | 'Marco Belinelli' | 'Raptors' | 0 | + | 'Marco Belinelli' | 'Hornets' | 0 | + | 'Marco Belinelli' | 'Bulls' | 0 | + | 'Marco Belinelli' | 'Spurs' | 0 | + | 'Marco Belinelli' | 'Kings' | 0 | + | 'Marco Belinelli' | 'Hornets' | 1 | + | 'Marco Belinelli' | 'Hawks' | 0 | + | 'Marco Belinelli' | '76ers' | 0 | + | 'Marco Belinelli' | 'Spurs' | 1 | + | 'Luka Doncic' | 'Mavericks' | 0 | + | 'David West' | 'Hornets' | 0 | + | 'David West' | 'Pacers' | 0 | + | 'David West' | 'Spurs' | 0 | + | 'David West' | 'Warriors' | 0 | + | 'Tony Parker' | 'Spurs' | 0 | + | 'Tony Parker' | 'Hornets' | 0 | + | 'Danny Green' | 'Cavaliers' | 0 | + | 'Danny Green' | 'Spurs' | 0 | + | 'Danny Green' | 'Raptors' | 0 | + | 'Rudy Gay' | 'Grizzlies' | 0 | + | 'Rudy Gay' | 'Raptors' | 0 | + | 'Rudy Gay' | 'Kings' | 0 | + | 'Rudy Gay' | 'Spurs' | 0 | + | 'LaMarcus Aldridge' | 'Trail Blazers' | 0 | + | 'LaMarcus Aldridge' | 'Spurs' | 0 | + | 'Tim Duncan' | 'Spurs' | 0 | + | 'Kevin Durant' | 'Thunders' | 0 | + | 'Kevin Durant' | 'Warriors' | 0 | + | 'Stephen Curry' | 'Warriors' | 0 | + | 'Ray Allen' | 'Bucks' | 0 | + | 'Ray Allen' | 'Thunders' | 0 | + | 'Ray Allen' | 'Celtics' | 0 | + | 'Ray Allen' | 'Heat' | 0 | + | 'Tiago Splitter' | 'Spurs' | 0 | + | 'Tiago Splitter' | 'Hawks' | 0 | + | 'Tiago Splitter' | '76ers' | 0 | + | 'DeAndre Jordan' | 'Clippers' | 0 | + | 'DeAndre Jordan' | 'Mavericks' | 0 | + | 'DeAndre Jordan' | 'Knicks' | 0 | + | 'Paul Gasol' | 'Grizzlies' | 0 | + | 'Paul Gasol' | 'Lakers' | 0 | + | 'Paul Gasol' | 'Bulls' | 0 | + | 'Paul Gasol' | 'Spurs' | 0 | + | 'Paul Gasol' | 'Bucks' | 0 | + | 'Aron Baynes' | 'Spurs' | 0 | + | 'Aron Baynes' | 'Pistons' | 0 | + | 'Aron Baynes' | 'Celtics' | 0 | + | 'Cory Joseph' | 'Spurs' | 0 | + | 'Cory Joseph' | 'Raptors' | 0 | + | 'Cory Joseph' | 'Pacers' | 0 | + | 'Vince Carter' | 'Raptors' | 0 | + | 'Vince Carter' | 'Nets' | 0 | + | 'Vince Carter' | 'Magic' | 0 | + | 'Vince Carter' | 'Suns' | 0 | + | 'Vince Carter' | 'Mavericks' | 0 | + | 'Vince Carter' | 'Grizzlies' | 0 | + | 'Vince Carter' | 'Kings' | 0 | + | 'Vince Carter' | 'Hawks' | 0 | + | 'Marc Gasol' | 'Grizzlies' | 0 | + | 'Marc Gasol' | 'Raptors' | 0 | + | 'Ricky Rubio' | 'Timberwolves' | 0 | + | 'Ricky Rubio' | 'Jazz' | 0 | + | 'Ben Simmons' | '76ers' | 0 | + | 'Giannis Antetokounmpo' | 'Bucks' | 0 | + | 'Rajon Rondo' | 'Celtics' | 0 | + | 'Rajon Rondo' | 'Mavericks' | 0 | + | 'Rajon Rondo' | 'Kings' | 0 | + | 'Rajon Rondo' | 'Bulls' | 0 | + | 'Rajon Rondo' | 'Pelicans' | 0 | + | 'Rajon Rondo' | 'Lakers' | 0 | + | 'Manu Ginobili' | 'Spurs' | 0 | + | 'Kyrie Irving' | 'Cavaliers' | 0 | + | 'Kyrie Irving' | 'Celtics' | 0 | + | 'Carmelo Anthony' | 'Nuggets' | 0 | + | 'Carmelo Anthony' | 'Knicks' | 0 | + | 'Carmelo Anthony' | 'Thunders' | 0 | + | 'Carmelo Anthony' | 'Rockets' | 0 | + | 'Dwyane Wade' | 'Heat' | 0 | + | 'Dwyane Wade' | 'Bulls' | 0 | + | 'Dwyane Wade' | 'Cavaliers' | 0 | + | 'Dwyane Wade' | 'Heat' | 1 | + | 'Joel Embiid' | '76ers' | 0 | + | 'Damian Lillard' | 'Trail Blazers' | 0 | + | 'Yao Ming' | 'Rockets' | 0 | + | 'Kyle Anderson' | 'Spurs' | 0 | + | 'Kyle Anderson' | 'Grizzlies' | 0 | + | 'Dejounte Murray' | 'Spurs' | 0 | + | 'Blake Griffin' | 'Clippers' | 0 | + | 'Blake Griffin' | 'Pistons' | 0 | + | 'Steve Nash' | 'Suns' | 0 | + | 'Steve Nash' | 'Mavericks' | 0 | + | 'Steve Nash' | 'Suns' | 1 | + | 'Steve Nash' | 'Lakers' | 0 | + | 'Jason Kidd' | 'Mavericks' | 0 | + | 'Jason Kidd' | 'Suns' | 0 | + | 'Jason Kidd' | 'Nets' | 0 | + | 'Jason Kidd' | 'Mavericks' | 1 | + | 'Jason Kidd' | 'Knicks' | 0 | + | 'Dirk Nowitzki' | 'Mavericks' | 0 | + | 'Paul George' | 'Pacers' | 0 | + | 'Paul George' | 'Thunders' | 0 | + | 'Grant Hill' | 'Pistons' | 0 | + | 'Grant Hill' | 'Magic' | 0 | + | 'Grant Hill' | 'Suns' | 0 | + | 'Grant Hill' | 'Clippers' | 0 | + | "Shaquille O'Neal" | 'Magic' | 0 | + | "Shaquille O'Neal" | 'Lakers' | 0 | + | "Shaquille O'Neal" | 'Heat' | 0 | + | "Shaquille O'Neal" | 'Suns' | 0 | + | "Shaquille O'Neal" | 'Cavaliers' | 0 | + | "Shaquille O'Neal" | 'Celtics' | 0 | + | 'JaVale McGee' | 'Wizards' | 0 | + | 'JaVale McGee' | 'Nuggets' | 0 | + | 'JaVale McGee' | 'Mavericks' | 0 | + | 'JaVale McGee' | 'Warriors' | 0 | + | 'JaVale McGee' | 'Lakers' | 0 | + | 'Dwight Howard' | 'Magic' | 0 | + | 'Dwight Howard' | 'Lakers' | 0 | + | 'Dwight Howard' | 'Rockets' | 0 | + | 'Dwight Howard' | 'Hawks' | 0 | + | 'Dwight Howard' | 'Hornets' | 0 | + | 'Dwight Howard' | 'Wizards' | 0 | When executing query: """ LOOKUP ON serve YIELD serve.start_year AS startYear """ - Then the result should be, in any order, and the columns 0,1 should be hashed: - | SrcVID | DstVID | Ranking | startYear | - | "Amar'e Stoudemire" | 'Suns' | 0 | 2002 | - | "Amar'e Stoudemire" | 'Knicks' | 0 | 2010 | - | "Amar'e Stoudemire" | 'Heat' | 0 | 2015 | - | 'Russell Westbrook' | 'Thunders' | 0 | 2008 | - | 'James Harden' | 'Thunders' | 0 | 2009 | - | 'James Harden' | 'Rockets' | 0 | 2012 | - | 'Kobe Bryant' | 'Lakers' | 0 | 1996 | - | 'Tracy McGrady' | 'Raptors' | 0 | 1997 | - | 'Tracy McGrady' | 'Magic' | 0 | 2000 | - | 'Tracy McGrady' | 'Rockets' | 0 | 2004 | - | 'Tracy McGrady' | 'Spurs' | 0 | 2013 | - | 'Chris Paul' | 'Hornets' | 0 | 2005 | - | 'Chris Paul' | 'Clippers' | 0 | 2011 | - | 'Chris Paul' | 'Rockets' | 0 | 2017 | - | 'Boris Diaw' | 'Hawks' | 0 | 2003 | - | 'Boris Diaw' | 'Suns' | 0 | 2005 | - | 'Boris Diaw' | 'Hornets' | 0 | 2008 | - | 'Boris Diaw' | 'Spurs' | 0 | 2012 | - | 'Boris Diaw' | 'Jazz' | 0 | 2016 | - | 'LeBron James' | 'Cavaliers' | 0 | 2003 | - | 'LeBron James' | 'Heat' | 0 | 2010 | - | 'LeBron James' | 'Cavaliers' | 1 | 2014 | - | 'LeBron James' | 'Lakers' | 0 | 2018 | - | 'Klay Thompson' | 'Warriors' | 0 | 2011 | - | 'Kristaps Porzingis' | 'Knicks' | 0 | 2015 | - | 'Kristaps Porzingis' | 'Mavericks' | 0 | 2019 | - | 'Jonathon Simmons' | 'Spurs' | 0 | 2015 | - | 'Jonathon Simmons' | 'Magic' | 0 | 2017 | - | 'Jonathon Simmons' | '76ers' | 0 | 2019 | - | 'Marco Belinelli' | 'Warriors' | 0 | 2007 | - | 'Marco Belinelli' | 'Raptors' | 0 | 2009 | - | 'Marco Belinelli' | 'Hornets' | 0 | 2010 | - | 'Marco Belinelli' | 'Bulls' | 0 | 2012 | - | 'Marco Belinelli' | 'Spurs' | 0 | 2013 | - | 'Marco Belinelli' | 'Kings' | 0 | 2015 | - | 'Marco Belinelli' | 'Hornets' | 1 | 2016 | - | 'Marco Belinelli' | 'Hawks' | 0 | 2017 | - | 'Marco Belinelli' | '76ers' | 0 | 2018 | - | 'Marco Belinelli' | 'Spurs' | 1 | 2018 | - | 'Luka Doncic' | 'Mavericks' | 0 | 2018 | - | 'David West' | 'Hornets' | 0 | 2003 | - | 'David West' | 'Pacers' | 0 | 2011 | - | 'David West' | 'Spurs' | 0 | 2015 | - | 'David West' | 'Warriors' | 0 | 2016 | - | 'Tony Parker' | 'Spurs' | 0 | 1999 | - | 'Tony Parker' | 'Hornets' | 0 | 2018 | - | 'Danny Green' | 'Cavaliers' | 0 | 2009 | - | 'Danny Green' | 'Spurs' | 0 | 2010 | - | 'Danny Green' | 'Raptors' | 0 | 2018 | - | 'Rudy Gay' | 'Grizzlies' | 0 | 2006 | - | 'Rudy Gay' | 'Raptors' | 0 | 2013 | - | 'Rudy Gay' | 'Kings' | 0 | 2013 | - | 'Rudy Gay' | 'Spurs' | 0 | 2017 | - | 'LaMarcus Aldridge' | 'Trail Blazers' | 0 | 2006 | - | 'LaMarcus Aldridge' | 'Spurs' | 0 | 2015 | - | 'Tim Duncan' | 'Spurs' | 0 | 1997 | - | 'Kevin Durant' | 'Thunders' | 0 | 2007 | - | 'Kevin Durant' | 'Warriors' | 0 | 2016 | - | 'Stephen Curry' | 'Warriors' | 0 | 2009 | - | 'Ray Allen' | 'Bucks' | 0 | 1996 | - | 'Ray Allen' | 'Thunders' | 0 | 2003 | - | 'Ray Allen' | 'Celtics' | 0 | 2007 | - | 'Ray Allen' | 'Heat' | 0 | 2012 | - | 'Tiago Splitter' | 'Spurs' | 0 | 2010 | - | 'Tiago Splitter' | 'Hawks' | 0 | 2015 | - | 'Tiago Splitter' | '76ers' | 0 | 2017 | - | 'DeAndre Jordan' | 'Clippers' | 0 | 2008 | - | 'DeAndre Jordan' | 'Mavericks' | 0 | 2018 | - | 'DeAndre Jordan' | 'Knicks' | 0 | 2019 | - | 'Paul Gasol' | 'Grizzlies' | 0 | 2001 | - | 'Paul Gasol' | 'Lakers' | 0 | 2008 | - | 'Paul Gasol' | 'Bulls' | 0 | 2014 | - | 'Paul Gasol' | 'Spurs' | 0 | 2016 | - | 'Paul Gasol' | 'Bucks' | 0 | 2019 | - | 'Aron Baynes' | 'Spurs' | 0 | 2013 | - | 'Aron Baynes' | 'Pistons' | 0 | 2015 | - | 'Aron Baynes' | 'Celtics' | 0 | 2017 | - | 'Cory Joseph' | 'Spurs' | 0 | 2011 | - | 'Cory Joseph' | 'Raptors' | 0 | 2015 | - | 'Cory Joseph' | 'Pacers' | 0 | 2017 | - | 'Vince Carter' | 'Raptors' | 0 | 1998 | - | 'Vince Carter' | 'Nets' | 0 | 2004 | - | 'Vince Carter' | 'Magic' | 0 | 2009 | - | 'Vince Carter' | 'Suns' | 0 | 2010 | - | 'Vince Carter' | 'Mavericks' | 0 | 2011 | - | 'Vince Carter' | 'Grizzlies' | 0 | 2014 | - | 'Vince Carter' | 'Kings' | 0 | 2017 | - | 'Vince Carter' | 'Hawks' | 0 | 2018 | - | 'Marc Gasol' | 'Grizzlies' | 0 | 2008 | - | 'Marc Gasol' | 'Raptors' | 0 | 2019 | - | 'Ricky Rubio' | 'Timberwolves' | 0 | 2011 | - | 'Ricky Rubio' | 'Jazz' | 0 | 2017 | - | 'Ben Simmons' | '76ers' | 0 | 2016 | - | 'Giannis Antetokounmpo' | 'Bucks' | 0 | 2013 | - | 'Rajon Rondo' | 'Celtics' | 0 | 2006 | - | 'Rajon Rondo' | 'Mavericks' | 0 | 2014 | - | 'Rajon Rondo' | 'Kings' | 0 | 2015 | - | 'Rajon Rondo' | 'Bulls' | 0 | 2016 | - | 'Rajon Rondo' | 'Pelicans' | 0 | 2017 | - | 'Rajon Rondo' | 'Lakers' | 0 | 2018 | - | 'Manu Ginobili' | 'Spurs' | 0 | 2002 | - | 'Kyrie Irving' | 'Cavaliers' | 0 | 2011 | - | 'Kyrie Irving' | 'Celtics' | 0 | 2017 | - | 'Carmelo Anthony' | 'Nuggets' | 0 | 2003 | - | 'Carmelo Anthony' | 'Knicks' | 0 | 2011 | - | 'Carmelo Anthony' | 'Thunders' | 0 | 2017 | - | 'Carmelo Anthony' | 'Rockets' | 0 | 2018 | - | 'Dwyane Wade' | 'Heat' | 0 | 2003 | - | 'Dwyane Wade' | 'Bulls' | 0 | 2016 | - | 'Dwyane Wade' | 'Cavaliers' | 0 | 2017 | - | 'Dwyane Wade' | 'Heat' | 1 | 2018 | - | 'Joel Embiid' | '76ers' | 0 | 2014 | - | 'Damian Lillard' | 'Trail Blazers' | 0 | 2012 | - | 'Yao Ming' | 'Rockets' | 0 | 2002 | - | 'Kyle Anderson' | 'Spurs' | 0 | 2014 | - | 'Kyle Anderson' | 'Grizzlies' | 0 | 2018 | - | 'Dejounte Murray' | 'Spurs' | 0 | 2016 | - | 'Blake Griffin' | 'Clippers' | 0 | 2009 | - | 'Blake Griffin' | 'Pistons' | 0 | 2018 | - | 'Steve Nash' | 'Suns' | 0 | 1996 | - | 'Steve Nash' | 'Mavericks' | 0 | 1998 | - | 'Steve Nash' | 'Suns' | 1 | 2004 | - | 'Steve Nash' | 'Lakers' | 0 | 2012 | - | 'Jason Kidd' | 'Mavericks' | 0 | 1994 | - | 'Jason Kidd' | 'Suns' | 0 | 1996 | - | 'Jason Kidd' | 'Nets' | 0 | 2001 | - | 'Jason Kidd' | 'Mavericks' | 1 | 2008 | - | 'Jason Kidd' | 'Knicks' | 0 | 2012 | - | 'Dirk Nowitzki' | 'Mavericks' | 0 | 1998 | - | 'Paul George' | 'Pacers' | 0 | 2010 | - | 'Paul George' | 'Thunders' | 0 | 2017 | - | 'Grant Hill' | 'Pistons' | 0 | 1994 | - | 'Grant Hill' | 'Magic' | 0 | 2000 | - | 'Grant Hill' | 'Suns' | 0 | 2007 | - | 'Grant Hill' | 'Clippers' | 0 | 2012 | - | "Shaquille O'Neal" | 'Magic' | 0 | 1992 | - | "Shaquille O'Neal" | 'Lakers' | 0 | 1996 | - | "Shaquille O'Neal" | 'Heat' | 0 | 2004 | - | "Shaquille O'Neal" | 'Suns' | 0 | 2008 | - | "Shaquille O'Neal" | 'Cavaliers' | 0 | 2009 | - | "Shaquille O'Neal" | 'Celtics' | 0 | 2010 | - | 'JaVale McGee' | 'Wizards' | 0 | 2008 | - | 'JaVale McGee' | 'Nuggets' | 0 | 2012 | - | 'JaVale McGee' | 'Mavericks' | 0 | 2015 | - | 'JaVale McGee' | 'Warriors' | 0 | 2016 | - | 'JaVale McGee' | 'Lakers' | 0 | 2018 | - | 'Dwight Howard' | 'Magic' | 0 | 2004 | - | 'Dwight Howard' | 'Lakers' | 0 | 2012 | - | 'Dwight Howard' | 'Rockets' | 0 | 2013 | - | 'Dwight Howard' | 'Hawks' | 0 | 2016 | - | 'Dwight Howard' | 'Hornets' | 0 | 2017 | - | 'Dwight Howard' | 'Wizards' | 0 | 2018 | + Then the result should be, in any order: + | startYear | + | 2002 | + | 2010 | + | 2015 | + | 2008 | + | 2009 | + | 2012 | + | 1996 | + | 1997 | + | 2000 | + | 2004 | + | 2013 | + | 2005 | + | 2011 | + | 2017 | + | 2003 | + | 2005 | + | 2008 | + | 2012 | + | 2016 | + | 2003 | + | 2010 | + | 2014 | + | 2018 | + | 2011 | + | 2015 | + | 2019 | + | 2015 | + | 2017 | + | 2019 | + | 2007 | + | 2009 | + | 2010 | + | 2012 | + | 2013 | + | 2015 | + | 2016 | + | 2017 | + | 2018 | + | 2018 | + | 2018 | + | 2003 | + | 2011 | + | 2015 | + | 2016 | + | 1999 | + | 2018 | + | 2009 | + | 2010 | + | 2018 | + | 2006 | + | 2013 | + | 2013 | + | 2017 | + | 2006 | + | 2015 | + | 1997 | + | 2007 | + | 2016 | + | 2009 | + | 1996 | + | 2003 | + | 2007 | + | 2012 | + | 2010 | + | 2015 | + | 2017 | + | 2008 | + | 2018 | + | 2019 | + | 2001 | + | 2008 | + | 2014 | + | 2016 | + | 2019 | + | 2013 | + | 2015 | + | 2017 | + | 2011 | + | 2015 | + | 2017 | + | 1998 | + | 2004 | + | 2009 | + | 2010 | + | 2011 | + | 2014 | + | 2017 | + | 2018 | + | 2008 | + | 2019 | + | 2011 | + | 2017 | + | 2016 | + | 2013 | + | 2006 | + | 2014 | + | 2015 | + | 2016 | + | 2017 | + | 2018 | + | 2002 | + | 2011 | + | 2017 | + | 2003 | + | 2011 | + | 2017 | + | 2018 | + | 2003 | + | 2016 | + | 2017 | + | 2018 | + | 2014 | + | 2012 | + | 2002 | + | 2014 | + | 2018 | + | 2016 | + | 2009 | + | 2018 | + | 1996 | + | 1998 | + | 2004 | + | 2012 | + | 1994 | + | 1996 | + | 2001 | + | 2008 | + | 2012 | + | 1998 | + | 2010 | + | 2017 | + | 1994 | + | 2000 | + | 2007 | + | 2012 | + | 1992 | + | 1996 | + | 2004 | + | 2008 | + | 2009 | + | 2010 | + | 2008 | + | 2012 | + | 2015 | + | 2016 | + | 2018 | + | 2004 | + | 2012 | + | 2013 | + | 2016 | + | 2017 | + | 2018 | Scenario: [2] Edge TODO Given a graph with space named "nba_int_vid" When executing query: """ - LOOKUP ON serve WHERE 1 + 1 == 2 + LOOKUP ON serve WHERE 1 + 1 == 2 YIELD serve.start_year """ Then a SemanticError should be raised at runtime: When executing query: @@ -434,7 +434,7 @@ Feature: Lookup by index itself in integer vid Then a SemanticError should be raised at runtime: When executing query: """ - LOOKUP ON serve WHERE serve.start_year == serve.end_year + LOOKUP ON serve WHERE serve.start_year == serve.end_year YIELD serve.start_year """ Then a SemanticError should be raised at runtime: When executing query: @@ -447,18 +447,18 @@ Feature: Lookup by index itself in integer vid Given a graph with space named "nba_int_vid" When executing query: """ - LOOKUP ON player WHERE player.age == 40 YIELD player.age AS Age + LOOKUP ON player WHERE player.age == 40 YIELD id(vertex) as name, player.age AS Age """ Then the result should be, in any order, and the columns 0 should be hashed: - | VertexID | Age | + | name | Age | | "Dirk Nowitzki" | 40 | | "Kobe Bryant" | 40 | When executing query: """ - LOOKUP ON player WHERE player.age > 40 YIELD player.age AS Age + LOOKUP ON player WHERE player.age > 40 YIELD id(vertex) as name, player.age AS Age """ Then the result should be, in any order, and the columns 0 should be hashed: - | VertexID | Age | + | name | Age | | "Grant Hill" | 46 | | "Jason Kidd" | 45 | | "Manu Ginobili" | 41 | @@ -469,10 +469,10 @@ Feature: Lookup by index itself in integer vid | "Vince Carter" | 42 | When executing query: """ - LOOKUP ON player WHERE player.age >= 40.0 YIELD player.age AS Age + LOOKUP ON player WHERE player.age >= 40.0 YIELD id(vertex) as name, player.age AS Age """ Then the result should be, in any order, and the columns 0 should be hashed: - | VertexID | Age | + | name | Age | | "Grant Hill" | 46 | | "Jason Kidd" | 45 | | "Manu Ginobili" | 41 | @@ -485,10 +485,10 @@ Feature: Lookup by index itself in integer vid | "Kobe Bryant" | 40 | When executing query: """ - LOOKUP ON player WHERE player.age > 40.5 YIELD player.age AS Age + LOOKUP ON player WHERE player.age > 40.5 YIELD id(vertex) as name, player.age AS Age """ Then the result should be, in any order, and the columns 0 should be hashed: - | VertexID | Age | + | name | Age | | "Grant Hill" | 46 | | "Jason Kidd" | 45 | | "Manu Ginobili" | 41 | @@ -499,10 +499,10 @@ Feature: Lookup by index itself in integer vid | "Vince Carter" | 42 | When executing query: """ - LOOKUP ON player WHERE player.age >= 40.5 YIELD player.age AS Age + LOOKUP ON player WHERE player.age >= 40.5 YIELD id(vertex) as name, player.age AS Age """ Then the result should be, in any order, and the columns 0 should be hashed: - | VertexID | Age | + | name | Age | | "Grant Hill" | 46 | | "Jason Kidd" | 45 | | "Manu Ginobili" | 41 | @@ -516,35 +516,35 @@ Feature: Lookup by index itself in integer vid LOOKUP ON player WHERE player.age < 40 YIELD player.age AS Age, player.name AS Name | order by $-.Age DESC, $-.Name| limit 10 """ - Then the result should be, in order, with relax comparison, and the columns 0 should be hashed: - | VertexID | Age | Name | - | "Tracy McGrady" | 39 | "Tracy McGrady" | - | "David West" | 38 | "David West" | - | "Paul Gasol" | 38 | "Paul Gasol" | - | "Yao Ming" | 38 | "Yao Ming" | - | "Dwyane Wade" | 37 | "Dwyane Wade" | - | "Amar'e Stoudemire" | 36 | "Amar'e Stoudemire" | - | "Boris Diaw" | 36 | "Boris Diaw" | - | "Tony Parker" | 36 | "Tony Parker" | - | "Carmelo Anthony" | 34 | "Carmelo Anthony" | - | "LeBron James" | 34 | "LeBron James" | + Then the result should be, in order, with relax comparison: + | Age | Name | + | 39 | "Tracy McGrady" | + | 38 | "David West" | + | 38 | "Paul Gasol" | + | 38 | "Yao Ming" | + | 37 | "Dwyane Wade" | + | 36 | "Amar'e Stoudemire" | + | 36 | "Boris Diaw" | + | 36 | "Tony Parker" | + | 34 | "Carmelo Anthony" | + | 34 | "LeBron James" | When executing query: """ LOOKUP ON player WHERE player.age <= 40 YIELD player.age AS Age, player.name AS Name | order by $-.Age DESC, $-.Name| limit 10 """ - Then the result should be, in order, with relax comparison, and the columns 0 should be hashed: - | VertexID | Age | Name | - | "Dirk Nowitzki" | 40 | "Dirk Nowitzki" | - | "Kobe Bryant" | 40 | "Kobe Bryant" | - | "Tracy McGrady" | 39 | "Tracy McGrady" | - | "David West" | 38 | "David West" | - | "Paul Gasol" | 38 | "Paul Gasol" | - | "Yao Ming" | 38 | "Yao Ming" | - | "Dwyane Wade" | 37 | "Dwyane Wade" | - | "Amar'e Stoudemire" | 36 | "Amar'e Stoudemire" | - | "Boris Diaw" | 36 | "Boris Diaw" | - | "Tony Parker" | 36 | "Tony Parker" | + Then the result should be, in order, with relax comparison: + | Age | Name | + | 40 | "Dirk Nowitzki" | + | 40 | "Kobe Bryant" | + | 39 | "Tracy McGrady" | + | 38 | "David West" | + | 38 | "Paul Gasol" | + | 38 | "Yao Ming" | + | 37 | "Dwyane Wade" | + | 36 | "Amar'e Stoudemire" | + | 36 | "Boris Diaw" | + | 36 | "Tony Parker" | Scenario: [2] Compare INT and FLOAT during IndexScan Given an empty graph @@ -562,26 +562,26 @@ Feature: Lookup by index itself in integer vid """ When executing query: """ - LOOKUP ON weight WHERE weight.WEIGHT > 70; + LOOKUP ON weight WHERE weight.WEIGHT > 70 YIELD id(vertex) as name; """ Then the result should be, in any order, and the columns 0 should be hashed: - | VertexID | + | name | | "Tim Duncan" | | "Tony Parker" | When executing query: """ - LOOKUP ON weight WHERE weight.WEIGHT > 70.4; + LOOKUP ON weight WHERE weight.WEIGHT > 70.4 YIELD id(vertex) as name; """ Then the result should be, in any order, and the columns 0 should be hashed: - | VertexID | + | name | | "Tim Duncan" | | "Tony Parker" | When executing query: """ - LOOKUP ON weight WHERE weight.WEIGHT >= 70.5; + LOOKUP ON weight WHERE weight.WEIGHT >= 70.5 YIELD id(vertex) as name; """ Then the result should be, in any order, and the columns 0 should be hashed: - | VertexID | + | name | | "Tim Duncan" | | "Tony Parker" | Then drop the used space diff --git a/tests/tck/features/lookup/EdgeIndexFullScan.feature b/tests/tck/features/lookup/EdgeIndexFullScan.feature index d5aae560e51..d308368b21e 100644 --- a/tests/tck/features/lookup/EdgeIndexFullScan.feature +++ b/tests/tck/features/lookup/EdgeIndexFullScan.feature @@ -43,12 +43,12 @@ Feature: Lookup edge index full scan Scenario: Edge with relational NE filter When profiling query: """ - LOOKUP ON edge_1 WHERE edge_1.col1_str != "Yellow" YIELD edge_1.col1_str + LOOKUP ON edge_1 WHERE edge_1.col1_str != "Yellow" YIELD src(edge) as src, dst(edge) as dst, rank(edge) as rank, edge_1.col1_str """ Then the result should be, in any order: - | SrcVID | DstVID | Ranking | edge_1.col1_str | - | "101" | "102" | 0 | "Red1" | - | "103" | "101" | 0 | "Blue" | + | src | dst | rank | edge_1.col1_str | + | "101" | "102" | 0 | "Red1" | + | "103" | "101" | 0 | "Blue" | And the execution plan should be: | id | name | dependencies | operator info | | 3 | Project | 2 | | @@ -57,12 +57,12 @@ Feature: Lookup edge index full scan | 0 | Start | | | When profiling query: """ - LOOKUP ON edge_1 WHERE edge_1.col2_int != 11 YIELD edge_1.col2_int + LOOKUP ON edge_1 WHERE edge_1.col2_int != 11 YIELD src(edge) as src, dst(edge) as dst, rank(edge) as rank, edge_1.col2_int """ Then the result should be, in any order: - | SrcVID | DstVID | Ranking | edge_1.col2_int | - | "103" | "101" | 0 | 33 | - | "102" | "103" | 0 | 22 | + | src | dst | rank | edge_1.col2_int | + | "103" | "101" | 0 | 33 | + | "102" | "103" | 0 | 22 | And the execution plan should be: | id | name | dependencies | operator info | | 3 | Project | 2 | | @@ -73,11 +73,11 @@ Feature: Lookup edge index full scan Scenario: Edge with simple relational IN filter When profiling query: """ - LOOKUP ON edge_1 WHERE edge_1.col1_str IN ["Red", "Yellow"] YIELD edge_1.col1_str + LOOKUP ON edge_1 WHERE edge_1.col1_str IN ["Red", "Yellow"] YIELD src(edge) as src, dst(edge) as dst, rank(edge) as rank, edge_1.col1_str """ Then the result should be, in any order: - | SrcVID | DstVID | Ranking | edge_1.col1_str | - | "102" | "103" | 0 | "Yellow" | + | src | dst | rank | edge_1.col1_str | + | "102" | "103" | 0 | "Yellow" | And the execution plan should be: | id | name | dependencies | operator info | | 3 | Project | 4 | | @@ -88,15 +88,15 @@ Feature: Lookup edge index full scan LOOKUP ON edge_1 WHERE edge_1.col1_str IN ["non-existed-name"] YIELD edge_1.col1_str """ Then the result should be, in any order: - | SrcVID | DstVID | Ranking | edge_1.col1_str | + | edge_1.col1_str | When profiling query: """ - LOOKUP ON edge_1 WHERE edge_1.col2_int IN [23 - 1 , 66/2] YIELD edge_1.col2_int + LOOKUP ON edge_1 WHERE edge_1.col2_int IN [23 - 1 , 66/2] YIELD src(edge) as src, dst(edge) as dst, rank(edge) as rank, edge_1.col2_int """ Then the result should be, in any order: - | SrcVID | DstVID | Ranking | edge_1.col2_int | - | "103" | "101" | 0 | 33 | - | "102" | "103" | 0 | 22 | + | src | dst | rank | edge_1.col2_int | + | "103" | "101" | 0 | 33 | + | "102" | "103" | 0 | 22 | And the execution plan should be: | id | name | dependencies | operator info | | 3 | Project | 4 | | @@ -107,13 +107,13 @@ Feature: Lookup edge index full scan """ LOOKUP ON edge_1 WHERE edge_1.col2_int IN [23 - 1 , 66/2] OR edge_1.col2_int==11 - YIELD edge_1.col2_int + YIELD src(edge) as src, dst(edge) as dst, rank(edge) as rank, edge_1.col2_int """ Then the result should be, in any order: - | SrcVID | DstVID | Ranking | edge_1.col2_int | - | "101" | "102" | 0 | 11 | - | "102" | "103" | 0 | 22 | - | "103" | "101" | 0 | 33 | + | src | dst | rank | edge_1.col2_int | + | "101" | "102" | 0 | 11 | + | "102" | "103" | 0 | 22 | + | "103" | "101" | 0 | 33 | And the execution plan should be: | id | name | dependencies | operator info | | 3 | Project | 4 | | @@ -124,13 +124,13 @@ Feature: Lookup edge index full scan """ LOOKUP ON edge_1 WHERE edge_1.col2_int IN [23 - 1 , 66/2] OR edge_1.col1_str IN [toUpper("r")+"ed1"] - YIELD edge_1.col1_str, edge_1.col2_int + YIELD src(edge) as src, dst(edge) as dst, rank(edge) as rank, edge_1.col1_str, edge_1.col2_int """ Then the result should be, in any order: - | SrcVID | DstVID | Ranking | edge_1.col1_str | edge_1.col2_int | - | "101" | "102" | 0 | "Red1" | 11 | - | "102" | "103" | 0 | "Yellow" | 22 | - | "103" | "101" | 0 | "Blue" | 33 | + | src | dst | rank | edge_1.col1_str | edge_1.col2_int | + | "101" | "102" | 0 | "Red1" | 11 | + | "102" | "103" | 0 | "Yellow" | 22 | + | "103" | "101" | 0 | "Blue" | 33 | And the execution plan should be: | id | name | dependencies | operator info | | 3 | Project | 4 | | @@ -141,11 +141,11 @@ Feature: Lookup edge index full scan """ LOOKUP ON edge_1 WHERE edge_1.col2_int IN [11 , 66/2] AND edge_1.col2_int==11 - YIELD edge_1.col2_int + YIELD src(edge) as src, dst(edge) as dst, rank(edge) as rank, edge_1.col2_int """ Then the result should be, in any order: - | SrcVID | DstVID | Ranking | edge_1.col2_int | - | "101" | "102" | 0 | 11 | + | src | dst | rank | edge_1.col2_int | + | "101" | "102" | 0 | 11 | And the execution plan should be: | id | name | dependencies | operator info | | 3 | Project | 2 | | @@ -160,11 +160,11 @@ Feature: Lookup edge index full scan """ LOOKUP ON edge_1 WHERE edge_1.col2_int IN [11 , 33] AND edge_1.col1_str IN ["Red1"] - YIELD edge_1.col1_str, edge_1.col2_int + YIELD src(edge) as src, dst(edge) as dst, rank(edge) as rank, edge_1.col1_str, edge_1.col2_int """ Then the result should be, in any order: - | SrcVID | DstVID | Ranking | edge_1.col1_str | edge_1.col2_int | - | "101" | "102" | 0 | "Red1" | 11 | + | src | dst | rank | edge_1.col1_str | edge_1.col2_int | + | "101" | "102" | 0 | "Red1" | 11 | And the execution plan should be: | id | name | dependencies | operator info | | 3 | Project | 4 | | @@ -176,11 +176,11 @@ Feature: Lookup edge index full scan """ LOOKUP ON edge_1 WHERE edge_1.col2_int IN [11 , 33] AND edge_1.col1_str IN ["Red1", "ABC"] - YIELD edge_1.col1_str, edge_1.col2_int + YIELD src(edge) as src, dst(edge) as dst, rank(edge) as rank, edge_1.col1_str, edge_1.col2_int """ Then the result should be, in any order: - | SrcVID | DstVID | Ranking | edge_1.col1_str | edge_1.col2_int | - | "101" | "102" | 0 | "Red1" | 11 | + | src | dst | rank | edge_1.col1_str | edge_1.col2_int | + | "101" | "102" | 0 | "Red1" | 11 | And the execution plan should be: | id | name | dependencies | operator info | | 3 | Project | 4 | | @@ -203,11 +203,11 @@ Feature: Lookup edge index full scan """ LOOKUP ON edge_1 WHERE edge_1.col2_int IN [11 , 33] AND edge_1.col1_str IN ["Red1", "ABC"] - YIELD edge_1.col1_str, edge_1.col2_int + YIELD src(edge) as src, dst(edge) as dst, rank(edge) as rank, edge_1.col1_str, edge_1.col2_int """ Then the result should be, in any order: - | SrcVID | DstVID | Ranking | edge_1.col1_str | edge_1.col2_int | - | "101" | "102" | 0 | "Red1" | 11 | + | src | dst | rank | edge_1.col1_str | edge_1.col2_int | + | "101" | "102" | 0 | "Red1" | 11 | And the execution plan should be: | id | name | dependencies | operator info | | 3 | Project | 4 | | @@ -231,11 +231,11 @@ Feature: Lookup edge index full scan """ LOOKUP ON edge_1 WHERE edge_1.col1_str IN ["Red1", "ABC"] - YIELD edge_1.col1_str, edge_1.col2_int + YIELD src(edge) as src, dst(edge) as dst, rank(edge) as rank, edge_1.col1_str, edge_1.col2_int """ Then the result should be, in any order: - | SrcVID | DstVID | Ranking | edge_1.col1_str | edge_1.col2_int | - | "101" | "102" | 0 | "Red1" | 11 | + | src | dst | rank | edge_1.col1_str | edge_1.col2_int | + | "101" | "102" | 0 | "Red1" | 11 | And the execution plan should be: | id | name | dependencies | operator info | | 3 | Project | 2 | | @@ -246,11 +246,11 @@ Feature: Lookup edge index full scan """ LOOKUP ON edge_1 WHERE edge_1.col2_int IN [11 , 33] AND edge_1.col1_str IN ["Red1", "ABC"] - YIELD edge_1.col1_str, edge_1.col2_int + YIELD src(edge) as src, dst(edge) as dst, rank(edge) as rank, edge_1.col1_str, edge_1.col2_int """ Then the result should be, in any order: - | SrcVID | DstVID | Ranking | edge_1.col1_str | edge_1.col2_int | - | "101" | "102" | 0 | "Red1" | 11 | + | src | dst | rank | edge_1.col1_str | edge_1.col2_int | + | "101" | "102" | 0 | "Red1" | 11 | And the execution plan should be: | id | name | dependencies | operator info | | 3 | Project | 4 | | @@ -260,12 +260,12 @@ Feature: Lookup edge index full scan Scenario: Edge with relational NOT IN filter When profiling query: """ - LOOKUP ON edge_1 WHERE edge_1.col1_str NOT IN ["Blue"] YIELD edge_1.col1_str + LOOKUP ON edge_1 WHERE edge_1.col1_str NOT IN ["Blue"] YIELD src(edge) as src, dst(edge) as dst, rank(edge) as rank, edge_1.col1_str """ Then the result should be, in any order: - | SrcVID | DstVID | Ranking | edge_1.col1_str | - | "101" | "102" | 0 | "Red1" | - | "102" | "103" | 0 | "Yellow" | + | src | dst | rank | edge_1.col1_str | + | "101" | "102" | 0 | "Red1" | + | "102" | "103" | 0 | "Yellow" | And the execution plan should be: | id | name | dependencies | operator info | | 3 | Project | 2 | | @@ -274,11 +274,11 @@ Feature: Lookup edge index full scan | 0 | Start | | | When profiling query: """ - LOOKUP ON edge_1 WHERE edge_1.col2_int NOT IN [23 - 1 , 66/2] YIELD edge_1.col2_int + LOOKUP ON edge_1 WHERE edge_1.col2_int NOT IN [23 - 1 , 66/2] YIELD src(edge) as src, dst(edge) as dst, rank(edge) as rank, edge_1.col2_int """ Then the result should be, in any order: - | SrcVID | DstVID | Ranking | edge_1.col2_int | - | "101" | "102" | 0 | 11 | + | src | dst | rank | edge_1.col2_int | + | "101" | "102" | 0 | 11 | And the execution plan should be: | id | name | dependencies | operator info | | 3 | Project | 2 | | @@ -301,11 +301,11 @@ Feature: Lookup edge index full scan Scenario: Edge with relational STARTS/NOT STARTS WITH filter When profiling query: """ - LOOKUP ON edge_1 WHERE edge_1.col1_str STARTS WITH toUpper("r") YIELD edge_1.col1_str + LOOKUP ON edge_1 WHERE edge_1.col1_str STARTS WITH toUpper("r") YIELD src(edge) as src, dst(edge) as dst, rank(edge) as rank, edge_1.col1_str """ Then the result should be, in any order: - | SrcVID | DstVID | Ranking | edge_1.col1_str | - | "101" | "102" | 0 | "Red1" | + | src | dst | rank | edge_1.col1_str | + | "101" | "102" | 0 | "Red1" | And the execution plan should be: | id | name | dependencies | operator info | | 3 | Project | 2 | | @@ -317,7 +317,7 @@ Feature: Lookup edge index full scan LOOKUP ON edge_1 WHERE edge_1.col1_str STARTS WITH "ABC" YIELD edge_1.col1_str """ Then the result should be, in any order: - | SrcVID | DstVID | Ranking | edge_1.col1_str | + | edge_1.col1_str | When executing query: """ LOOKUP ON edge_1 WHERE edge_1.col1_str STARTS WITH 123 YIELD edge_1.col1_str diff --git a/tests/tck/features/lookup/LookUp.IntVid.feature b/tests/tck/features/lookup/LookUp.IntVid.feature index 3628a5cd477..e7f8cff46e7 100644 --- a/tests/tck/features/lookup/LookUp.IntVid.feature +++ b/tests/tck/features/lookup/LookUp.IntVid.feature @@ -33,17 +33,17 @@ Feature: LookUpTest_Vid_Int Then the execution should be successful When executing query: """ - LOOKUP ON lookup_tag_1 WHERE lookup_tag_1.col2 == 200 + LOOKUP ON lookup_tag_1 WHERE lookup_tag_1.col2 == 200 YIELD id(vertex) as id """ Then the result should be, in any order: - | VertexID | - | 200 | + | id | + | 200 | When executing query: """ - LOOKUP ON lookup_tag_2 WHERE lookup_tag_2.col1 == true + LOOKUP ON lookup_tag_2 WHERE lookup_tag_2.col1 == true YIELD id(vertex) as id """ Then the result should be, in any order: - | VertexID | + | id | Then drop the used space Scenario: LookupTest IntVid EdgeIndexHint @@ -68,14 +68,14 @@ Feature: LookUpTest_Vid_Int Then the execution should be successful When executing query: """ - LOOKUP ON lookup_edge_1 WHERE lookup_edge_1.col2 == 201 + LOOKUP ON lookup_edge_1 WHERE lookup_edge_1.col2 == 201 YIELD src(edge) as src, dst(edge) as dst, rank(edge) as rank """ Then the result should be, in any order: - | SrcVID | DstVID | Ranking | - | 200 | 201 | 0 | + | src | dst | rank | + | 200 | 201 | 0 | When executing query: """ - LOOKUP ON lookup_edge_2 WHERE lookup_edge_2.col1 == 200 + LOOKUP ON lookup_edge_2 WHERE lookup_edge_2.col1 == 200 YIELD edge as e """ Then a SemanticError should be raised at runtime: Then drop the used space @@ -104,131 +104,131 @@ Feature: LookUpTest_Vid_Int Then the execution should be successful When executing query: """ - LOOKUP ON lookup_tag_2 WHERE lookup_tag_2.col2 == 100 + LOOKUP ON lookup_tag_2 WHERE lookup_tag_2.col2 == 100 YIELD id(vertex) as id """ Then the result should be, in any order: - | VertexID | - | 220 | + | id | + | 220 | When executing query: """ - LOOKUP ON lookup_tag_2 WHERE lookup_tag_2.col2 == 100 OR lookup_tag_2.col2 == 200 + LOOKUP ON lookup_tag_2 WHERE lookup_tag_2.col2 == 100 OR lookup_tag_2.col2 == 200 YIELD id(vertex) as id """ Then the result should be, in any order: - | VertexID | - | 220 | - | 221 | + | id | + | 220 | + | 221 | When executing query: """ - LOOKUP ON lookup_tag_2 WHERE lookup_tag_2.col2 > 100 + LOOKUP ON lookup_tag_2 WHERE lookup_tag_2.col2 > 100 YIELD id(vertex) as id """ Then the result should be, in any order: - | VertexID | - | 221 | - | 222 | - | 223 | - | 224 | - | 225 | + | id | + | 221 | + | 222 | + | 223 | + | 224 | + | 225 | When executing query: """ - LOOKUP ON lookup_tag_2 WHERE lookup_tag_2.col2 != 100 + LOOKUP ON lookup_tag_2 WHERE lookup_tag_2.col2 != 100 YIELD id(vertex) as id """ Then the result should be, in any order: - | VertexID | - | 221 | - | 222 | - | 223 | - | 224 | - | 225 | + | id | + | 221 | + | 222 | + | 223 | + | 224 | + | 225 | When executing query: """ - LOOKUP ON lookup_tag_2 WHERE lookup_tag_2.col2 >=100 + LOOKUP ON lookup_tag_2 WHERE lookup_tag_2.col2 >=100 YIELD id(vertex) as id """ Then the result should be, in any order: - | VertexID | - | 220 | - | 221 | - | 222 | - | 223 | - | 224 | - | 225 | + | id | + | 220 | + | 221 | + | 222 | + | 223 | + | 224 | + | 225 | When executing query: """ - LOOKUP ON lookup_tag_2 WHERE lookup_tag_2.col2 >=100 AND lookup_tag_2.col4 == true + LOOKUP ON lookup_tag_2 WHERE lookup_tag_2.col2 >=100 AND lookup_tag_2.col4 == true YIELD id(vertex) as id """ Then the result should be, in any order: - | VertexID | - | 220 | - | 221 | - | 222 | - | 223 | - | 224 | - | 225 | + | id | + | 220 | + | 221 | + | 222 | + | 223 | + | 224 | + | 225 | When executing query: """ - LOOKUP ON lookup_tag_2 WHERE lookup_tag_2.col2 >=100 AND lookup_tag_2.col4 != true + LOOKUP ON lookup_tag_2 WHERE lookup_tag_2.col2 >=100 AND lookup_tag_2.col4 != true YIELD id(vertex) as id """ Then the result should be, in any order: - | VertexID | + | id | When executing query: """ - LOOKUP ON lookup_tag_2 WHERE lookup_tag_2.col2 >= 100 AND lookup_tag_2.col2 <= 400 + LOOKUP ON lookup_tag_2 WHERE lookup_tag_2.col2 >= 100 AND lookup_tag_2.col2 <= 400 YIELD id(vertex) as id """ Then the result should be, in any order: - | VertexID | - | 220 | - | 221 | - | 222 | - | 223 | + | id | + | 220 | + | 221 | + | 222 | + | 223 | When executing query: """ - LOOKUP ON lookup_tag_2 WHERE lookup_tag_2.col3 == 100.5 AND lookup_tag_2.col2 == 100 + LOOKUP ON lookup_tag_2 WHERE lookup_tag_2.col3 == 100.5 AND lookup_tag_2.col2 == 100 YIELD id(vertex) as id """ Then the result should be, in any order: - | VertexID | - | 220 | + | id | + | 220 | When executing query: """ - LOOKUP ON lookup_tag_2 WHERE lookup_tag_2.col3 == 100.5 AND lookup_tag_2.col2 == 200 + LOOKUP ON lookup_tag_2 WHERE lookup_tag_2.col3 == 100.5 AND lookup_tag_2.col2 == 200 YIELD id(vertex) as id """ Then the result should be, in any order: - | VertexID | + | id | When executing query: """ LOOKUP ON lookup_tag_2 WHERE lookup_tag_2.col3 > 100.5 - YIELD lookup_tag_2.col3 AS col3 + YIELD id(vertex) as id, lookup_tag_2.col3 AS col3 """ Then the result should be, in any order: - | VertexID | col3 | - | 221 | 200.5 | - | 222 | 300.5 | - | 223 | 400.5 | - | 224 | 500.5 | - | 225 | 600.5 | + | id | col3 | + | 221 | 200.5 | + | 222 | 300.5 | + | 223 | 400.5 | + | 224 | 500.5 | + | 225 | 600.5 | When executing query: """ - LOOKUP ON lookup_tag_2 WHERE lookup_tag_2.col3 == 100.5 + LOOKUP ON lookup_tag_2 WHERE lookup_tag_2.col3 == 100.5 YIELD id(vertex) as id """ Then the result should be, in any order: - | VertexID | - | 220 | + | id | + | 220 | When executing query: """ - LOOKUP ON lookup_tag_2 WHERE lookup_tag_2.col3 == 100.1 + LOOKUP ON lookup_tag_2 WHERE lookup_tag_2.col3 == 100.1 YIELD id(vertex) as id """ Then the result should be, in any order: - | VertexID | + | id | When executing query: """ LOOKUP ON lookup_tag_2 WHERE lookup_tag_2.col3 >= 100.5 AND lookup_tag_2.col3 <= 300.5 - YIELD lookup_tag_2.col3 AS col3 + YIELD id(vertex) as id, lookup_tag_2.col3 AS col3 """ Then the result should be, in any order: - | VertexID | col3 | - | 220 | 100.5 | - | 221 | 200.5 | - | 222 | 300.5 | + | id | col3 | + | 220 | 100.5 | + | 221 | 200.5 | + | 222 | 300.5 | Then drop the used space Scenario: LookupTest IntVid EdgeConditionScan @@ -253,90 +253,90 @@ Feature: LookUpTest_Vid_Int Then the execution should be successful When executing query: """ - LOOKUP ON lookup_edge_2 WHERE lookup_edge_2.col2 == 100 + LOOKUP ON lookup_edge_2 WHERE lookup_edge_2.col2 == 100 YIELD src(edge) as src, dst(edge) as dst, rank(edge) as rank """ Then the result should be, in any order: - | SrcVID | DstVID | Ranking | - | 220 | 221 | 0 | + | src | dst | rank | + | 220 | 221 | 0 | When executing query: """ - LOOKUP ON lookup_edge_2 WHERE lookup_edge_2.col2 == 100 OR lookup_edge_2.col2 == 200 + LOOKUP ON lookup_edge_2 WHERE lookup_edge_2.col2 == 100 OR lookup_edge_2.col2 == 200 YIELD src(edge) as src, dst(edge) as dst, rank(edge) as rank """ Then the result should be, in any order: - | SrcVID | DstVID | Ranking | - | 220 | 221 | 0 | - | 220 | 222 | 0 | + | src | dst | rank | + | 220 | 221 | 0 | + | 220 | 222 | 0 | When executing query: """ - LOOKUP ON lookup_edge_2 WHERE lookup_edge_2.col2 > 100 + LOOKUP ON lookup_edge_2 WHERE lookup_edge_2.col2 > 100 YIELD src(edge) as src, dst(edge) as dst, rank(edge) as rank """ Then the result should be, in any order: - | SrcVID | DstVID | Ranking | - | 220 | 222 | 0 | - | 220 | 223 | 0 | - | 220 | 224 | 0 | - | 220 | 225 | 0 | + | src | dst | rank | + | 220 | 222 | 0 | + | 220 | 223 | 0 | + | 220 | 224 | 0 | + | 220 | 225 | 0 | When executing query: """ - LOOKUP ON lookup_edge_2 WHERE lookup_edge_2.col2 != 100 + LOOKUP ON lookup_edge_2 WHERE lookup_edge_2.col2 != 100 YIELD src(edge) as src, dst(edge) as dst, rank(edge) as rank """ Then the result should be, in any order: - | SrcVID | DstVID | Ranking | - | 220 | 222 | 0 | - | 220 | 223 | 0 | - | 220 | 224 | 0 | - | 220 | 225 | 0 | + | src | dst | rank | + | 220 | 222 | 0 | + | 220 | 223 | 0 | + | 220 | 224 | 0 | + | 220 | 225 | 0 | When executing query: """ - LOOKUP ON lookup_edge_2 WHERE lookup_edge_2.col2 >= 100 + LOOKUP ON lookup_edge_2 WHERE lookup_edge_2.col2 >= 100 YIELD src(edge) as src, dst(edge) as dst, rank(edge) as rank """ Then the result should be, in any order: - | SrcVID | DstVID | Ranking | - | 220 | 221 | 0 | - | 220 | 222 | 0 | - | 220 | 223 | 0 | - | 220 | 224 | 0 | - | 220 | 225 | 0 | + | src | dst | rank | + | 220 | 221 | 0 | + | 220 | 222 | 0 | + | 220 | 223 | 0 | + | 220 | 224 | 0 | + | 220 | 225 | 0 | When executing query: """ - LOOKUP ON lookup_edge_2 WHERE lookup_edge_2.col2 >= 100 AND lookup_edge_2.col4 == true + LOOKUP ON lookup_edge_2 WHERE lookup_edge_2.col2 >= 100 AND lookup_edge_2.col4 == true YIELD src(edge) as src, dst(edge) as dst, rank(edge) as rank """ Then the result should be, in any order: - | SrcVID | DstVID | Ranking | - | 220 | 221 | 0 | - | 220 | 222 | 0 | - | 220 | 223 | 0 | - | 220 | 224 | 0 | - | 220 | 225 | 0 | + | src | dst | rank | + | 220 | 221 | 0 | + | 220 | 222 | 0 | + | 220 | 223 | 0 | + | 220 | 224 | 0 | + | 220 | 225 | 0 | When executing query: """ - LOOKUP ON lookup_edge_2 WHERE lookup_edge_2.col2 >= 100 AND lookup_edge_2.col4 != true + LOOKUP ON lookup_edge_2 WHERE lookup_edge_2.col2 >= 100 AND lookup_edge_2.col4 != true YIELD src(edge) as src, dst(edge) as dst, rank(edge) as rank """ Then the result should be, in any order: - | SrcVID | DstVID | Ranking | + | src | dst | rank | When executing query: """ - LOOKUP ON lookup_edge_2 WHERE lookup_edge_2.col2 >= 100 AND lookup_edge_2.col2 <= 400 + LOOKUP ON lookup_edge_2 WHERE lookup_edge_2.col2 >= 100 AND lookup_edge_2.col2 <= 400 YIELD src(edge) as src, dst(edge) as dst, rank(edge) as rank """ Then the result should be, in any order: - | SrcVID | DstVID | Ranking | - | 220 | 221 | 0 | - | 220 | 222 | 0 | - | 220 | 223 | 0 | - | 220 | 224 | 0 | + | src | dst | rank | + | 220 | 221 | 0 | + | 220 | 222 | 0 | + | 220 | 223 | 0 | + | 220 | 224 | 0 | When executing query: """ - LOOKUP ON lookup_edge_2 WHERE lookup_edge_2.col3 == 100.5 AND lookup_edge_2.col2 == 100 + LOOKUP ON lookup_edge_2 WHERE lookup_edge_2.col3 == 100.5 AND lookup_edge_2.col2 == 100 YIELD src(edge) as src, dst(edge) as dst, rank(edge) as rank """ Then the result should be, in any order: - | SrcVID | DstVID | Ranking | - | 220 | 221 | 0 | + | src | dst | rank | + | 220 | 221 | 0 | When executing query: """ - LOOKUP ON lookup_edge_2 WHERE lookup_edge_2.col3 == 100.5 AND lookup_edge_2.col2 == 200 + LOOKUP ON lookup_edge_2 WHERE lookup_edge_2.col3 == 100.5 AND lookup_edge_2.col2 == 200 YIELD src(edge) as src, dst(edge) as dst, rank(edge) as rank """ Then the result should be, in any order: - | SrcVID | DstVID | Ranking | + | src | dst | rank | When executing query: """ LOOKUP ON lookup_edge_2 @@ -344,24 +344,24 @@ Feature: LookUpTest_Vid_Int YIELD lookup_edge_2.col3 AS col3 """ Then the result should be, in any order: - | SrcVID | DstVID | Ranking | col3 | - | 220 | 222 | 0 | 200.5 | - | 220 | 223 | 0 | 300.5 | - | 220 | 224 | 0 | 400.5 | - | 220 | 225 | 0 | 500.5 | + | col3 | + | 200.5 | + | 300.5 | + | 400.5 | + | 500.5 | When executing query: """ - LOOKUP ON lookup_edge_2 WHERE lookup_edge_2.col3 == 100.5 + LOOKUP ON lookup_edge_2 WHERE lookup_edge_2.col3 == 100.5 YIELD src(edge) as src, dst(edge) as dst, rank(edge) as rank """ Then the result should be, in any order: - | SrcVID | DstVID | Ranking | - | 220 | 221 | 0 | + | src | dst | rank | + | 220 | 221 | 0 | When executing query: """ - LOOKUP ON lookup_edge_2 WHERE lookup_edge_2.col3 == 100.1 + LOOKUP ON lookup_edge_2 WHERE lookup_edge_2.col3 == 100.1 YIELD src(edge) as src, dst(edge) as dst, rank(edge) as rank """ Then the result should be, in any order: - | SrcVID | DstVID | Ranking | + | src | dst | rank | When executing query: """ LOOKUP ON lookup_edge_2 @@ -369,10 +369,10 @@ Feature: LookUpTest_Vid_Int YIELD lookup_edge_2.col3 AS col3 """ Then the result should be, in any order: - | SrcVID | DstVID | Ranking | col3 | - | 220 | 221 | 0 | 100.5 | - | 220 | 222 | 0 | 200.5 | - | 220 | 223 | 0 | 300.5 | + | col3 | + | 100.5 | + | 200.5 | + | 300.5 | Then drop the used space Scenario: LookupTest IntVid FunctionExprTest @@ -399,85 +399,85 @@ Feature: LookUpTest_Vid_Int Then the execution should be successful When executing query: """ - LOOKUP ON lookup_tag_2 WHERE 1 == 1 + LOOKUP ON lookup_tag_2 WHERE 1 == 1 YIELD vertex as node """ Then a SemanticError should be raised at runtime: When executing query: """ - LOOKUP ON lookup_tag_2 WHERE 1 != 1 + LOOKUP ON lookup_tag_2 WHERE 1 != 1 YIELD vertex as node """ Then a SemanticError should be raised at runtime: When executing query: """ - LOOKUP ON lookup_tag_2 WHERE udf_is_in(lookup_tag_2.col2, 100, 200) + LOOKUP ON lookup_tag_2 WHERE udf_is_in(lookup_tag_2.col2, 100, 200) YIELD vertex as node """ Then a SemanticError should be raised at runtime: When executing query: """ - LOOKUP ON lookup_tag_2 WHERE lookup_tag_2.col2 > abs(-5) + LOOKUP ON lookup_tag_2 WHERE lookup_tag_2.col2 > abs(-5) YIELD id(vertex) as id """ Then the result should be, in any order: - | VertexID | - | 220 | - | 221 | - | 222 | - | 223 | - | 224 | - | 225 | + | id | + | 220 | + | 221 | + | 222 | + | 223 | + | 224 | + | 225 | When executing query: """ - LOOKUP ON lookup_tag_2 WHERE lookup_tag_2.col2 < abs(-5) + LOOKUP ON lookup_tag_2 WHERE lookup_tag_2.col2 < abs(-5) YIELD id(vertex) as id """ Then the result should be, in any order: - | VertexID | + | id | When executing query: """ - LOOKUP ON lookup_tag_2 WHERE lookup_tag_2.col2 > (1 + 2) + LOOKUP ON lookup_tag_2 WHERE lookup_tag_2.col2 > (1 + 2) YIELD id(vertex) as id """ Then the result should be, in any order: - | VertexID | - | 220 | - | 221 | - | 222 | - | 223 | - | 224 | - | 225 | + | id | + | 220 | + | 221 | + | 222 | + | 223 | + | 224 | + | 225 | When executing query: """ - LOOKUP ON lookup_tag_2 WHERE lookup_tag_2.col2 < (1 + 2) + LOOKUP ON lookup_tag_2 WHERE lookup_tag_2.col2 < (1 + 2) YIELD id(vertex) as id """ Then the result should be, in any order: - | VertexID | + | id | When executing query: """ - LOOKUP ON lookup_tag_2 WHERE lookup_tag_2.col4 != (true and true) + LOOKUP ON lookup_tag_2 WHERE lookup_tag_2.col4 != (true and true) YIELD id(vertex) as id """ Then the result should be, in any order: - | VertexID | + | id | When executing query: """ - LOOKUP ON lookup_tag_2 WHERE lookup_tag_2.col4 == (true and true) + LOOKUP ON lookup_tag_2 WHERE lookup_tag_2.col4 == (true and true) YIELD id(vertex) as id """ Then the result should be, in any order: - | VertexID | - | 220 | - | 221 | - | 222 | - | 223 | - | 224 | - | 225 | + | id | + | 220 | + | 221 | + | 222 | + | 223 | + | 224 | + | 225 | When executing query: """ - LOOKUP ON lookup_tag_2 WHERE lookup_tag_2.col4 == (true or false) + LOOKUP ON lookup_tag_2 WHERE lookup_tag_2.col4 == (true or false) YIELD id(vertex) as id """ Then the result should be, in any order: - | VertexID | - | 220 | - | 221 | - | 222 | - | 223 | - | 224 | - | 225 | + | id | + | 220 | + | 221 | + | 222 | + | 223 | + | 224 | + | 225 | # FIXME(aiee): should support later by folding constants # When executing query: # """ @@ -493,7 +493,7 @@ Feature: LookUpTest_Vid_Int # | VertexID | When executing query: """ - LOOKUP ON lookup_tag_2 WHERE lookup_tag_2.col2 != lookup_tag_2.col3 + LOOKUP ON lookup_tag_2 WHERE lookup_tag_2.col2 != lookup_tag_2.col3 YIELD id(vertex) as id """ Then a SemanticError should be raised at runtime: # FIXME(aiee): should support later @@ -549,11 +549,11 @@ Feature: LookUpTest_Vid_Int Then a SemanticError should be raised at runtime: When executing query: """ - LOOKUP ON student WHERE student.number == 1 YIELD student.age + LOOKUP ON student WHERE student.number == 1 YIELD id(vertex) as id, student.age """ Then the result should be, in any order: - | VertexID | student.age | - | 220 | 20 | + | id | student.age | + | 220 | 20 | Then drop the used space Scenario: LookupTest IntVid OptimizerTest @@ -590,52 +590,52 @@ Feature: LookUpTest_Vid_Int Then the execution should be successful When executing query: """ - LOOKUP ON t1 where t1.c1 == 1 + LOOKUP ON t1 where t1.c1 == 1 YIELD t1.c2 """ Then the execution should be successful When executing query: """ - LOOKUP ON t1 where t1.c1 == 1 and t1.c2 > 1 + LOOKUP ON t1 where t1.c1 == 1 and t1.c2 > 1 YIELD t1.c3 """ Then the execution should be successful When executing query: """ - LOOKUP ON t1 where t1.c1 > 1 and t1.c2 == 1 + LOOKUP ON t1 where t1.c1 > 1 and t1.c2 == 1 YIELD t1.c2 """ Then the execution should be successful When executing query: """ - LOOKUP ON t1 where t1.c1 > 1 and t1.c2 == 1 and t1.c3 == 1 + LOOKUP ON t1 where t1.c1 > 1 and t1.c2 == 1 and t1.c3 == 1 YIELD t1.c1 """ Then the execution should be successful When executing query: """ - LOOKUP ON t1 where t1.c3 > 1 + LOOKUP ON t1 where t1.c3 > 1 YIELD id(vertex) """ Then the execution should be successful When executing query: """ - LOOKUP ON t1 where t1.c3 > 1 and t1.c1 >1 + LOOKUP ON t1 where t1.c3 > 1 and t1.c1 >1 YIELD id(vertex) """ Then the execution should be successful When executing query: """ - LOOKUP on t1 WHERE t1.c4 > 1 + LOOKUP on t1 WHERE t1.c4 > 1 YIELD t1.c4 """ Then the execution should be successful When executing query: """ - LOOKUP on t1 WHERE t1.c2 > 1 and t1.c3 > 1 + LOOKUP on t1 WHERE t1.c2 > 1 and t1.c3 > 1 YIELD t1.c4 """ Then the execution should be successful When executing query: """ - LOOKUP ON t1 where t1.c2 > 1 and t1.c1 != 1 + LOOKUP ON t1 where t1.c2 > 1 and t1.c1 != 1 YIELD t1.c1 """ Then the execution should be successful When executing query: """ - LOOKUP ON t1 where t1.c2 != 1 + LOOKUP ON t1 where t1.c2 != 1 YIELD t1.c2 """ Then the execution should be successful Then drop the used space @@ -674,42 +674,42 @@ Feature: LookUpTest_Vid_Int Then the execution should be successful When executing query: """ - LOOKUP on t1_str WHERE t1_str.c1 == 1 + LOOKUP on t1_str WHERE t1_str.c1 == 1 YIELD id(vertex) """ Then the execution should be successful When executing query: """ - LOOKUP on t1_str WHERE t1_str.c1 == 1 and t1_str.c2 >1 + LOOKUP on t1_str WHERE t1_str.c1 == 1 and t1_str.c2 >1 YIELD t1_str.c2 """ Then the execution should be successful When executing query: """ - LOOKUP on t1_str WHERE t1_str.c3 == "a" + LOOKUP on t1_str WHERE t1_str.c3 == "a" YIELD t1_str.c3 """ Then the execution should be successful When executing query: """ - LOOKUP on t1_str WHERE t1_str.c4 == "a" + LOOKUP on t1_str WHERE t1_str.c4 == "a" YIELD t1_str.c4 """ Then the execution should be successful When executing query: """ - LOOKUP on t1_str WHERE t1_str.c3 == "a" and t1_str.c4 == "a" + LOOKUP on t1_str WHERE t1_str.c3 == "a" and t1_str.c4 == "a" YIELD t1_str.c1 """ Then the execution should be successful When executing query: """ - LOOKUP on t1_str WHERE t1_str.c3 == "a" and t1_str.c1 == 1 + LOOKUP on t1_str WHERE t1_str.c3 == "a" and t1_str.c1 == 1 YIELD vertex as node """ Then the execution should be successful When executing query: """ - LOOKUP on t1_str WHERE t1_str.c3 == "a" and t1_str.c2 == 1 and t1_str.c1 == 1 + LOOKUP on t1_str WHERE t1_str.c3 == "a" and t1_str.c2 == 1 and t1_str.c1 == 1 YIELD vertex as node """ Then the execution should be successful When executing query: """ - LOOKUP on t1_str WHERE t1_str.c4 == "a" and t1_str.c3 == "a" and t1_str.c2 == 1 and t1_str.c1 == 1 + LOOKUP on t1_str WHERE t1_str.c4 == "a" and t1_str.c3 == "a" and t1_str.c2 == 1 and t1_str.c1 == 1 YIELD id(vertex) """ Then the execution should be successful Then drop the used space @@ -751,46 +751,46 @@ Feature: LookUpTest_Vid_Int Then the execution should be successful When executing query: """ - LOOKUP ON tag_with_str WHERE tag_with_str.c1 == 1 + LOOKUP ON tag_with_str WHERE tag_with_str.c1 == 1 YIELD id(vertex) as id """ Then the result should be, in any order: - | VertexID | - | 1 | + | id | + | 1 | When executing query: """ - LOOKUP ON tag_with_str WHERE tag_with_str.c1 == 1 and tag_with_str.c2 == "ccc" + LOOKUP ON tag_with_str WHERE tag_with_str.c1 == 1 and tag_with_str.c2 == "ccc" YIELD id(vertex) as id """ Then the result should be, in any order: - | VertexID | + | id | When executing query: """ - LOOKUP ON tag_with_str WHERE tag_with_str.c1 == 1 and tag_with_str.c2 == "c1_row1" + LOOKUP ON tag_with_str WHERE tag_with_str.c1 == 1 and tag_with_str.c2 == "c1_row1" YIELD id(vertex) as id """ Then the result should be, in any order: - | VertexID | - | 1 | + | id | + | 1 | When executing query: """ - LOOKUP ON tag_with_str WHERE tag_with_str.c1 == 5 and tag_with_str.c2 == "ab" + LOOKUP ON tag_with_str WHERE tag_with_str.c1 == 5 and tag_with_str.c2 == "ab" YIELD id(vertex) as id """ Then the result should be, in any order: - | VertexID | - | 5 | + | id | + | 5 | When executing query: """ - LOOKUP ON tag_with_str WHERE tag_with_str.c2 == "abc" and tag_with_str.c3 == "abc" + LOOKUP ON tag_with_str WHERE tag_with_str.c2 == "abc" and tag_with_str.c3 == "abc" YIELD id(vertex) as id """ Then the result should be, in any order: - | VertexID | - | 3 | - | 4 | + | id | + | 3 | + | 4 | When executing query: """ - LOOKUP ON tag_with_str WHERE tag_with_str.c1 == 5 and tag_with_str.c2 == "abca" and tag_with_str.c3 == "bc" + LOOKUP ON tag_with_str WHERE tag_with_str.c1 == 5 and tag_with_str.c2 == "abca" and tag_with_str.c3 == "bc" YIELD id(vertex) as id """ Then the result should be, in any order: - | VertexID | - | 6 | + | id | + | 6 | Then drop the used space Scenario: LookupTest IntVid ConditionTest @@ -821,10 +821,12 @@ Feature: LookUpTest_Vid_Int identity.NATION == "汉族" AND identity.BIRTHDAY > 19620101 AND identity.BIRTHDAY < 20021231 AND - identity.BIRTHPLACE_CITY == "bbb"; + identity.BIRTHPLACE_CITY == "bbb" + YIELD + id(vertex) as id; """ Then the result should be, in any order: - | VertexID | + | id | Then drop the used space Scenario: LookupTest no index to use at runtime @@ -840,7 +842,7 @@ Feature: LookUpTest_Vid_Int Then the execution should be successful When executing query: """ - LOOKUP ON player WHERE player.name == 'Tim' + LOOKUP ON player WHERE player.name == 'Tim' YIELD vertex as node """ Then an ExecutionError should be raised at runtime: There is no index to use at runtime Then drop the used space diff --git a/tests/tck/features/lookup/LookUp.feature b/tests/tck/features/lookup/LookUp.feature index ce6700e6697..9c60ab73a9e 100644 --- a/tests/tck/features/lookup/LookUp.feature +++ b/tests/tck/features/lookup/LookUp.feature @@ -31,17 +31,17 @@ Feature: LookUpTest_Vid_String Then the execution should be successful When executing query: """ - LOOKUP ON lookup_tag_1 WHERE lookup_tag_1.col2 == 200 + LOOKUP ON lookup_tag_1 WHERE lookup_tag_1.col2 == 200 YIELD id(vertex) as id """ Then the result should be, in any order: - | VertexID | - | "200" | + | id | + | "200" | When executing query: """ - LOOKUP ON lookup_tag_2 WHERE lookup_tag_2.col1 == true + LOOKUP ON lookup_tag_2 WHERE lookup_tag_2.col1 == true YIELD id(vertex) as id """ Then the result should be, in any order: - | VertexID | + | id | Then drop the used space Scenario: LookupTest EdgeIndexHint @@ -66,14 +66,14 @@ Feature: LookUpTest_Vid_String Then the execution should be successful When executing query: """ - LOOKUP ON lookup_edge_1 WHERE lookup_edge_1.col2 == 201 + LOOKUP ON lookup_edge_1 WHERE lookup_edge_1.col2 == 201 YIELD src(edge) as src, dst(Edge) as dst, rank(edge) as rank """ Then the result should be, in any order: - | SrcVID | DstVID | Ranking | - | "200" | "201" | 0 | + | src | dst | rank | + | "200" | "201" | 0 | When executing query: """ - LOOKUP ON lookup_edge_2 WHERE lookup_edge_2.col1 == 200 + LOOKUP ON lookup_edge_2 WHERE lookup_edge_2.col1 == 200 YIELD edge as e """ Then a SemanticError should be raised at runtime: Then drop the used space @@ -102,131 +102,131 @@ Feature: LookUpTest_Vid_String Then the execution should be successful When executing query: """ - LOOKUP ON lookup_tag_2 WHERE lookup_tag_2.col2 == 100 + LOOKUP ON lookup_tag_2 WHERE lookup_tag_2.col2 == 100 YIELD id(vertex) as id """ Then the result should be, in any order: - | VertexID | - | "220" | + | id | + | "220" | When executing query: """ - LOOKUP ON lookup_tag_2 WHERE lookup_tag_2.col2 == 100 OR lookup_tag_2.col2 == 200 + LOOKUP ON lookup_tag_2 WHERE lookup_tag_2.col2 == 100 OR lookup_tag_2.col2 == 200 YIELD id(vertex) as id """ Then the result should be, in any order: - | VertexID | - | "220" | - | "221" | + | id | + | "220" | + | "221" | When executing query: """ - LOOKUP ON lookup_tag_2 WHERE lookup_tag_2.col2 > 100 + LOOKUP ON lookup_tag_2 WHERE lookup_tag_2.col2 > 100 YIELD id(vertex) as id """ Then the result should be, in any order: - | VertexID | - | "221" | - | "222" | - | "223" | - | "224" | - | "225" | + | id | + | "221" | + | "222" | + | "223" | + | "224" | + | "225" | When executing query: """ - LOOKUP ON lookup_tag_2 WHERE lookup_tag_2.col2 != 100 + LOOKUP ON lookup_tag_2 WHERE lookup_tag_2.col2 != 100 YIELD id(vertex) as id """ Then the result should be, in any order: - | VertexID | - | "221" | - | "222" | - | "223" | - | "224" | - | "225" | + | id | + | "221" | + | "222" | + | "223" | + | "224" | + | "225" | When executing query: """ - LOOKUP ON lookup_tag_2 WHERE lookup_tag_2.col2 >=100 + LOOKUP ON lookup_tag_2 WHERE lookup_tag_2.col2 >=100 YIELD id(vertex) as id """ Then the result should be, in any order: - | VertexID | - | "220" | - | "221" | - | "222" | - | "223" | - | "224" | - | "225" | + | id | + | "220" | + | "221" | + | "222" | + | "223" | + | "224" | + | "225" | When executing query: """ - LOOKUP ON lookup_tag_2 WHERE lookup_tag_2.col2 >=100 AND lookup_tag_2.col4 == true + LOOKUP ON lookup_tag_2 WHERE lookup_tag_2.col2 >=100 AND lookup_tag_2.col4 == true YIELD id(vertex) as id """ Then the result should be, in any order: - | VertexID | - | "220" | - | "221" | - | "222" | - | "223" | - | "224" | - | "225" | + | id | + | "220" | + | "221" | + | "222" | + | "223" | + | "224" | + | "225" | When executing query: """ - LOOKUP ON lookup_tag_2 WHERE lookup_tag_2.col2 >=100 AND lookup_tag_2.col4 != true + LOOKUP ON lookup_tag_2 WHERE lookup_tag_2.col2 >=100 AND lookup_tag_2.col4 != true YIELD id(vertex) as id """ Then the result should be, in any order: - | VertexID | + | id | When executing query: """ - LOOKUP ON lookup_tag_2 WHERE lookup_tag_2.col2 >= 100 AND lookup_tag_2.col2 <= 400 + LOOKUP ON lookup_tag_2 WHERE lookup_tag_2.col2 >= 100 AND lookup_tag_2.col2 <= 400 YIELD id(vertex) as id """ Then the result should be, in any order: - | VertexID | - | "220" | - | "221" | - | "222" | - | "223" | + | id | + | "220" | + | "221" | + | "222" | + | "223" | When executing query: """ - LOOKUP ON lookup_tag_2 WHERE lookup_tag_2.col3 == 100.5 AND lookup_tag_2.col2 == 100 + LOOKUP ON lookup_tag_2 WHERE lookup_tag_2.col3 == 100.5 AND lookup_tag_2.col2 == 100 YIELD id(vertex) as id """ Then the result should be, in any order: - | VertexID | - | "220" | + | id | + | "220" | When executing query: """ - LOOKUP ON lookup_tag_2 WHERE lookup_tag_2.col3 == 100.5 AND lookup_tag_2.col2 == 200 + LOOKUP ON lookup_tag_2 WHERE lookup_tag_2.col3 == 100.5 AND lookup_tag_2.col2 == 200 YIELD id(vertex) as id """ Then the result should be, in any order: - | VertexID | + | id | When executing query: """ LOOKUP ON lookup_tag_2 WHERE lookup_tag_2.col3 > 100.5 - YIELD lookup_tag_2.col3 AS col3 + YIELD id(vertex) as id, lookup_tag_2.col3 AS col3 """ Then the result should be, in any order: - | VertexID | col3 | - | "221" | 200.5 | - | "222" | 300.5 | - | "223" | 400.5 | - | "224" | 500.5 | - | "225" | 600.5 | + | id | col3 | + | "221" | 200.5 | + | "222" | 300.5 | + | "223" | 400.5 | + | "224" | 500.5 | + | "225" | 600.5 | When executing query: """ - LOOKUP ON lookup_tag_2 WHERE lookup_tag_2.col3 == 100.5 + LOOKUP ON lookup_tag_2 WHERE lookup_tag_2.col3 == 100.5 YIELD id(vertex) as id """ Then the result should be, in any order: - | VertexID | - | "220" | + | id | + | "220" | When executing query: """ - LOOKUP ON lookup_tag_2 WHERE lookup_tag_2.col3 == 100.1 + LOOKUP ON lookup_tag_2 WHERE lookup_tag_2.col3 == 100.1 YIELD id(vertex) as id """ Then the result should be, in any order: - | VertexID | + | id | When executing query: """ LOOKUP ON lookup_tag_2 WHERE lookup_tag_2.col3 >= 100.5 AND lookup_tag_2.col3 <= 300.5 - YIELD lookup_tag_2.col3 AS col3 + YIELD id(vertex) as id, lookup_tag_2.col3 AS col3 """ Then the result should be, in any order: - | VertexID | col3 | - | "220" | 100.5 | - | "221" | 200.5 | - | "222" | 300.5 | + | id | col3 | + | "220" | 100.5 | + | "221" | 200.5 | + | "222" | 300.5 | Then drop the used space Scenario: LookupTest EdgeConditionScan @@ -251,90 +251,90 @@ Feature: LookUpTest_Vid_String Then the execution should be successful When executing query: """ - LOOKUP ON lookup_edge_2 WHERE lookup_edge_2.col2 == 100 + LOOKUP ON lookup_edge_2 WHERE lookup_edge_2.col2 == 100 YIELD src(edge) as src, dst(edge) as dst, rank(edge) as rank """ Then the result should be, in any order: - | SrcVID | DstVID | Ranking | - | "220" | "221" | 0 | + | src | dst | rank | + | "220" | "221" | 0 | When executing query: """ - LOOKUP ON lookup_edge_2 WHERE lookup_edge_2.col2 == 100 OR lookup_edge_2.col2 == 200 + LOOKUP ON lookup_edge_2 WHERE lookup_edge_2.col2 == 100 OR lookup_edge_2.col2 == 200 YIELD src(edge) as src, dst(edge) as dst, rank(edge) as rank """ Then the result should be, in any order: - | SrcVID | DstVID | Ranking | - | "220" | "221" | 0 | - | "220" | "222" | 0 | + | src | dst | rank | + | "220" | "221" | 0 | + | "220" | "222" | 0 | When executing query: """ - LOOKUP ON lookup_edge_2 WHERE lookup_edge_2.col2 > 100 + LOOKUP ON lookup_edge_2 WHERE lookup_edge_2.col2 > 100 YIELD src(edge) as src, dst(edge) as dst, rank(edge) as rank """ Then the result should be, in any order: - | SrcVID | DstVID | Ranking | - | "220" | "222" | 0 | - | "220" | "223" | 0 | - | "220" | "224" | 0 | - | "220" | "225" | 0 | + | src | dst | rank | + | "220" | "222" | 0 | + | "220" | "223" | 0 | + | "220" | "224" | 0 | + | "220" | "225" | 0 | When executing query: """ - LOOKUP ON lookup_edge_2 WHERE lookup_edge_2.col2 != 100 + LOOKUP ON lookup_edge_2 WHERE lookup_edge_2.col2 != 100 YIELD src(edge) as src, dst(edge) as dst, rank(edge) as rank """ Then the result should be, in any order: - | SrcVID | DstVID | Ranking | - | "220" | "222" | 0 | - | "220" | "223" | 0 | - | "220" | "224" | 0 | - | "220" | "225" | 0 | + | src | dst | rank | + | "220" | "222" | 0 | + | "220" | "223" | 0 | + | "220" | "224" | 0 | + | "220" | "225" | 0 | When executing query: """ - LOOKUP ON lookup_edge_2 WHERE lookup_edge_2.col2 >= 100 + LOOKUP ON lookup_edge_2 WHERE lookup_edge_2.col2 >= 100 YIELD src(edge) as src, dst(edge) as dst, rank(edge) as rank """ Then the result should be, in any order: - | SrcVID | DstVID | Ranking | - | "220" | "221" | 0 | - | "220" | "222" | 0 | - | "220" | "223" | 0 | - | "220" | "224" | 0 | - | "220" | "225" | 0 | + | src | dst | rank | + | "220" | "221" | 0 | + | "220" | "222" | 0 | + | "220" | "223" | 0 | + | "220" | "224" | 0 | + | "220" | "225" | 0 | When executing query: """ - LOOKUP ON lookup_edge_2 WHERE lookup_edge_2.col2 >= 100 AND lookup_edge_2.col4 == true + LOOKUP ON lookup_edge_2 WHERE lookup_edge_2.col2 >= 100 AND lookup_edge_2.col4 == true YIELD src(edge) as src, dst(edge) as dst, rank(edge) as rank """ Then the result should be, in any order: - | SrcVID | DstVID | Ranking | - | "220" | "221" | 0 | - | "220" | "222" | 0 | - | "220" | "223" | 0 | - | "220" | "224" | 0 | - | "220" | "225" | 0 | + | src | dst | rank | + | "220" | "221" | 0 | + | "220" | "222" | 0 | + | "220" | "223" | 0 | + | "220" | "224" | 0 | + | "220" | "225" | 0 | When executing query: """ - LOOKUP ON lookup_edge_2 WHERE lookup_edge_2.col2 >= 100 AND lookup_edge_2.col4 != true + LOOKUP ON lookup_edge_2 WHERE lookup_edge_2.col2 >= 100 AND lookup_edge_2.col4 != true YIELD src(edge) as src, dst(edge) as dst, rank(edge) as rank """ Then the result should be, in any order: - | SrcVID | DstVID | Ranking | + | src | dst | rank | When executing query: """ - LOOKUP ON lookup_edge_2 WHERE lookup_edge_2.col2 >= 100 AND lookup_edge_2.col2 <= 400 + LOOKUP ON lookup_edge_2 WHERE lookup_edge_2.col2 >= 100 AND lookup_edge_2.col2 <= 400 YIELD src(edge) as src, dst(edge) as dst, rank(edge) as rank """ Then the result should be, in any order: - | SrcVID | DstVID | Ranking | - | "220" | "221" | 0 | - | "220" | "222" | 0 | - | "220" | "223" | 0 | - | "220" | "224" | 0 | + | src | dst | rank | + | "220" | "221" | 0 | + | "220" | "222" | 0 | + | "220" | "223" | 0 | + | "220" | "224" | 0 | When executing query: """ - LOOKUP ON lookup_edge_2 WHERE lookup_edge_2.col3 == 100.5 AND lookup_edge_2.col2 == 100 + LOOKUP ON lookup_edge_2 WHERE lookup_edge_2.col3 == 100.5 AND lookup_edge_2.col2 == 100 YIELD src(edge) as src, dst(edge) as dst, rank(edge) as rank """ Then the result should be, in any order: - | SrcVID | DstVID | Ranking | - | "220" | "221" | 0 | + | src | dst | rank | + | "220" | "221" | 0 | When executing query: """ - LOOKUP ON lookup_edge_2 WHERE lookup_edge_2.col3 == 100.5 AND lookup_edge_2.col2 == 200 + LOOKUP ON lookup_edge_2 WHERE lookup_edge_2.col3 == 100.5 AND lookup_edge_2.col2 == 200 YIELD src(edge) as src, dst(edge) as dst, rank(edge) as rank """ Then the result should be, in any order: - | SrcVID | DstVID | Ranking | + | src | dst | rank | When executing query: """ LOOKUP ON lookup_edge_2 @@ -342,35 +342,35 @@ Feature: LookUpTest_Vid_String YIELD lookup_edge_2.col3 AS col3 """ Then the result should be, in any order: - | SrcVID | DstVID | Ranking | col3 | - | "220" | "222" | 0 | 200.5 | - | "220" | "223" | 0 | 300.5 | - | "220" | "224" | 0 | 400.5 | - | "220" | "225" | 0 | 500.5 | + | col3 | + | 200.5 | + | 300.5 | + | 400.5 | + | 500.5 | When executing query: """ - LOOKUP ON lookup_edge_2 WHERE lookup_edge_2.col3 == 100.5 + LOOKUP ON lookup_edge_2 WHERE lookup_edge_2.col3 == 100.5 YIELD src(edge) as src, dst(edge) as dst, rank(edge) as rank """ Then the result should be, in any order: - | SrcVID | DstVID | Ranking | - | "220" | "221" | 0 | + | src | dst | rank | + | "220" | "221" | 0 | When executing query: """ - LOOKUP ON lookup_edge_2 WHERE lookup_edge_2.col3 == 100.1 + LOOKUP ON lookup_edge_2 WHERE lookup_edge_2.col3 == 100.1 YIELD src(edge) as src, dst(edge) as dst, rank(edge) as rank """ Then the result should be, in any order: - | SrcVID | DstVID | Ranking | + | src | dst | rank | When executing query: """ LOOKUP ON lookup_edge_2 WHERE lookup_edge_2.col3 >= 100.5 AND lookup_edge_2.col3 <= 300.5 - YIELD lookup_edge_2.col3 AS col3 + YIELD src(edge) as src, dst(edge) as dst, rank(edge) as rank, lookup_edge_2.col3 AS col3 """ Then the result should be, in any order: - | SrcVID | DstVID | Ranking | col3 | - | "220" | "221" | 0 | 100.5 | - | "220" | "222" | 0 | 200.5 | - | "220" | "223" | 0 | 300.5 | + | src | dst | rank | col3 | + | "220" | "221" | 0 | 100.5 | + | "220" | "222" | 0 | 200.5 | + | "220" | "223" | 0 | 300.5 | Then drop the used space Scenario: LookupTest FunctionExprTest @@ -397,85 +397,85 @@ Feature: LookUpTest_Vid_String Then the execution should be successful When executing query: """ - LOOKUP ON lookup_tag_2 WHERE 1 == 1 + LOOKUP ON lookup_tag_2 WHERE 1 == 1 YIELD vertex as node """ Then a SemanticError should be raised at runtime: When executing query: """ - LOOKUP ON lookup_tag_2 WHERE 1 != 1 + LOOKUP ON lookup_tag_2 WHERE 1 != 1 YIELD vertex as node """ Then a SemanticError should be raised at runtime: When executing query: """ - LOOKUP ON lookup_tag_2 WHERE udf_is_in(lookup_tag_2.col2, 100, 200) + LOOKUP ON lookup_tag_2 WHERE udf_is_in(lookup_tag_2.col2, 100, 200) YIELD vertex as node """ Then a SemanticError should be raised at runtime: When executing query: """ - LOOKUP ON lookup_tag_2 WHERE lookup_tag_2.col2 > abs(-5) + LOOKUP ON lookup_tag_2 WHERE lookup_tag_2.col2 > abs(-5) YIELD id(vertex) as id """ Then the result should be, in any order: - | VertexID | - | "220" | - | "221" | - | "222" | - | "223" | - | "224" | - | "225" | + | id | + | "220" | + | "221" | + | "222" | + | "223" | + | "224" | + | "225" | When executing query: """ - LOOKUP ON lookup_tag_2 WHERE lookup_tag_2.col2 < abs(-5) + LOOKUP ON lookup_tag_2 WHERE lookup_tag_2.col2 < abs(-5) YIELD id(vertex) as id """ Then the result should be, in any order: - | VertexID | + | id | When executing query: """ - LOOKUP ON lookup_tag_2 WHERE lookup_tag_2.col2 > (1 + 2) + LOOKUP ON lookup_tag_2 WHERE lookup_tag_2.col2 > (1 + 2) YIELD id(vertex) as id """ Then the result should be, in any order: - | VertexID | - | "220" | - | "221" | - | "222" | - | "223" | - | "224" | - | "225" | + | id | + | "220" | + | "221" | + | "222" | + | "223" | + | "224" | + | "225" | When executing query: """ - LOOKUP ON lookup_tag_2 WHERE lookup_tag_2.col2 < (1 + 2) + LOOKUP ON lookup_tag_2 WHERE lookup_tag_2.col2 < (1 + 2) YIELD id(vertex) as id """ Then the result should be, in any order: - | VertexID | + | id | When executing query: """ - LOOKUP ON lookup_tag_2 WHERE lookup_tag_2.col4 != (true AND true) + LOOKUP ON lookup_tag_2 WHERE lookup_tag_2.col4 != (true AND true) YIELD id(vertex) as id """ Then the result should be, in any order: - | VertexID | + | id | When executing query: """ - LOOKUP ON lookup_tag_2 WHERE lookup_tag_2.col4 == (true AND true) + LOOKUP ON lookup_tag_2 WHERE lookup_tag_2.col4 == (true AND true) YIELD id(vertex) as id """ Then the result should be, in any order: - | VertexID | - | "220" | - | "221" | - | "222" | - | "223" | - | "224" | - | "225" | + | id | + | "220" | + | "221" | + | "222" | + | "223" | + | "224" | + | "225" | When executing query: """ - LOOKUP ON lookup_tag_2 WHERE lookup_tag_2.col4 == (true or false) + LOOKUP ON lookup_tag_2 WHERE lookup_tag_2.col4 == (true or false) YIELD id(vertex) as id """ Then the result should be, in any order: - | VertexID | - | "220" | - | "221" | - | "222" | - | "223" | - | "224" | - | "225" | + | id | + | "220" | + | "221" | + | "222" | + | "223" | + | "224" | + | "225" | # FIXME(aiee): should support later by folding constants # When executing query: # """ @@ -485,7 +485,7 @@ Feature: LookUpTest_Vid_String # | VertexID | When executing query: """ - LOOKUP ON lookup_tag_2 WHERE lookup_tag_2.col2 != lookup_tag_2.col3 + LOOKUP ON lookup_tag_2 WHERE lookup_tag_2.col2 != lookup_tag_2.col3 YIELD id(vertex) as id """ Then a SemanticError should be raised at runtime: # FIXME(aiee): should support later @@ -533,11 +533,11 @@ Feature: LookUpTest_Vid_String Then a SemanticError should be raised at runtime. When executing query: """ - LOOKUP ON student WHERE student.number == 1 YIELD student.age + LOOKUP ON student WHERE student.number == 1 YIELD id(vertex) as name, student.age """ Then the result should be, in any order: - | VertexID | student.age | - | "220" | 20 | + | name | student.age | + | "220" | 20 | Then drop the used space Scenario: LookupTest OptimizerTest @@ -568,52 +568,52 @@ Feature: LookUpTest_Vid_String And wait 6 seconds When executing query: """ - LOOKUP ON t1 WHERE t1.c1 == 1 + LOOKUP ON t1 WHERE t1.c1 == 1 YIELD vertex as node """ Then the execution should be successful When executing query: """ - LOOKUP ON t1 WHERE t1.c1 == 1 AND t1.c2 > 1 + LOOKUP ON t1 WHERE t1.c1 == 1 AND t1.c2 > 1 YIELD vertex as node """ Then the execution should be successful When executing query: """ - LOOKUP ON t1 WHERE t1.c1 > 1 AND t1.c2 == 1 + LOOKUP ON t1 WHERE t1.c1 > 1 AND t1.c2 == 1 YIELD vertex as node """ Then the execution should be successful When executing query: """ - LOOKUP ON t1 WHERE t1.c1 > 1 AND t1.c2 == 1 AND t1.c3 == 1 + LOOKUP ON t1 WHERE t1.c1 > 1 AND t1.c2 == 1 AND t1.c3 == 1 YIELD vertex as node """ Then the execution should be successful When executing query: """ - LOOKUP ON t1 WHERE t1.c3 > 1 + LOOKUP ON t1 WHERE t1.c3 > 1 YIELD vertex as node """ Then the execution should be successful When executing query: """ - LOOKUP ON t1 WHERE t1.c3 > 1 AND t1.c1 >1 + LOOKUP ON t1 WHERE t1.c3 > 1 AND t1.c1 >1 YIELD vertex as node """ Then the execution should be successful When executing query: """ - LOOKUP ON t1 WHERE t1.c4 > 1 + LOOKUP ON t1 WHERE t1.c4 > 1 YIELD vertex as node """ Then the execution should be successful When executing query: """ - LOOKUP ON t1 WHERE t1.c2 > 1 AND t1.c3 > 1 + LOOKUP ON t1 WHERE t1.c2 > 1 AND t1.c3 > 1 YIELD vertex as node """ Then the execution should be successful When executing query: """ - LOOKUP ON t1 WHERE t1.c2 > 1 AND t1.c1 != 1 + LOOKUP ON t1 WHERE t1.c2 > 1 AND t1.c1 != 1 YIELD vertex as node """ Then the execution should be successful When executing query: """ - LOOKUP ON t1 WHERE t1.c2 != 1 + LOOKUP ON t1 WHERE t1.c2 != 1 YIELD vertex as node """ Then the execution should be successful Then drop the used space @@ -646,42 +646,42 @@ Feature: LookUpTest_Vid_String And wait 6 seconds When executing query: """ - LOOKUP ON t1_str WHERE t1_str.c1 == 1 + LOOKUP ON t1_str WHERE t1_str.c1 == 1 YIELD t1_str.c1 """ Then the execution should be successful When executing query: """ - LOOKUP ON t1_str WHERE t1_str.c1 == 1 AND t1_str.c2 >1 + LOOKUP ON t1_str WHERE t1_str.c1 == 1 AND t1_str.c2 >1 YIELD t1_str.c2 """ Then the execution should be successful When executing query: """ - LOOKUP ON t1_str WHERE t1_str.c3 == "a" + LOOKUP ON t1_str WHERE t1_str.c3 == "a" YIELD t1_str.c4 """ Then the execution should be successful When executing query: """ - LOOKUP ON t1_str WHERE t1_str.c4 == "a" + LOOKUP ON t1_str WHERE t1_str.c4 == "a" YIELD t1_str.c1 """ Then the execution should be successful When executing query: """ - LOOKUP ON t1_str WHERE t1_str.c3 == "a" AND t1_str.c4 == "a" + LOOKUP ON t1_str WHERE t1_str.c3 == "a" AND t1_str.c4 == "a" YIELD t1_str.c1 """ Then the execution should be successful When executing query: """ - LOOKUP ON t1_str WHERE t1_str.c3 == "a" AND t1_str.c1 == 1 + LOOKUP ON t1_str WHERE t1_str.c3 == "a" AND t1_str.c1 == 1 YIELD vertex as node """ Then the execution should be successful When executing query: """ - LOOKUP ON t1_str WHERE t1_str.c3 == "a" AND t1_str.c2 == 1 AND t1_str.c1 == 1 + LOOKUP ON t1_str WHERE t1_str.c3 == "a" AND t1_str.c2 == 1 AND t1_str.c1 == 1 YIELD vertex as node """ Then the execution should be successful When executing query: """ - LOOKUP ON t1_str WHERE t1_str.c4 == "a" AND t1_str.c3 == "a" AND t1_str.c2 == 1 AND t1_str.c1 == 1 + LOOKUP ON t1_str WHERE t1_str.c4 == "a" AND t1_str.c3 == "a" AND t1_str.c2 == 1 AND t1_str.c1 == 1 YIELD vertex as node """ Then the execution should be successful Then drop the used space @@ -719,46 +719,46 @@ Feature: LookUpTest_Vid_String Then the execution should be successful When executing query: """ - LOOKUP ON tag_with_str WHERE tag_with_str.c1 == 1 + LOOKUP ON tag_with_str WHERE tag_with_str.c1 == 1 YIELD id(vertex) as id """ Then the result should be, in any order: - | VertexID | - | "1" | + | id | + | "1" | When executing query: """ - LOOKUP ON tag_with_str WHERE tag_with_str.c1 == 1 AND tag_with_str.c2 == "ccc" + LOOKUP ON tag_with_str WHERE tag_with_str.c1 == 1 AND tag_with_str.c2 == "ccc" YIELD id(vertex) as id """ Then the result should be, in any order: - | VertexID | + | id | When executing query: """ - LOOKUP ON tag_with_str WHERE tag_with_str.c1 == 1 AND tag_with_str.c2 == "c1_row1" + LOOKUP ON tag_with_str WHERE tag_with_str.c1 == 1 AND tag_with_str.c2 == "c1_row1" YIELD id(vertex) as id """ Then the result should be, in any order: - | VertexID | - | "1" | + | id | + | "1" | When executing query: """ - LOOKUP ON tag_with_str WHERE tag_with_str.c1 == 5 AND tag_with_str.c2 == "ab" + LOOKUP ON tag_with_str WHERE tag_with_str.c1 == 5 AND tag_with_str.c2 == "ab" YIELD id(vertex) as id """ Then the result should be, in any order: - | VertexID | - | "5" | + | id | + | "5" | When executing query: """ - LOOKUP ON tag_with_str WHERE tag_with_str.c2 == "abc" AND tag_with_str.c3 == "abc" + LOOKUP ON tag_with_str WHERE tag_with_str.c2 == "abc" AND tag_with_str.c3 == "abc" YIELD id(vertex) as id """ Then the result should be, in any order: - | VertexID | - | "3" | - | "4" | + | id | + | "3" | + | "4" | When executing query: """ - LOOKUP ON tag_with_str WHERE tag_with_str.c1 == 5 AND tag_with_str.c2 == "abca" AND tag_with_str.c3 == "bc" + LOOKUP ON tag_with_str WHERE tag_with_str.c1 == 5 AND tag_with_str.c2 == "abca" AND tag_with_str.c3 == "bc" YIELD id(vertex) as id """ Then the result should be, in any order: - | VertexID | - | "6" | + | id | + | "6" | Then drop the used space Scenario: LookupTest ConditionTest @@ -787,10 +787,12 @@ Feature: LookUpTest_Vid_String identity.NATION == "汉族" AND identity.BIRTHDAY > 19620101 AND identity.BIRTHDAY < 20021231 AND - identity.BIRTHPLACE_CITY == "bbb"; + identity.BIRTHPLACE_CITY == "bbb" + YIELD + id(vertex) as id; """ Then the result should be, in any order: - | VertexID | + | id | Then drop the used space Scenario: LookupTest from pytest @@ -852,109 +854,109 @@ Feature: LookUpTest_Vid_String """ When executing query: """ - LOOKUP ON serve where serve.start_year > 0 + LOOKUP ON serve where serve.start_year > 0 YIELD src(edge) as src, dst(edge) as dst, rank(edge) as rank """ Then the result should be, in any order: - | SrcVID | DstVID | Ranking | - | '100' | '200' | 0 | - | '101' | '201' | 0 | - | '102' | '202' | 0 | - | '103' | '203' | 0 | - | '105' | '204' | 0 | - | '121' | '201' | 0 | + | src | dst | rank | + | '100' | '200' | 0 | + | '101' | '201' | 0 | + | '102' | '202' | 0 | + | '103' | '203' | 0 | + | '105' | '204' | 0 | + | '121' | '201' | 0 | When executing query: """ - LOOKUP ON serve where serve.start_year > 1997 and serve.end_year < 2020 + LOOKUP ON serve where serve.start_year > 1997 and serve.end_year < 2020 YIELD src(edge) as src, dst(edge) as dst, rank(edge) as rank """ Then the result should be, in any order: - | SrcVID | DstVID | Ranking | - | '101' | '201' | 0 | - | '103' | '203' | 0 | - | '121' | '201' | 0 | + | src | dst | rank | + | '101' | '201' | 0 | + | '103' | '203' | 0 | + | '121' | '201' | 0 | When executing query: """ - LOOKUP ON serve where serve.start_year > 2000 and serve.end_year < 2020 + LOOKUP ON serve where serve.start_year > 2000 and serve.end_year < 2020 YIELD src(edge) as src, dst(edge) as dst, rank(edge) as rank """ Then the result should be, in any order: - | SrcVID | DstVID | Ranking | + | src | dst | rank | When executing query: """ - LOOKUP ON like where like.likeness > 89 + LOOKUP ON like where like.likeness > 89 YIELD src(edge) as src, dst(edge) as dst, rank(edge) as rank """ Then the result should be, in any order: - | SrcVID | DstVID | Ranking | - | '100' | '101' | 0 | - | '101' | '102' | 0 | - | '105' | '106' | 0 | + | src | dst | rank | + | '100' | '101' | 0 | + | '101' | '102' | 0 | + | '105' | '106' | 0 | When executing query: """ - LOOKUP ON like where like.likeness < 39 + LOOKUP ON like where like.likeness < 39 YIELD src(edge) as src, dst(edge) as dst, rank(edge) as rank """ Then the result should be, in any order: - | SrcVID | DstVID | Ranking | + | src | dst | rank | When executing query: """ - LOOKUP ON player where player.age == 35 + LOOKUP ON player where player.age == 35 YIELD id(vertex) as id """ Then the result should be, in any order: - | VertexID | - | '103' | + | id | + | '103' | When executing query: """ - LOOKUP ON player where player.age > 0 + LOOKUP ON player where player.age > 0 YIELD id(vertex) as id """ Then the result should be, in any order: - | VertexID | - | '100' | - | '101' | - | '102' | - | '103' | - | '104' | - | '105' | - | '106' | - | '121' | + | id | + | '100' | + | '101' | + | '102' | + | '103' | + | '104' | + | '105' | + | '106' | + | '121' | When executing query: """ - LOOKUP ON player where player.age < 100 + LOOKUP ON player where player.age < 100 YIELD id(vertex) as id """ Then the result should be, in any order: - | VertexID | - | '100' | - | '101' | - | '102' | - | '103' | - | '104' | - | '105' | - | '106' | - | '121' | + | id | + | '100' | + | '101' | + | '102' | + | '103' | + | '104' | + | '105' | + | '106' | + | '121' | When executing query: """ - LOOKUP ON player where player.name == "Useless" + LOOKUP ON player where player.name == "Useless" YIELD id(vertex) as id """ Then the result should be, in any order: - | VertexID | - | '121' | + | id | + | '121' | When executing query: """ - LOOKUP ON player where player.name == "Useless" and player.age < 30 + LOOKUP ON player where player.name == "Useless" and player.age < 30 YIELD id(vertex) as id """ Then the result should be, in any order: - | VertexID | - | '121' | + | id | + | '121' | When executing query: """ - LOOKUP ON team where team.name == "Warriors" + LOOKUP ON team where team.name == "Warriors" YIELD id(vertex) as id """ Then the result should be, in any order: - | VertexID | - | '200' | + | id | + | '200' | When executing query: """ - LOOKUP ON team where team.name == "oopp" + LOOKUP ON team where team.name == "oopp" YIELD id(vertex) as id """ Then the result should be, in any order: - | VertexID | - | '202' | + | id | + | '202' | Then drop the used space Scenario: LookupTest no index to use at runtime @@ -970,7 +972,7 @@ Feature: LookUpTest_Vid_String Then the execution should be successful When executing query: """ - LOOKUP ON player WHERE player.name == 'Tim' + LOOKUP ON player WHERE player.name == 'Tim' YIELD vertex as node """ Then an ExecutionError should be raised at runtime: There is no index to use at runtime Then drop the used space diff --git a/tests/tck/features/lookup/LookUpLimit.feature b/tests/tck/features/lookup/LookUpLimit.feature index e9461ef699a..d66456c4408 100644 --- a/tests/tck/features/lookup/LookUpLimit.feature +++ b/tests/tck/features/lookup/LookUpLimit.feature @@ -9,10 +9,10 @@ Feature: Push Limit down IndexScan Rule Scenario: push limit down to IndexScan When profiling query: """ - LOOKUP ON player | Limit 2 | ORDER BY $-.VertexID + LOOKUP ON player YIELD id(vertex) as id | Limit 2 | ORDER BY $-.id """ Then the result should be, in any order: - | VertexID | + | id | | /[a-zA-Z ']+/ | | /[a-zA-Z ']+/ | And the execution plan should be: @@ -25,12 +25,12 @@ Feature: Push Limit down IndexScan Rule | 0 | Start | | | When profiling query: """ - LOOKUP ON like | Limit 2 | ORDER BY $-.SrcVID + LOOKUP ON like YIELD src(edge) as src, dst(edge) as dst, rank(edge) as rank | Limit 2 | ORDER BY $-.src """ Then the result should be, in any order: - | SrcVID | DstVID | Ranking | - | /[a-zA-Z ']+/ | /[a-zA-Z ']+/ | /\d+/ | - | /[a-zA-Z ']+/ | /[a-zA-Z ']+/ | /\d+/ | + | src | dst | rank | + | /[a-zA-Z ']+/ | /[a-zA-Z ']+/ | /\d+/ | + | /[a-zA-Z ']+/ | /[a-zA-Z ']+/ | /\d+/ | And the execution plan should be: | id | name | dependencies | operator info | | 4 | DataCollect | 5 | | @@ -41,10 +41,10 @@ Feature: Push Limit down IndexScan Rule | 0 | Start | | | When profiling query: """ - LOOKUP ON player WHERE player.age == 33 | Limit 2 | ORDER BY $-.VertexID + LOOKUP ON player WHERE player.age == 33 YIELD id(vertex) as id | Limit 2 | ORDER BY $-.id """ Then the result should be, in any order: - | VertexID | + | id | | /[a-zA-Z ']+/ | | /[a-zA-Z ']+/ | And the execution plan should be: @@ -57,12 +57,12 @@ Feature: Push Limit down IndexScan Rule | 0 | Start | | | When profiling query: """ - LOOKUP ON like WHERE like.likeness == 90 | Limit 2 | ORDER BY $-.SrcVID + LOOKUP ON like WHERE like.likeness == 90 YIELD src(edge) as src, dst(edge) as dst, rank(edge) as rank | Limit 2 | ORDER BY $-.src """ Then the result should be, in any order: - | SrcVID | DstVID | Ranking | - | /[a-zA-Z ']+/ | /[a-zA-Z ']+/ | /\d+/ | - | /[a-zA-Z ']+/ | /[a-zA-Z ']+/ | /\d+/ | + | src | dst | rank | + | /[a-zA-Z ']+/ | /[a-zA-Z ']+/ | /\d+/ | + | /[a-zA-Z ']+/ | /[a-zA-Z ']+/ | /\d+/ | And the execution plan should be: | id | name | dependencies | operator info | | 4 | DataCollect | 5 | | @@ -75,10 +75,10 @@ Feature: Push Limit down IndexScan Rule Scenario: push limit down to IndexScan with limit When profiling query: """ - LOOKUP ON player | LIMIT 3 | ORDER BY $-.VertexID + LOOKUP ON player YIELD id(vertex) as id | LIMIT 3 | ORDER BY $-.id """ Then the result should be, in any order: - | VertexID | + | id | | /[a-zA-Z ']+/ | | /[a-zA-Z ']+/ | | /[a-zA-Z ']+/ | @@ -92,13 +92,13 @@ Feature: Push Limit down IndexScan Rule | 9 | Start | | | When profiling query: """ - LOOKUP ON like | LIMIT 3 | ORDER BY $-.SrcVID + LOOKUP ON like YIELD src(edge) as src, dst(edge) as dst, rank(edge) as rank | LIMIT 3 | ORDER BY $-.src """ Then the result should be, in any order: - | SrcVID | DstVID | Ranking | - | /[a-zA-Z ']+/ | /[a-zA-Z ']+/ | /\d+/ | - | /[a-zA-Z ']+/ | /[a-zA-Z ']+/ | /\d+/ | - | /[a-zA-Z ']+/ | /[a-zA-Z ']+/ | /\d+/ | + | src | dst | rank | + | /[a-zA-Z ']+/ | /[a-zA-Z ']+/ | /\d+/ | + | /[a-zA-Z ']+/ | /[a-zA-Z ']+/ | /\d+/ | + | /[a-zA-Z ']+/ | /[a-zA-Z ']+/ | /\d+/ | And the execution plan should be: | id | name | dependencies | operator info | | 3 | DataCollect | 4 | | @@ -109,10 +109,10 @@ Feature: Push Limit down IndexScan Rule | 9 | Start | | | When profiling query: """ - LOOKUP ON player WHERE player.age == 33 | LIMIT 3 | ORDER BY $-.VertexID + LOOKUP ON player WHERE player.age == 33 YIELD id(vertex) as id | LIMIT 3 | ORDER BY $-.id """ Then the result should be, in any order: - | VertexID | + | id | | /[a-zA-Z ']+/ | | /[a-zA-Z ']+/ | | /[a-zA-Z ']+/ | @@ -126,13 +126,13 @@ Feature: Push Limit down IndexScan Rule | 9 | Start | | | When profiling query: """ - LOOKUP ON like WHERE like.likeness == 90 | LIMIT 3 | ORDER BY $-.SrcVID + LOOKUP ON like WHERE like.likeness == 90 YIELD src(edge) as src, dst(edge) as dst, rank(edge) as rank | LIMIT 3 | ORDER BY $-.src """ Then the result should be, in any order: - | SrcVID | DstVID | Ranking | - | /[a-zA-Z ']+/ | /[a-zA-Z ']+/ | /\d+/ | - | /[a-zA-Z ']+/ | /[a-zA-Z ']+/ | /\d+/ | - | /[a-zA-Z ']+/ | /[a-zA-Z ']+/ | /\d+/ | + | src | dst | rank | + | /[a-zA-Z ']+/ | /[a-zA-Z ']+/ | /\d+/ | + | /[a-zA-Z ']+/ | /[a-zA-Z ']+/ | /\d+/ | + | /[a-zA-Z ']+/ | /[a-zA-Z ']+/ | /\d+/ | And the execution plan should be: | id | name | dependencies | operator info | | 3 | DataCollect | 4 | | diff --git a/tests/tck/features/lookup/LookupEdge.feature b/tests/tck/features/lookup/LookupEdge.feature index b4cac6c2e86..f4091c103a6 100644 --- a/tests/tck/features/lookup/LookupEdge.feature +++ b/tests/tck/features/lookup/LookupEdge.feature @@ -54,10 +54,12 @@ Feature: Test lookup on edge index lookup_edge_1 WHERE + YIELD + src(edge) as src, dst(edge) as dst, rank(edge) as rank """ Then the result should be, in any order: - | SrcVID | DstVID | Ranking | - | '200' | '201' | 0 | + | src | dst | rank | + | '200' | '201' | 0 | When executing query: """ LOOKUP ON @@ -70,8 +72,8 @@ Feature: Test lookup on edge index lookup_edge_1.col3 """ Then the result should be, in any order: - | SrcVID | DstVID | Ranking | col1 | col2 | lookup_edge_1.col3 | - | '200' | '201' | 0 | 201 | 201 | 201 | + | col1 | col2 | lookup_edge_1.col3 | + | 201 | 201 | 201 | Then drop the used space Scenario Outline: [edge] different condition and yield test for int vid @@ -101,10 +103,12 @@ Feature: Test lookup on edge index lookup_edge_1 WHERE + YIELD + src(edge) as src, dst(edge) as dst, rank(edge) as rank """ Then the result should be, in any order: - | SrcVID | DstVID | Ranking | - | 200 | 201 | 0 | + | src | dst | rank | + | 200 | 201 | 0 | When executing query: """ LOOKUP ON @@ -117,8 +121,8 @@ Feature: Test lookup on edge index lookup_edge_1.col3 """ Then the result should be, in any order: - | SrcVID | DstVID | Ranking | col1 | col2 | lookup_edge_1.col3 | - | 200 | 201 | 0 | 201 | 201 | 201 | + | col1 | col2 | lookup_edge_1.col3 | + | 201 | 201 | 201 | Then drop the used space # TODO(yee): Test bool expression diff --git a/tests/tck/features/lookup/LookupEdge2.feature b/tests/tck/features/lookup/LookupEdge2.feature index aeac34348f3..4e57deaf55d 100644 --- a/tests/tck/features/lookup/LookupEdge2.feature +++ b/tests/tck/features/lookup/LookupEdge2.feature @@ -29,29 +29,29 @@ Feature: Test lookup on edge index 2 Scenario Outline: [edge] Simple test cases When executing query: """ - LOOKUP ON lookup_edge_1 WHERE lookup_edge_1.col1 == 201 OR lookup_edge_1.col2 == 201 AND lookup_edge_1.col3 == 202 + LOOKUP ON lookup_edge_1 WHERE lookup_edge_1.col1 == 201 OR lookup_edge_1.col2 == 201 AND lookup_edge_1.col3 == 202 YIELD edge as e """ Then the execution should be successful When executing query: """ - LOOKUP ON lookup_edge_1 WHERE col1 == 201 + LOOKUP ON lookup_edge_1 WHERE col1 == 201 YIELD edge as e """ Then a SemanticError should be raised at runtime: Expression (col1==201) not supported yet When executing query: """ - LOOKUP ON lookup_edge_1 WHERE lookup_edge_1.col1 == 201 OR lookup_edge_1.col5 == 201 + LOOKUP ON lookup_edge_1 WHERE lookup_edge_1.col1 == 201 OR lookup_edge_1.col5 == 201 YIELD edge as e """ Then a SemanticError should be raised at runtime: Invalid column: col5 When executing query: """ - LOOKUP ON lookup_edge_1 WHERE lookup_edge_1.col1 == 300 + LOOKUP ON lookup_edge_1 WHERE lookup_edge_1.col1 == 300 YIELD src(edge) as src, dst(edge) as dst, rank(edge) as rank """ Then the result should be, in any order: - | SrcVID | DstVID | Ranking | + | src | dst | rank | When executing query: """ - LOOKUP ON lookup_edge_1 WHERE lookup_edge_1.col1 == 201 AND lookup_edge_1.col2 > 200 AND lookup_edge_1.col1 > 201 + LOOKUP ON lookup_edge_1 WHERE lookup_edge_1.col1 == 201 AND lookup_edge_1.col2 > 200 AND lookup_edge_1.col1 > 201 YIELD src(edge) as src, dst(edge) as dst, rank(edge) as rank """ Then the result should be, in any order: - | SrcVID | DstVID | Ranking | + | src | dst | rank | Then drop the used space diff --git a/tests/tck/features/lookup/LookupTag.feature b/tests/tck/features/lookup/LookupTag.feature index c499a77b808..001373e878e 100644 --- a/tests/tck/features/lookup/LookupTag.feature +++ b/tests/tck/features/lookup/LookupTag.feature @@ -54,10 +54,12 @@ Feature: Test lookup on tag index lookup_tag_1 WHERE + YIELD + id(vertex) as id """ Then the result should be, in any order: - | VertexID | - | '201' | + | id | + | '201' | When executing query: """ LOOKUP ON @@ -70,8 +72,8 @@ Feature: Test lookup on tag index lookup_tag_1.col3 """ Then the result should be, in any order: - | VertexID | lookup_tag_1.col1 | lookup_tag_1.col2 | lookup_tag_1.col3 | - | '201' | 201 | 201 | 201 | + | lookup_tag_1.col1 | lookup_tag_1.col2 | lookup_tag_1.col3 | + | 201 | 201 | 201 | Then drop the used space Scenario Outline: [tag] different condition and yield test for int vid @@ -102,10 +104,12 @@ Feature: Test lookup on tag index lookup_tag_1 WHERE + YIELD + id(vertex) as id """ Then the result should be, in any order: - | VertexID | - | 201 | + | id | + | 201 | When executing query: """ LOOKUP ON @@ -118,8 +122,8 @@ Feature: Test lookup on tag index lookup_tag_1.col3 """ Then the result should be, in any order: - | VertexID | lookup_tag_1.col1 | lookup_tag_1.col2 | lookup_tag_1.col3 | - | 201 | 201 | 201 | 201 | + | lookup_tag_1.col1 | lookup_tag_1.col2 | lookup_tag_1.col3 | + | 201 | 201 | 201 | Then drop the used space # TODO(yee): Test bool expression diff --git a/tests/tck/features/lookup/LookupTag2.feature b/tests/tck/features/lookup/LookupTag2.feature index 50616a8a4ef..1ed10b7d328 100644 --- a/tests/tck/features/lookup/LookupTag2.feature +++ b/tests/tck/features/lookup/LookupTag2.feature @@ -30,31 +30,31 @@ Feature: Test lookup on tag index 2 Scenario Outline: [tag] simple tag test cases When executing query: """ - LOOKUP ON lookup_tag_1 WHERE lookup_tag_1.col1 == 201 OR lookup_tag_1.col2 == 201 AND lookup_tag_1.col3 == 202 + LOOKUP ON lookup_tag_1 WHERE lookup_tag_1.col1 == 201 OR lookup_tag_1.col2 == 201 AND lookup_tag_1.col3 == 202 YIELD vertex as node """ Then the execution should be successful When executing query: """ - LOOKUP ON lookup_tag_1 WHERE col1 == 200; + LOOKUP ON lookup_tag_1 WHERE col1 == 200 YIELD vertex as node; """ Then a SemanticError should be raised at runtime: Expression (col1==200) not supported yet When executing query: """ - LOOKUP ON lookup_tag_1 WHERE lookup_tag_1.col1 == 200 OR lookup_tag_1.col5 == 20; + LOOKUP ON lookup_tag_1 WHERE lookup_tag_1.col1 == 200 OR lookup_tag_1.col5 == 20 YIELD vertex as node; """ Then a SemanticError should be raised at runtime: Invalid column: col5 When executing query: """ - LOOKUP ON lookup_tag_1 WHERE lookup_tag_1.col1 == 300 + LOOKUP ON lookup_tag_1 WHERE lookup_tag_1.col1 == 300 YIELD id(vertex) as id """ Then the result should be, in any order: - | VertexID | + | id | When executing query: """ - lookup on lookup_tag_1 WHERE lookup_tag_1.col1 == 201 AND lookup_tag_1.col2 > 200 AND lookup_tag_1.col1 > 201 + lookup on lookup_tag_1 WHERE lookup_tag_1.col1 == 201 AND lookup_tag_1.col2 > 200 AND lookup_tag_1.col1 > 201 YIELD id(vertex) as id """ Then the result should be, in any order: - | VertexID | + | id | Then drop the used space Scenario Outline: [tag] scan without hints @@ -64,9 +64,11 @@ Feature: Test lookup on tag index 2 lookup_tag_1 WHERE lookup_tag_1.col1 != 200 + YIELD + id(vertex) as id """ Then the result should be, in any order: - | VertexID | + | id | | | | | When executing query: @@ -80,9 +82,9 @@ Feature: Test lookup on tag index 2 lookup_tag_1.col3 """ Then the result should be, in any order: - | VertexID | col1 | lookup_tag_1.col3 | - | | 201 | 201 | - | | 202 | 202 | + | col1 | lookup_tag_1.col3 | + | 201 | 201 | + | 202 | 202 | Then drop the used space # TODO(yee): Test bool expression diff --git a/tests/tck/features/lookup/Output.feature b/tests/tck/features/lookup/Output.feature index 27e64f0a7c0..3492f20c2b6 100644 --- a/tests/tck/features/lookup/Output.feature +++ b/tests/tck/features/lookup/Output.feature @@ -6,8 +6,8 @@ Feature: Lookup with output Scenario: [1] tag output When executing query: """ - LOOKUP ON player WHERE player.age == 40 | - FETCH PROP ON player $-.VertexID YIELD player.name + LOOKUP ON player WHERE player.age == 40 YIELD id(vertex) as id | + FETCH PROP ON player $-.id YIELD player.name """ Then the result should be, in any order: | player.name | @@ -28,8 +28,8 @@ Feature: Lookup with output Scenario: [1] tag output by var When executing query: """ - $a = LOOKUP ON player WHERE player.age == 40; - FETCH PROP ON player $a.VertexID YIELD player.name + $a = LOOKUP ON player WHERE player.age == 40 YIELD id(vertex) as id; + FETCH PROP ON player $a.id YIELD player.name """ Then the result should be, in any order: | player.name | @@ -51,8 +51,8 @@ Feature: Lookup with output When executing query: """ LOOKUP ON serve WHERE serve.start_year == 2008 and serve.end_year == 2019 - YIELD serve.start_year | - FETCH PROP ON serve $-.SrcVID->$-.DstVID YIELD serve.start_year + YIELD serve.start_year, src(edge) as src, dst(edge) as dst | + FETCH PROP ON serve $-.src->$-.dst YIELD serve.start_year """ Then the result should be, in any order: | serve.start_year | @@ -63,8 +63,8 @@ Feature: Lookup with output When executing query: """ LOOKUP ON serve WHERE serve.start_year == 2008 and serve.end_year == 2019 - YIELD serve.start_year AS startYear | - FETCH PROP ON serve $-.SrcVID->$-.DstVID YIELD serve.start_year AS startYear + YIELD serve.start_year AS startYear, src(edge) as src, dst(edge) as dst | + FETCH PROP ON serve $-.src->$-.dst YIELD serve.start_year AS startYear """ Then the result should be, in any order: | startYear | @@ -75,8 +75,8 @@ Feature: Lookup with output When executing query: """ $a = LOOKUP ON serve WHERE serve.start_year == 2008 and serve.end_year == 2019 - YIELD serve.start_year; - FETCH PROP ON serve $a.SrcVID->$a.DstVID YIELD serve.start_year + YIELD serve.start_year, src(edge) as src, dst(edge) as dst; + FETCH PROP ON serve $a.src->$a.dst YIELD serve.start_year """ Then the result should be, in any order: | serve.start_year | @@ -87,8 +87,8 @@ Feature: Lookup with output When executing query: """ $a = LOOKUP ON serve WHERE serve.start_year == 2008 and serve.end_year == 2019 - YIELD serve.start_year AS startYear; - FETCH PROP ON serve $a.SrcVID->$a.DstVID YIELD serve.start_year AS startYear + YIELD serve.start_year AS startYear, src(edge) as src, dst(edge) as dst; + FETCH PROP ON serve $a.src->$a.dst YIELD serve.start_year AS startYear """ Then the result should be, in any order: | startYear | diff --git a/tests/tck/features/lookup/Output.intVid.feature b/tests/tck/features/lookup/Output.intVid.feature index d177623e6df..578f9c5bcfa 100644 --- a/tests/tck/features/lookup/Output.intVid.feature +++ b/tests/tck/features/lookup/Output.intVid.feature @@ -6,8 +6,8 @@ Feature: Lookup with output in integer vid Scenario: [1] tag output When executing query: """ - LOOKUP ON player WHERE player.age == 40 | - FETCH PROP ON player $-.VertexID YIELD player.name + LOOKUP ON player WHERE player.age == 40 YIELD id(vertex) as id | + FETCH PROP ON player $-.id YIELD player.name """ Then the result should be, in any order: | player.name | @@ -17,8 +17,8 @@ Feature: Lookup with output in integer vid Scenario: [1] tag output with yield rename When executing query: """ - LOOKUP ON player WHERE player.age == 40 YIELD player.name AS name | - FETCH PROP ON player $-.VertexID YIELD player.name AS name + LOOKUP ON player WHERE player.age == 40 YIELD player.name AS name, id(vertex) as id | + FETCH PROP ON player $-.id YIELD player.name AS name """ Then the result should be, in any order: | name | @@ -28,8 +28,8 @@ Feature: Lookup with output in integer vid Scenario: [1] tag output by var When executing query: """ - $a = LOOKUP ON player WHERE player.age == 40; - FETCH PROP ON player $a.VertexID YIELD player.name + $a = LOOKUP ON player WHERE player.age == 40 YIELD id(vertex) as id; + FETCH PROP ON player $a.id YIELD player.name """ Then the result should be, in any order: | player.name | @@ -39,8 +39,8 @@ Feature: Lookup with output in integer vid Scenario: [1] tag output with yield rename by var When executing query: """ - $a = LOOKUP ON player WHERE player.age == 40 YIELD player.name AS name; - FETCH PROP ON player $a.VertexID YIELD player.name AS name + $a = LOOKUP ON player WHERE player.age == 40 YIELD id(vertex) as id, player.name AS name; + FETCH PROP ON player $a.id YIELD player.name AS name """ Then the result should be, in any order: | name | @@ -51,8 +51,8 @@ Feature: Lookup with output in integer vid When executing query: """ LOOKUP ON serve WHERE serve.start_year == 2008 and serve.end_year == 2019 - YIELD serve.start_year | - FETCH PROP ON serve $-.SrcVID->$-.DstVID YIELD serve.start_year + YIELD src(edge) as src, dst(edge) as dst, serve.start_year | + FETCH PROP ON serve $-.src->$-.dst YIELD serve.start_year """ Then the result should be, in any order: | serve.start_year | @@ -63,8 +63,8 @@ Feature: Lookup with output in integer vid When executing query: """ LOOKUP ON serve WHERE serve.start_year == 2008 and serve.end_year == 2019 - YIELD serve.start_year AS startYear | - FETCH PROP ON serve $-.SrcVID->$-.DstVID YIELD serve.start_year AS startYear + YIELD serve.start_year AS startYear, src(edge) as src, dst(edge) as dst | + FETCH PROP ON serve $-.src->$-.dst YIELD serve.start_year AS startYear """ Then the result should be, in any order: | startYear | @@ -75,8 +75,8 @@ Feature: Lookup with output in integer vid When executing query: """ $a = LOOKUP ON serve WHERE serve.start_year == 2008 and serve.end_year == 2019 - YIELD serve.start_year; - FETCH PROP ON serve $a.SrcVID->$a.DstVID YIELD serve.start_year + YIELD serve.start_year, src(edge) as src, dst(edge) as dst; + FETCH PROP ON serve $a.src->$a.dst YIELD serve.start_year """ Then the result should be, in any order: | serve.start_year | @@ -87,8 +87,8 @@ Feature: Lookup with output in integer vid When executing query: """ $a = LOOKUP ON serve WHERE serve.start_year == 2008 and serve.end_year == 2019 - YIELD serve.start_year AS startYear; - FETCH PROP ON serve $a.SrcVID->$a.DstVID YIELD serve.start_year AS startYear + YIELD serve.start_year AS startYear, src(edge) as src, dst(edge) as dst; + FETCH PROP ON serve $a.src->$a.dst YIELD serve.start_year AS startYear """ Then the result should be, in any order: | startYear | diff --git a/tests/tck/features/lookup/TagIndexFullScan.feature b/tests/tck/features/lookup/TagIndexFullScan.feature index 09169ed8d8b..71021b65c95 100644 --- a/tests/tck/features/lookup/TagIndexFullScan.feature +++ b/tests/tck/features/lookup/TagIndexFullScan.feature @@ -6,17 +6,17 @@ Feature: Lookup tag index full scan Scenario: Tag with relational RegExp filter[1] When executing query: """ - LOOKUP ON team where team.name =~ "\\d+\\w+" + LOOKUP ON team where team.name =~ "\\d+\\w+" YIELD vertex as node """ Then a SemanticError should be raised at runtime: Expression (team.name=~"\d+\w+") is not supported, please use full-text index as an optimal solution Scenario: Tag with relational NE filter When profiling query: """ - LOOKUP ON team WHERE team.name != "Hornets" + LOOKUP ON team WHERE team.name != "Hornets" YIELD id(vertex) as id """ Then the result should be, in any order: - | VertexID | + | id | | "76ers" | | "Bucks" | | "Bulls" | @@ -57,10 +57,10 @@ Feature: Lookup tag index full scan Scenario: Tag with simple relational IN filter When profiling query: """ - LOOKUP ON team WHERE team.name IN ["Hornets", "Jazz"] + LOOKUP ON team WHERE team.name IN ["Hornets", "Jazz"] YIELD id(vertex) as id """ Then the result should be, in any order: - | VertexID | + | id | | "Jazz" | | "Hornets" | And the execution plan should be: @@ -70,16 +70,16 @@ Feature: Lookup tag index full scan | 0 | Start | | | When executing query: """ - LOOKUP ON team WHERE team.name IN ["non-existed-name"] + LOOKUP ON team WHERE team.name IN ["non-existed-name"] YIELD id(vertex) as id """ Then the result should be, in any order: - | VertexID | + | id | When profiling query: """ - LOOKUP ON player WHERE player.age IN [40 - 1 , 72/2] YIELD player.age + LOOKUP ON player WHERE player.age IN [40 - 1 , 72/2] YIELD id(vertex) as id, player.age """ Then the result should be, in any order: - | VertexID | player.age | + | id | player.age | | "Amar'e Stoudemire" | 36 | | "Tracy McGrady" | 39 | | "Tony Parker" | 36 | @@ -92,10 +92,10 @@ Feature: Lookup tag index full scan # (a IN b) OR c When profiling query: """ - LOOKUP ON player WHERE player.age IN [40, 25] OR player.name == "ABC" YIELD player.age + LOOKUP ON player WHERE player.age IN [40, 25] OR player.name == "ABC" YIELD id(vertex) as id, player.age """ Then the result should be, in any order: - | VertexID | player.age | + | id | player.age | | "Dirk Nowitzki" | 40 | | "Joel Embiid" | 25 | | "Kobe Bryant" | 40 | @@ -108,10 +108,10 @@ Feature: Lookup tag index full scan # (a IN b) OR (c IN d) When profiling query: """ - LOOKUP ON player WHERE player.age IN [40, 25] OR player.name IN ["Kobe Bryant"] YIELD player.age + LOOKUP ON player WHERE player.age IN [40, 25] OR player.name IN ["Kobe Bryant"] YIELD id(vertex) as id, player.age """ Then the result should be, in any order: - | VertexID | player.age | + | id | player.age | | "Dirk Nowitzki" | 40 | | "Joel Embiid" | 25 | | "Kobe Bryant" | 40 | @@ -124,10 +124,10 @@ Feature: Lookup tag index full scan # (a IN b) AND c When profiling query: """ - LOOKUP ON player WHERE player.age IN [40, 25] AND player.name == "Kobe Bryant" YIELD player.age + LOOKUP ON player WHERE player.age IN [40, 25] AND player.name == "Kobe Bryant" YIELD id(vertex) as id, player.age """ Then the result should be, in any order: - | VertexID | player.age | + | id | player.age | | "Kobe Bryant" | 40 | And the execution plan should be: | id | name | dependencies | operator info | @@ -136,10 +136,10 @@ Feature: Lookup tag index full scan | 0 | Start | | | When profiling query: """ - LOOKUP ON player WHERE player.name IN ["Kobe Bryant", "Tim Duncan"] AND player.age > 30 + LOOKUP ON player WHERE player.name IN ["Kobe Bryant", "Tim Duncan"] AND player.age > 30 YIELD id(vertex) as id """ Then the result should be, in any order: - | VertexID | + | id | | "Kobe Bryant" | | "Tim Duncan" | And the execution plan should be: @@ -150,10 +150,10 @@ Feature: Lookup tag index full scan # c AND (a IN b) When profiling query: """ - LOOKUP ON player WHERE player.age IN [40, 25] AND player.name == "Kobe Bryant" YIELD player.age + LOOKUP ON player WHERE player.age IN [40, 25] AND player.name == "Kobe Bryant" YIELD id(vertex) as id, player.age """ Then the result should be, in any order: - | VertexID | player.age | + | id | player.age | | "Kobe Bryant" | 40 | And the execution plan should be: | id | name | dependencies | operator info | @@ -167,10 +167,10 @@ Feature: Lookup tag index full scan # (a IN b) AND (c IN d) while a, c both have indexes When profiling query: """ - LOOKUP ON player WHERE player.age IN [40, 25] AND player.name IN ["ABC", "Kobe Bryant"] YIELD player.age + LOOKUP ON player WHERE player.age IN [40, 25] AND player.name IN ["ABC", "Kobe Bryant"] YIELD id(vertex) as id, player.age """ Then the result should be, in any order: - | VertexID | player.age | + | id | player.age | | "Kobe Bryant" | 40 | And the execution plan should be: | id | name | dependencies | operator info | @@ -191,10 +191,10 @@ Feature: Lookup tag index full scan Then wait the job to finish When profiling query: """ - LOOKUP ON player WHERE player.age IN [40, 25] AND player.name IN ["ABC", "Kobe Bryant"] YIELD player.age + LOOKUP ON player WHERE player.age IN [40, 25] AND player.name IN ["ABC", "Kobe Bryant"] YIELD id(vertex) as id, player.age """ Then the result should be, in any order: - | VertexID | player.age | + | id | player.age | | "Kobe Bryant" | 40 | And the execution plan should be: | id | name | dependencies | operator info | @@ -217,10 +217,10 @@ Feature: Lookup tag index full scan # since the tag index has been dropped, here a TagIndexFullScan should be performed When profiling query: """ - LOOKUP ON player WHERE player.name IN ["ABC", "Kobe Bryant"] YIELD player.age + LOOKUP ON player WHERE player.name IN ["ABC", "Kobe Bryant"] YIELD id(vertex) as id, player.age """ Then the result should be, in any order: - | VertexID | player.age | + | id | player.age | | "Kobe Bryant" | 40 | And the execution plan should be: | id | name | dependencies | operator info | @@ -230,10 +230,10 @@ Feature: Lookup tag index full scan | 0 | Start | | | When profiling query: """ - LOOKUP ON player WHERE player.age IN [40, 25] AND player.name IN ["ABC", "Kobe Bryant"] YIELD player.age + LOOKUP ON player WHERE player.age IN [40, 25] AND player.name IN ["ABC", "Kobe Bryant"] YIELD id(vertex) as id, player.age """ Then the result should be, in any order: - | VertexID | player.age | + | id | player.age | | "Kobe Bryant" | 40 | And the execution plan should be: | id | name | dependencies | operator info | @@ -245,10 +245,10 @@ Feature: Lookup tag index full scan Scenario: Tag with relational NOT IN filter When profiling query: """ - LOOKUP ON team WHERE team.name NOT IN ["Hornets", "Jazz"] + LOOKUP ON team WHERE team.name NOT IN ["Hornets", "Jazz"] YIELD id(vertex) as id """ Then the result should be, in any order: - | VertexID | + | id | | "76ers" | | "Bucks" | | "Bulls" | @@ -285,10 +285,10 @@ Feature: Lookup tag index full scan | 0 | Start | | | When profiling query: """ - LOOKUP ON player WHERE player.age NOT IN [40 - 1 , 72/2] YIELD player.age + LOOKUP ON player WHERE player.age NOT IN [40 - 1 , 72/2] YIELD id(vertex) as id, player.age """ Then the result should be, in any order: - | VertexID | player.age | + | id | player.age | | "Yao Ming" | 38 | | "Aron Baynes" | 32 | | "Ben Simmons" | 22 | @@ -351,22 +351,22 @@ Feature: Lookup tag index full scan Scenario: Tag with relational CONTAINS/NOT CONTAINS filter When executing query: """ - LOOKUP ON team WHERE team.name CONTAINS "ABC" + LOOKUP ON team WHERE team.name CONTAINS "ABC" YIELD vertex as node """ Then a SemanticError should be raised at runtime: Expression (team.name CONTAINS "ABC") is not supported, please use full-text index as an optimal solution When executing query: """ - LOOKUP ON team WHERE team.name NOT CONTAINS "ABC" + LOOKUP ON team WHERE team.name NOT CONTAINS "ABC" YIELD vertex as node """ Then a SemanticError should be raised at runtime: Expression (team.name NOT CONTAINS "ABC") is not supported, please use full-text index as an optimal solution Scenario: Tag with relational STARTS WITH filter When profiling query: """ - LOOKUP ON team WHERE team.name STARTS WITH toUpper("t") + LOOKUP ON team WHERE team.name STARTS WITH toUpper("t") YIELD id(vertex) as id """ Then the result should be, in any order: - | VertexID | + | id | | "Trail Blazers" | | "Timberwolves" | | "Thunders" | @@ -378,29 +378,29 @@ Feature: Lookup tag index full scan | 0 | Start | | | When executing query: """ - LOOKUP ON team WHERE team.name STARTS WITH "ABC" + LOOKUP ON team WHERE team.name STARTS WITH "ABC" YIELD id(vertex) as id """ Then the result should be, in any order: - | VertexID | + | id | When executing query: """ - LOOKUP ON team WHERE team.name STARTS WITH 123 + LOOKUP ON team WHERE team.name STARTS WITH 123 YIELD id(vertex) """ Then a SemanticError should be raised at runtime: Column type error : name When profiling query: """ - LOOKUP ON team WHERE team.name NOT STARTS WITH toUpper("t") + LOOKUP ON team WHERE team.name NOT STARTS WITH toUpper("t") YIELD id(vertex) """ Then a SemanticError should be raised at runtime: Expression (team.name NOT STARTS WITH toUpper("t")) is not supported, please use full-text index as an optimal solution Scenario: Tag with relational ENDS/NOT ENDS WITH filter When executing query: """ - LOOKUP ON team WHERE team.name ENDS WITH toLower("S") + LOOKUP ON team WHERE team.name ENDS WITH toLower("S") YIELD id(vertex) """ Then a SemanticError should be raised at runtime: Expression (team.name ENDS WITH toLower("S")) is not supported, please use full-text index as an optimal solution When executing query: """ - LOOKUP ON team WHERE team.name NOT ENDS WITH toLower("S") + LOOKUP ON team WHERE team.name NOT ENDS WITH toLower("S") YIELD id(vertex) """ Then a SemanticError should be raised at runtime: Expression (team.name NOT ENDS WITH toLower("S")) is not supported, please use full-text index as an optimal solution diff --git a/tests/tck/features/lookup/WithYield.feature b/tests/tck/features/lookup/WithYield.feature index 3cacd5e1a04..9292d71d3d7 100644 --- a/tests/tck/features/lookup/WithYield.feature +++ b/tests/tck/features/lookup/WithYield.feature @@ -9,25 +9,25 @@ Feature: Lookup with yield LOOKUP ON player WHERE player.age == 40 YIELD player.name """ Then the result should be, in any order: - | VertexID | player.name | - | 'Kobe Bryant' | 'Kobe Bryant' | - | 'Dirk Nowitzki' | 'Dirk Nowitzki' | + | player.name | + | 'Kobe Bryant' | + | 'Dirk Nowitzki' | When executing query: """ LOOKUP ON player WHERE player.age == 40 YIELD player.name, player.age + 1 """ Then the result should be, in any order: - | VertexID | player.name | (player.age+1) | - | 'Kobe Bryant' | 'Kobe Bryant' | 41 | - | 'Dirk Nowitzki' | 'Dirk Nowitzki' | 41 | + | player.name | (player.age+1) | + | 'Kobe Bryant' | 41 | + | 'Dirk Nowitzki' | 41 | When executing query: """ LOOKUP ON player WHERE player.age == 40 YIELD player.name, player.age + 1, vertex as node """ Then the result should be, in any order: - | VertexID | player.name | (player.age+1) | node | - | 'Kobe Bryant' | 'Kobe Bryant' | 41 | ("Kobe Bryant" : player {age : 40, name : "Kobe Bryant"}) | - | 'Dirk Nowitzki' | 'Dirk Nowitzki' | 41 | ("Dirk Nowitzki" : player {age : 40, name : "Dirk Nowitzki"}) | + | player.name | (player.age+1) | node | + | 'Kobe Bryant' | 41 | ("Kobe Bryant" : player {age : 40, name : "Kobe Bryant"}) | + | 'Dirk Nowitzki' | 41 | ("Dirk Nowitzki" : player {age : 40, name : "Dirk Nowitzki"}) | Scenario: [1] tag with yield rename When executing query: @@ -35,18 +35,18 @@ Feature: Lookup with yield LOOKUP ON player WHERE player.age == 40 YIELD player.name AS name """ Then the result should be, in any order: - | VertexID | name | - | 'Kobe Bryant' | 'Kobe Bryant' | - | 'Dirk Nowitzki' | 'Dirk Nowitzki' | + | name | + | 'Kobe Bryant' | + | 'Dirk Nowitzki' | When executing query: """ LOOKUP ON team WHERE team.name in ["76ers", "Lakers", "Spurs"] YIELD vertex AS node """ Then the result should be, in any order: - | VertexID | node | - | '76ers' | ("76ers" : team {name : "76ers"}) | - | 'Lakers' | ("Lakers" : team {name : "Lakers"}) | - | 'Spurs' | ("Spurs" : team {name : "Spurs"}) | + | node | + | ("76ers" : team {name : "76ers"}) | + | ("Lakers" : team {name : "Lakers"}) | + | ("Spurs" : team {name : "Spurs"}) | Scenario: [2] edge with yield When executing query: @@ -55,18 +55,18 @@ Feature: Lookup with yield YIELD serve.start_year """ Then the result should be, in any order: - | SrcVID | DstVID | Ranking | serve.start_year | - | 'Russell Westbrook' | 'Thunders' | 0 | 2008 | - | 'Marc Gasol' | 'Grizzlies' | 0 | 2008 | + | serve.start_year | + | 2008 | + | 2008 | When executing query: """ LOOKUP ON serve WHERE serve.start_year == 2008 and serve.end_year == 2019 YIELD serve.start_year, edge as relationship """ Then the result should be, in any order: - | SrcVID | DstVID | Ranking | serve.start_year | relationship | - | 'Russell Westbrook' | 'Thunders' | 0 | 2008 | [:serve "Russell Westbrook"->"Thunders" @0 {end_year: 2019, start_year: 2008}] | - | 'Marc Gasol' | 'Grizzlies' | 0 | 2008 | [:serve "Marc Gasol"->"Grizzlies" @0 {end_year: 2019, start_year: 2008}] | + | serve.start_year | relationship | + | 2008 | [:serve "Russell Westbrook"->"Thunders" @0 {end_year: 2019, start_year: 2008}] | + | 2008 | [:serve "Marc Gasol"->"Grizzlies" @0 {end_year: 2019, start_year: 2008}] | Scenario: [2] edge with yield rename When executing query: @@ -75,21 +75,21 @@ Feature: Lookup with yield YIELD serve.start_year AS startYear """ Then the result should be, in any order: - | SrcVID | DstVID | Ranking | startYear | - | 'Russell Westbrook' | 'Thunders' | 0 | 2008 | - | 'Marc Gasol' | 'Grizzlies' | 0 | 2008 | + | startYear | + | 2008 | + | 2008 | When executing query: """ LOOKUP ON like WHERE like.likeness < 50 + 1 YIELD like.likeness, edge as relationship """ Then the result should be, in any order: - | SrcVID | DstVID | Ranking | like.likeness | relationship | - | "Blake Griffin" | "Chris Paul" | 0 | -1 | [:like "Blake Griffin"->"Chris Paul" @0 {likeness: -1}] | - | "Dirk Nowitzki" | "Dwyane Wade" | 0 | 10 | [:like "Dirk Nowitzki"->"Dwyane Wade" @0 {likeness: 10}] | - | "Kyrie Irving" | "LeBron James" | 0 | 13 | [:like "Kyrie Irving"->"LeBron James" @0 {likeness: 13}] | - | "Marco Belinelli" | "Tony Parker" | 0 | 50 | [:like "Marco Belinelli"->"Tony Parker" @0 {likeness: 50}] | - | "Rajon Rondo" | "Ray Allen" | 0 | -1 | [:like "Rajon Rondo"->"Ray Allen" @0 {likeness: -1}] | - | "Ray Allen" | "Rajon Rondo" | 0 | 9 | [:like "Ray Allen"->"Rajon Rondo" @0 {likeness: 9}] | + | like.likeness | relationship | + | -1 | [:like "Blake Griffin"->"Chris Paul" @0 {likeness: -1}] | + | 10 | [:like "Dirk Nowitzki"->"Dwyane Wade" @0 {likeness: 10}] | + | 13 | [:like "Kyrie Irving"->"LeBron James" @0 {likeness: 13}] | + | 50 | [:like "Marco Belinelli"->"Tony Parker" @0 {likeness: 50}] | + | -1 | [:like "Rajon Rondo"->"Ray Allen" @0 {likeness: -1}] | + | 9 | [:like "Ray Allen"->"Rajon Rondo" @0 {likeness: 9}] | When executing query: """ LOOKUP ON like WHERE like.likeness < 50 + 1 YIELD like.likeness, edge as relationship | YIELD count(*) as nums diff --git a/tests/tck/features/lookup/WithYield.intVid.feature b/tests/tck/features/lookup/WithYield.intVid.feature index f685ca643d1..03d005b7719 100644 --- a/tests/tck/features/lookup/WithYield.intVid.feature +++ b/tests/tck/features/lookup/WithYield.intVid.feature @@ -8,45 +8,45 @@ Feature: Lookup with yield in integer vid """ LOOKUP ON player WHERE player.age == 40 YIELD player.name """ - Then the result should be, in any order, and the columns 0 should be hashed: - | VertexID | player.name | - | 'Kobe Bryant' | 'Kobe Bryant' | - | 'Dirk Nowitzki' | 'Dirk Nowitzki' | + Then the result should be, in any order: + | player.name | + | 'Kobe Bryant' | + | 'Dirk Nowitzki' | When executing query: """ LOOKUP ON player WHERE player.age == 40 YIELD player.name, player.age + 1 """ - Then the result should be, in any order, and the columns 0 should be hashed: - | VertexID | player.name | (player.age+1) | - | 'Kobe Bryant' | 'Kobe Bryant' | 41 | - | 'Dirk Nowitzki' | 'Dirk Nowitzki' | 41 | + Then the result should be, in any order: + | player.name | (player.age+1) | + | 'Kobe Bryant' | 41 | + | 'Dirk Nowitzki' | 41 | When executing query: """ LOOKUP ON player WHERE player.age == 40 YIELD player.name, player.age + 1, vertex as node """ - Then the result should be, in any order, and the columns 0 should be hashed: - | VertexID | player.name | (player.age+1) | node | - | 'Kobe Bryant' | 'Kobe Bryant' | 41 | ("Kobe Bryant" : player {age : 40, name : "Kobe Bryant"}) | - | 'Dirk Nowitzki' | 'Dirk Nowitzki' | 41 | ("Dirk Nowitzki" : player {age : 40, name : "Dirk Nowitzki"}) | + Then the result should be, in any order: + | player.name | (player.age+1) | node | + | 'Kobe Bryant' | 41 | ("Kobe Bryant" : player {age : 40, name : "Kobe Bryant"}) | + | 'Dirk Nowitzki' | 41 | ("Dirk Nowitzki" : player {age : 40, name : "Dirk Nowitzki"}) | Scenario: [1] tag with yield rename When executing query: """ LOOKUP ON player WHERE player.age == 40 YIELD player.name AS name """ - Then the result should be, in any order, and the columns 0 should be hashed: - | VertexID | name | - | 'Kobe Bryant' | 'Kobe Bryant' | - | 'Dirk Nowitzki' | 'Dirk Nowitzki' | + Then the result should be, in any order: + | name | + | 'Kobe Bryant' | + | 'Dirk Nowitzki' | When executing query: """ LOOKUP ON team WHERE team.name in ["76ers", "Lakers", "Spurs"] YIELD vertex AS node """ - Then the result should be, in any order, and the columns 0 should be hashed: - | VertexID | node | - | '76ers' | ("76ers" : team {name : "76ers"}) | - | 'Lakers' | ("Lakers" : team {name : "Lakers"}) | - | 'Spurs' | ("Spurs" : team {name : "Spurs"}) | + Then the result should be, in any order: + | node | + | ("76ers" : team {name : "76ers"}) | + | ("Lakers" : team {name : "Lakers"}) | + | ("Spurs" : team {name : "Spurs"}) | Scenario: [2] edge with yield When executing query: @@ -54,19 +54,19 @@ Feature: Lookup with yield in integer vid LOOKUP ON serve WHERE serve.start_year == 2008 and serve.end_year == 2019 YIELD serve.start_year """ - Then the result should be, in any order, and the columns 0,1 should be hashed: - | SrcVID | DstVID | Ranking | serve.start_year | - | 'Russell Westbrook' | 'Thunders' | 0 | 2008 | - | 'Marc Gasol' | 'Grizzlies' | 0 | 2008 | + Then the result should be, in any order: + | serve.start_year | + | 2008 | + | 2008 | When executing query: """ LOOKUP ON serve WHERE serve.start_year == 2008 and serve.end_year == 2019 YIELD serve.start_year, edge as relationship """ - Then the result should be, in any order, and the columns 0,1 should be hashed: - | SrcVID | DstVID | Ranking | serve.start_year | relationship | - | 'Russell Westbrook' | 'Thunders' | 0 | 2008 | [:serve "Russell Westbrook"->"Thunders" @0 {end_year: 2019, start_year: 2008}] | - | 'Marc Gasol' | 'Grizzlies' | 0 | 2008 | [:serve "Marc Gasol"->"Grizzlies" @0 {end_year: 2019, start_year: 2008}] | + Then the result should be, in any order: + | serve.start_year | relationship | + | 2008 | [:serve "Russell Westbrook"->"Thunders" @0 {end_year: 2019, start_year: 2008}] | + | 2008 | [:serve "Marc Gasol"->"Grizzlies" @0 {end_year: 2019, start_year: 2008}] | Scenario: [2] edge with yield rename When executing query: @@ -74,22 +74,22 @@ Feature: Lookup with yield in integer vid LOOKUP ON serve WHERE serve.start_year == 2008 and serve.end_year == 2019 YIELD serve.start_year AS startYear """ - Then the result should be, in any order, and the columns 0,1 should be hashed: - | SrcVID | DstVID | Ranking | startYear | - | 'Russell Westbrook' | 'Thunders' | 0 | 2008 | - | 'Marc Gasol' | 'Grizzlies' | 0 | 2008 | + Then the result should be, in any order: + | startYear | + | 2008 | + | 2008 | When executing query: """ LOOKUP ON like WHERE like.likeness < 50 + 1 YIELD like.likeness, edge as relationship """ - Then the result should be, in any order, and the columns 0,1 should be hashed: - | SrcVID | DstVID | Ranking | like.likeness | relationship | - | "Blake Griffin" | "Chris Paul" | 0 | -1 | [:like "Blake Griffin"->"Chris Paul" @0 {likeness: -1}] | - | "Dirk Nowitzki" | "Dwyane Wade" | 0 | 10 | [:like "Dirk Nowitzki"->"Dwyane Wade" @0 {likeness: 10}] | - | "Kyrie Irving" | "LeBron James" | 0 | 13 | [:like "Kyrie Irving"->"LeBron James" @0 {likeness: 13}] | - | "Marco Belinelli" | "Tony Parker" | 0 | 50 | [:like "Marco Belinelli"->"Tony Parker" @0 {likeness: 50}] | - | "Rajon Rondo" | "Ray Allen" | 0 | -1 | [:like "Rajon Rondo"->"Ray Allen" @0 {likeness: -1}] | - | "Ray Allen" | "Rajon Rondo" | 0 | 9 | [:like "Ray Allen"->"Rajon Rondo" @0 {likeness: 9}] | + Then the result should be, in any order: + | like.likeness | relationship | + | -1 | [:like "Blake Griffin"->"Chris Paul" @0 {likeness: -1}] | + | 10 | [:like "Dirk Nowitzki"->"Dwyane Wade" @0 {likeness: 10}] | + | 13 | [:like "Kyrie Irving"->"LeBron James" @0 {likeness: 13}] | + | 50 | [:like "Marco Belinelli"->"Tony Parker" @0 {likeness: 50}] | + | -1 | [:like "Rajon Rondo"->"Ray Allen" @0 {likeness: -1}] | + | 9 | [:like "Ray Allen"->"Rajon Rondo" @0 {likeness: 9}] | When executing query: """ LOOKUP ON serve WHERE serve.start_year == 2008 and serve.end_year == 2019 diff --git a/tests/tck/features/optimizer/CollapseProjectRule.feature b/tests/tck/features/optimizer/CollapseProjectRule.feature index 22712c9cb02..4d65cb3686b 100644 --- a/tests/tck/features/optimizer/CollapseProjectRule.feature +++ b/tests/tck/features/optimizer/CollapseProjectRule.feature @@ -36,9 +36,8 @@ Feature: Collapse Project Rule | 0 | Start | | | When profiling query: """ - LOOKUP ON player - WHERE player.name=='Tim Duncan' - | YIELD $-.VertexID AS vid + LOOKUP ON player WHERE player.name=='Tim Duncan' YIELD id(vertex) as id + | YIELD $-.id AS vid """ Then the result should be, in any order: | vid | diff --git a/tests/tck/features/optimizer/PushFilterDownLeftJoinRule.feature b/tests/tck/features/optimizer/PushFilterDownLeftJoinRule.feature index fe5b88a84e3..0eb9994526b 100644 --- a/tests/tck/features/optimizer/PushFilterDownLeftJoinRule.feature +++ b/tests/tck/features/optimizer/PushFilterDownLeftJoinRule.feature @@ -9,8 +9,8 @@ Feature: Push Filter down LeftJoin rule Scenario: push filter down LeftJoin When profiling query: """ - LOOKUP ON player WHERE player.name=='Tim Duncan' - | YIELD $-.VertexID AS vid + LOOKUP ON player WHERE player.name=='Tim Duncan' YIELD id(vertex) as id + | YIELD $-.id AS vid | GO FROM $-.vid OVER like BIDIRECT WHERE any(x in split($$.player.name, ' ') WHERE x contains 'Ti') YIELD $$.player.name, like._dst AS vid diff --git a/tests/tck/features/schema/CreateSpaceAs.feature b/tests/tck/features/schema/CreateSpaceAs.feature index 4c3fe5073fb..9398dd86bc7 100644 --- a/tests/tck/features/schema/CreateSpaceAs.feature +++ b/tests/tck/features/schema/CreateSpaceAs.feature @@ -53,11 +53,11 @@ Feature: Create space as another space | ("1" :t1{col1: 1}) | When executing query: """ - lookup on t1 where t1.col1 == 1; + lookup on t1 where t1.col1 == 1 YIELD id(vertex) as id; """ Then the result should be, in any order: - | VertexID | - | "1" | + | id | + | "1" | When executing query: """ fetch prop on e1 "1" -> "2" YIELD edge as e; @@ -67,11 +67,11 @@ Feature: Create space as another space | [:e1 "1"->"2" @0 {col1: 1}] | When executing query: """ - lookup on e1 where e1.col1 == 1; + lookup on e1 where e1.col1 == 1 YIELD src(edge) as src, dst(edge) as dst, rank(edge) as rank; """ Then the result should be, in any order: - | SrcVID | DstVID | Ranking | - | "1" | "2" | 0 | + | src | dst | rank | + | "1" | "2" | 0 | # clone space When clone a new space according to current space And wait 3 seconds @@ -138,11 +138,11 @@ Feature: Create space as another space | ("1" :t1{col1: 2}) | When executing query: """ - lookup on t1 where t1.col1 == 2; + lookup on t1 where t1.col1 == 2 YIELD id(vertex) as id; """ Then the result should be, in any order: - | VertexID | - | "1" | + | id | + | "1" | When executing query: """ fetch prop on e1 "1" -> "2" YIELD edge as e; @@ -152,9 +152,9 @@ Feature: Create space as another space | [:e1 "1"->"2" @0 {col1: 2}] | When executing query: """ - lookup on e1 where e1.col1 == 2; + lookup on e1 where e1.col1 == 2 YIELD src(edge) as src, dst(edge) as dst, rank(edge) as rank; """ Then the result should be, in any order: - | SrcVID | DstVID | Ranking | - | "1" | "2" | 0 | + | src | dst | rank | + | "1" | "2" | 0 | Then drop the used space diff --git a/tests/tck/features/subgraph/subgraph.IntVid.feature b/tests/tck/features/subgraph/subgraph.IntVid.feature index 5c510feec24..fe051ef5dd8 100644 --- a/tests/tck/features/subgraph/subgraph.IntVid.feature +++ b/tests/tck/features/subgraph/subgraph.IntVid.feature @@ -9,12 +9,12 @@ Feature: Integer Vid subgraph Scenario: Integer Vid invalid input When executing query: """ - GET SUBGRAPH WITH PROP FROM $-.id + GET SUBGRAPH WITH PROP FROM $-.id YIELD vertices as nodes """ Then a SemanticError should be raised at runtime: `$-.id', not exist prop `id' When executing query: """ - GET SUBGRAPH WITH PROP FROM $a.id + GET SUBGRAPH WITH PROP FROM $a.id YIELD edges as relationships """ Then a SemanticError should be raised at runtime: `$a.id', not exist variable `a' When executing query: @@ -34,881 +34,30 @@ Feature: Integer Vid subgraph Then a SyntaxError should be raised at runtime: please add alias when using `edges'. near `edges' When executing query: """ - GO FROM hash("Tim Duncan") OVER like YIELD $$.player.name AS id | GET SUBGRAPH WITH PROP FROM $-.id + GO FROM hash("Tim Duncan") OVER like YIELD $$.player.name AS id | GET SUBGRAPH WITH PROP FROM $-.id YIELD vertices as a """ Then a SemanticError should be raised at runtime: `$-.id', the srcs should be type of INT64, but was`STRING' When executing query: """ - $a = GO FROM hash("Tim Duncan") OVER like YIELD $$.player.name AS ID; GET SUBGRAPH WITH PROP FROM $a.ID + $a = GO FROM hash("Tim Duncan") OVER like YIELD $$.player.name AS ID; GET SUBGRAPH WITH PROP FROM $a.ID YIELD edges as b """ Then a SemanticError should be raised at runtime: `$a.ID', the srcs should be type of INT64, but was`STRING' When executing query: """ - $a = GO FROM hash("Tim Duncan") OVER like YIELD like._src AS src; GET SUBGRAPH WITH PROP FROM $b.src + $a = GO FROM hash("Tim Duncan") OVER like YIELD like._src AS src; GET SUBGRAPH WITH PROP FROM $b.src YIELD vertices as a, edges as b """ Then a SemanticError should be raised at runtime: `$b.src', not exist variable `b' When executing query: """ - GO FROM hash("Tim Duncan") OVER like YIELD like._dst AS id, like._src AS id | GET SUBGRAPH WITH PROP FROM $-.id + GO FROM hash("Tim Duncan") OVER like YIELD like._dst AS id, like._src AS id | GET SUBGRAPH WITH PROP FROM $-.id YIELD vertices as a """ Then a SemanticError should be raised at runtime: Duplicate Column Name : `id' When executing query: """ - $a = GO FROM hash("Tim Duncan") OVER like YIELD like._dst AS id, like._src AS id; GET SUBGRAPH WITH PROP FROM $a.id + $a = GO FROM hash("Tim Duncan") OVER like YIELD like._dst AS id, like._src AS id; GET SUBGRAPH WITH PROP FROM $a.id YIELD edges as b """ Then a SemanticError should be raised at runtime: Duplicate Column Name : `id' - Scenario: Integer Vid zero step - When executing query: - """ - GET SUBGRAPH WITH PROP 0 STEPS FROM hash("Tim Duncan") - """ - Then the result should be, in any order, with relax comparison: - | _vertices | - | [("Tim Duncan")] | - When executing query: - """ - GET SUBGRAPH WITH PROP 0 STEPS FROM hash("Tim Duncan"), hash("Spurs") - """ - Then the result should be, in any order, with relax comparison: - | _vertices | - | [("Tim Duncan"), ("Spurs")] | - When executing query: - """ - GET SUBGRAPH WITH PROP 0 STEPS FROM hash("Tim Duncan"), hash("Tony Parker"), hash("Spurs") - """ - Then the result should be, in any order, with relax comparison: - | _vertices | - | [("Tim Duncan"), ("Spurs"), ("Tony Parker")] | - When executing query: - """ - GO FROM hash('Tim Duncan') over serve YIELD serve._dst AS id | GET SUBGRAPH WITH PROP 0 STEPS FROM $-.id - """ - Then the result should be, in any order, with relax comparison: - | _vertices | - | [("Spurs")] | - When executing query: - """ - GO FROM hash('Tim Duncan') over like YIELD like._dst AS id | GET SUBGRAPH WITH PROP 0 STEPS FROM $-.id - """ - Then the result should be, in any order, with relax comparison: - | _vertices | - | [("Manu Ginobili"), ("Tony Parker")] | - When executing query: - """ - $a = GO FROM hash('Tim Duncan') over serve YIELD serve._dst AS id; GET SUBGRAPH WITH PROP 0 STEPS FROM $a.id - """ - Then the result should be, in any order, with relax comparison: - | _vertices | - | [("Spurs")] | - When executing query: - """ - $a = GO FROM hash('Tim Duncan') over like YIELD like._dst AS id; GET SUBGRAPH WITH PROP 0 STEPS FROM $a.id - """ - Then the result should be, in any order, with relax comparison: - | _vertices | - | [("Manu Ginobili"), ("Tony Parker")] | - - Scenario: Integer Vid subgraph - When executing query: - """ - GET SUBGRAPH WITH PROP FROM hash('Tim Duncan') - """ - Then define some list variables: - | edge1 | vertex2 | edge2 | - | [:teammate "Manu Ginobili"->"Tim Duncan"@0] | ("Danny Green") | [:teammate "Tony Parker"->"Manu Ginobili"@0] | - | [:teammate "Tony Parker"->"Tim Duncan"@0] | ("Manu Ginobili") | [:like "Dejounte Murray"->"Manu Ginobili"@0] | - | [:like "Aron Baynes"->"Tim Duncan"@0] | ("Aron Baynes") | [:like "Tiago Splitter"->"Manu Ginobili"@0] | - | [:like "Boris Diaw"->"Tim Duncan"@0] | ("Boris Diaw") | [:like "Tony Parker"->"Manu Ginobili"@0] | - | [:like "Danny Green"->"Tim Duncan"@0] | ("Shaquille O\'Neal") | [:serve "Manu Ginobili"->"Spurs"@0] | - | [:like "Dejounte Murray"->"Tim Duncan"@0] | ("Tony Parker") | [:teammate "Manu Ginobili"->"Tony Parker"@0] | - | [:like "LaMarcus Aldridge"->"Tim Duncan"@0] | ("Spurs") | [:serve "Aron Baynes"->"Spurs"@0] | - | [:like "Manu Ginobili"->"Tim Duncan"@0] | ("Dejounte Murray") | [:like "Boris Diaw"->"Tony Parker"@0] | - | [:like "Marco Belinelli"->"Tim Duncan"@0] | ("LaMarcus Aldridge") | [:serve "Boris Diaw"->"Spurs"@0] | - | [:like "Shaquille O\'Neal"->"Tim Duncan"@0] | ("Marco Belinelli") | [:like "Dejounte Murray"->"Tony Parker"@0] | - | [:like "Tiago Splitter"->"Tim Duncan"@0] | ("Tiago Splitter") | [:like "LaMarcus Aldridge"->"Tony Parker"@0] | - | [:like "Tony Parker"->"Tim Duncan"@0] | | [:like "Marco Belinelli"->"Tony Parker"@0] | - | [:like "Tim Duncan"->"Manu Ginobili"@0] | | [:like "Tony Parker"->"LaMarcus Aldridge"@0] | - | [:like "Tim Duncan"->"Tony Parker"@0] | | [:serve "Tony Parker"->"Spurs"@0] | - | [:serve "Tim Duncan"->"Spurs"@0] | | [:teammate "Tony Parker"->"LaMarcus Aldridge"@0] | - | [:teammate "Tim Duncan"->"Danny Green"@0] | | [:serve "Dejounte Murray"->"Spurs"@0] | - | [:teammate "Tim Duncan"->"LaMarcus Aldridge"@0] | | [:serve "LaMarcus Aldridge"->"Spurs"@0] | - | [:teammate "Tim Duncan"->"Manu Ginobili"@0] | | [:serve "Marco Belinelli"->"Spurs"@0] | - | [:teammate "Tim Duncan"->"Tony Parker"@0] | | [:serve "Tiago Splitter"->"Spurs"@0] | - | | | [:serve "Marco Belinelli"->"Spurs"@1] | - | | | [:like "Dejounte Murray"->"Marco Belinelli"@0] | - | | | [:like "Dejounte Murray"->"Danny Green"@0] | - | | | [:like "Marco Belinelli"->"Danny Green"@0] | - | | | [:like "Danny Green"->"Marco Belinelli"@0] | - | | | [:serve "Danny Green"->"Spurs"@0] | - Then the result should be, in any order, with relax comparison: - | _vertices | _edges | - | [("Tim Duncan")] | <[edge1]> | - | <[vertex2]> | <[edge2]> | - - Scenario: Integer Vid two steps - When executing query: - """ - GET SUBGRAPH WITH PROP 2 STEPS FROM hash('Tim Duncan') - """ - Then define some list variables: - | edge1 | vertex2 | edge2 | vertex3 | edge3 | - | [:teammate "Manu Ginobili"->"Tim Duncan"@0] | ("Danny Green") | [:like "Dejounte Murray"->"Danny Green"@0] | ("Cavaliers") | [:serve "LeBron James"->"Cavaliers"@0] | - | [:teammate "Tony Parker"->"Tim Duncan"@0] | ("Manu Ginobili") | [:like "Marco Belinelli"->"Danny Green"@0] | ("Pistons") | [:serve "LeBron James"->"Cavaliers"@1] | - | [:like "Aron Baynes"->"Tim Duncan"@0] | ("Aron Baynes") | [:like "Danny Green"->"LeBron James"@0] | ("Damian Lillard") | [:serve "Damian Lillard"->"Trail Blazers"@0] | - | [:like "Boris Diaw"->"Tim Duncan"@0] | ("Boris Diaw") | [:like "Danny Green"->"Marco Belinelli"@0] | ("Kings") | [:serve "Rudy Gay"->"Kings"@0] | - | [:like "Danny Green"->"Tim Duncan"@0] | ("Shaquille O\'Neal") | [:serve "Danny Green"->"Cavaliers"@0] | ("Raptors") | [:serve "Cory Joseph"->"Raptors"@0] | - | [:like "Dejounte Murray"->"Tim Duncan"@0] | ("Tony Parker") | [:serve "Danny Green"->"Raptors"@0] | ("Jazz") | [:serve "Rudy Gay"->"Raptors"@0] | - | [:like "LaMarcus Aldridge"->"Tim Duncan"@0] | ("Spurs") | [:serve "Danny Green"->"Spurs"@0] | ("LeBron James") | [:serve "Tracy McGrady"->"Raptors"@0] | - | [:like "Manu Ginobili"->"Tim Duncan"@0] | ("Dejounte Murray") | [:teammate "Tony Parker"->"Manu Ginobili"@0] | ("Paul Gasol") | [:like "Chris Paul"->"LeBron James"@0] | - | [:like "Marco Belinelli"->"Tim Duncan"@0] | ("LaMarcus Aldridge") | [:like "Dejounte Murray"->"Manu Ginobili"@0] | ("Kyle Anderson") | [:serve "LeBron James"->"Heat"@0] | - | [:like "Shaquille O\'Neal"->"Tim Duncan"@0] | ("Marco Belinelli") | [:like "Tiago Splitter"->"Manu Ginobili"@0] | ("Rudy Gay") | [:serve "LeBron James"->"Lakers"@0] | - | [:like "Tiago Splitter"->"Tim Duncan"@0] | ("Tiago Splitter") | [:like "Tony Parker"->"Manu Ginobili"@0] | ("Kevin Durant") | [:serve "Paul Gasol"->"Bulls"@0] | - | [:like "Tony Parker"->"Tim Duncan"@0] | | [:serve "Manu Ginobili"->"Spurs"@0] | ("Yao Ming") | [:serve "Paul Gasol"->"Lakers"@0] | - | [:like "Tim Duncan"->"Manu Ginobili"@0] | | [:teammate "Manu Ginobili"->"Tony Parker"@0] | ("James Harden") | [:like "Tracy McGrady"->"Rudy Gay"@0] | - | [:like "Tim Duncan"->"Tony Parker"@0] | | [:serve "Aron Baynes"->"Celtics"@0] | ("Hornets") | [:serve "Kevin Durant"->"Warriors"@0] | - | [:serve "Tim Duncan"->"Spurs"@0] | | [:serve "Aron Baynes"->"Pistons"@0] | ("David West") | [:like "Yao Ming"->"Tracy McGrady"@0] | - | [:teammate "Tim Duncan"->"Danny Green"@0] | | [:serve "Aron Baynes"->"Spurs"@0] | ("Chris Paul") | [:like "Russell Westbrook"->"James Harden"@0] | - | [:teammate "Tim Duncan"->"LaMarcus Aldridge"@0] | | [:like "Boris Diaw"->"Tony Parker"@0] | ("Celtics") | [:like "James Harden"->"Russell Westbrook"@0] | - | [:teammate "Tim Duncan"->"Manu Ginobili"@0] | | [:serve "Boris Diaw"->"Hawks"@0] | ("Jonathon Simmons") | [:serve "Chris Paul"->"Hornets"@0] | - | [:teammate "Tim Duncan"->"Tony Parker"@0] | | [:serve "Boris Diaw"->"Hornets"@0] | ("Hawks") | [:serve "David West"->"Hornets"@0] | - | | | [:serve "Boris Diaw"->"Jazz"@0] | ("Heat") | [:serve "David West"->"Warriors"@0] | - | | | [:serve "Boris Diaw"->"Spurs"@0] | ("Lakers") | [:serve "Jonathon Simmons"->"76ers"@0] | - | | | [:serve "Boris Diaw"->"Suns"@0] | ("Suns") | [:serve "Jonathon Simmons"->"Magic"@0] | - | | | [:like "Yao Ming"->"Shaquille O\'Neal"@0] | ("Magic") | [:serve "JaVale McGee"->"Lakers"@0] | - | | | [:like "Shaquille O\'Neal"->"JaVale McGee"@0] | ("Trail Blazers") | [:serve "Tracy McGrady"->"Magic"@0] | - | | | [:serve "Shaquille O\'Neal"->"Cavaliers"@0] | ("76ers") | [:serve "JaVale McGee"->"Warriors"@0] | - | | | [:serve "Shaquille O\'Neal"->"Celtics"@0] | ("JaVale McGee") | | - | | | [:serve "Shaquille O\'Neal"->"Heat"@0] | ("Cory Joseph") | | - | | | [:serve "Shaquille O\'Neal"->"Lakers"@0] | ("Tracy McGrady") | | - | | | [:serve "Shaquille O\'Neal"->"Magic"@0] | ("Russell Westbrook") | | - | | | [:serve "Shaquille O\'Neal"->"Suns"@0] | ("Bulls") | | - | | | [:like "Dejounte Murray"->"Tony Parker"@0] | ("Warriors") | | - | | | [:like "LaMarcus Aldridge"->"Tony Parker"@0] | | | - | | | [:like "Marco Belinelli"->"Tony Parker"@0] | | | - | | | [:like "Tony Parker"->"LaMarcus Aldridge"@0] | | | - | | | [:serve "Tony Parker"->"Hornets"@0] | | | - | | | [:serve "Tony Parker"->"Spurs"@0] | | | - | | | [:teammate "Tony Parker"->"Kyle Anderson"@0] | | | - | | | [:teammate "Tony Parker"->"LaMarcus Aldridge"@0] | | | - | | | [:serve "Cory Joseph"->"Spurs"@0] | | | - | | | [:serve "David West"->"Spurs"@0] | | | - | | | [:serve "Dejounte Murray"->"Spurs"@0] | | | - | | | [:serve "Jonathon Simmons"->"Spurs"@0] | | | - | | | [:serve "Kyle Anderson"->"Spurs"@0] | | | - | | | [:serve "LaMarcus Aldridge"->"Spurs"@0] | | | - | | | [:serve "Marco Belinelli"->"Spurs"@0] | | | - | | | [:serve "Paul Gasol"->"Spurs"@0] | | | - | | | [:serve "Rudy Gay"->"Spurs"@0] | | | - | | | [:serve "Tiago Splitter"->"Spurs"@0] | | | - | | | [:serve "Tracy McGrady"->"Spurs"@0] | | | - | | | [:serve "Marco Belinelli"->"Spurs"@1] | | | - | | | [:like "Dejounte Murray"->"Chris Paul"@0] | | | - | | | [:like "Dejounte Murray"->"James Harden"@0] | | | - | | | [:like "Dejounte Murray"->"Kevin Durant"@0] | | | - | | | [:like "Dejounte Murray"->"Kyle Anderson"@0] | | | - | | | [:like "Dejounte Murray"->"LeBron James"@0] | | | - | | | [:like "Dejounte Murray"->"Marco Belinelli"@0] | | | - | | | [:like "Dejounte Murray"->"Russell Westbrook"@0] | | | - | | | [:like "Damian Lillard"->"LaMarcus Aldridge"@0] | | | - | | | [:like "Rudy Gay"->"LaMarcus Aldridge"@0] | | | - | | | [:serve "LaMarcus Aldridge"->"Trail Blazers"@0] | | | - | | | [:serve "Marco Belinelli"->"76ers"@0] | | | - | | | [:serve "Marco Belinelli"->"Bulls"@0] | | | - | | | [:serve "Marco Belinelli"->"Hawks"@0] | | | - | | | [:serve "Marco Belinelli"->"Hornets"@0] | | | - | | | [:serve "Marco Belinelli"->"Kings"@0] | | | - | | | [:serve "Marco Belinelli"->"Raptors"@0] | | | - | | | [:serve "Marco Belinelli"->"Warriors"@0] | | | - | | | [:serve "Marco Belinelli"->"Hornets"@1] | | | - | | | [:serve "Tiago Splitter"->"76ers"@0] | | | - | | | [:serve "Tiago Splitter"->"Hawks"@0] | | | - Then the result should be, in any order, with relax comparison: - | _vertices | _edges | - | [("Tim Duncan")] | <[edge1]> | - | <[vertex2]> | <[edge2]> | - | <[vertex3]> | <[edge3]> | - - Scenario: Integer Vid in edge - When executing query: - """ - GET SUBGRAPH WITH PROP 2 STEPS FROM hash('Tim Duncan') IN like, serve - """ - Then define some list variables: - | edge1 | vertex2 | edge2 | vertex3 | - | [:like "Aron Baynes"->"Tim Duncan"@0] | ("LaMarcus Aldridge") | [:like "Damian Lillard"->"LaMarcus Aldridge"@0] | ("Damian Lillard") | - | [:like "Boris Diaw"->"Tim Duncan"@0] | ("Danny Green") | [:like "Rudy Gay"->"LaMarcus Aldridge"@0] | ("Yao Ming") | - | [:like "Danny Green"->"Tim Duncan"@0] | ("Marco Belinelli") | [:like "Tony Parker"->"LaMarcus Aldridge"@0] | ("Rudy Gay") | - | [:like "Dejounte Murray"->"Tim Duncan"@0] | ("Manu Ginobili") | [:like "Dejounte Murray"->"Danny Green"@0] | | - | [:like "LaMarcus Aldridge"->"Tim Duncan"@0] | ("Shaquille O'Neal") | [:like "Marco Belinelli"->"Danny Green"@0] | | - | [:like "Manu Ginobili"->"Tim Duncan"@0] | ("Tony Parker") | [:like "Danny Green"->"Marco Belinelli"@0] | | - | [:like "Marco Belinelli"->"Tim Duncan"@0] | ("Boris Diaw") | [:like "Dejounte Murray"->"Marco Belinelli"@0] | | - | [:like "Shaquille O'Neal"->"Tim Duncan"@0] | ("Dejounte Murray") | [:like "Dejounte Murray"->"Manu Ginobili"@0] | | - | [:like "Tiago Splitter"->"Tim Duncan"@0] | ("Aron Baynes") | [:like "Tiago Splitter"->"Manu Ginobili"@0] | | - | [:like "Tony Parker"->"Tim Duncan"@0] | ("Tiago Splitter") | [:like "Tim Duncan"->"Manu Ginobili"@0] | | - | | | [:like "Tony Parker"->"Manu Ginobili"@0] | | - | | | [:like "Yao Ming"->"Shaquille O'Neal"@0] | | - | | | [:like "Boris Diaw"->"Tony Parker"@0] | | - | | | [:like "Dejounte Murray"->"Tony Parker"@0] | | - | | | [:like "LaMarcus Aldridge"->"Tony Parker"@0] | | - | | | [:like "Marco Belinelli"->"Tony Parker"@0] | | - | | | [:like "Tim Duncan"->"Tony Parker"@0] | | - Then the result should be, in any order, with relax comparison: - | _vertices | _edges | - | [("Tim Duncan")] | <[edge1]> | - | <[vertex2]> | <[edge2]> | - | <[vertex3]> | [] | - - Scenario: Integer Vid in and out edge - When executing query: - """ - GET SUBGRAPH WITH PROP 2 STEPS FROM hash('Tim Duncan') IN like OUT serve - """ - Then define some list variables: - | edge1 | vertex2 | edge2 | vertex3 | edge3 | - | [:serve "Tim Duncan"->"Spurs"@0] | ("LaMarcus Aldridge") | [:serve "LaMarcus Aldridge"->"Spurs"@0] | ("Damian Lillard") | [:serve "Damian Lillard"->"Trail Blazers"@0] | - | [:like "Aron Baynes"->"Tim Duncan"@0] | ("Danny Green") | [:serve "LaMarcus Aldridge"->"Trail Blazers"@0] | ("Rudy Gay") | [:serve "Rudy Gay"->"Spurs"@0] | - | [:like "Boris Diaw"->"Tim Duncan"@0] | ("Marco Belinelli") | [:like "Damian Lillard"->"LaMarcus Aldridge"@0] | ("Hornets") | [:serve "Rudy Gay"->"Raptors"@0] | - | [:like "Danny Green"->"Tim Duncan"@0] | ("Boris Diaw") | [:like "Rudy Gay"->"LaMarcus Aldridge"@0] | ("Heat") | [:serve "Rudy Gay"->"Kings"@0] | - | [:like "Dejounte Murray"->"Tim Duncan"@0] | ("Dejounte Murray") | [:like "Tony Parker"->"LaMarcus Aldridge"@0] | ("76ers") | | - | [:like "LaMarcus Aldridge"->"Tim Duncan"@0] | ("Aron Baynes") | [:serve "Danny Green"->"Cavaliers"@0] | ("Bulls") | | - | [:like "Manu Ginobili"->"Tim Duncan"@0] | ("Manu Ginobili") | [:serve "Danny Green"->"Raptors"@0] | ("Trail Blazers") | | - | [:like "Marco Belinelli"->"Tim Duncan"@0] | ("Tiago Splitter") | [:serve "Danny Green"->"Spurs"@0] | ("Celtics") | | - | [:like "Shaquille O'Neal"->"Tim Duncan"@0] | ("Shaquille O'Neal") | [:like "Dejounte Murray"->"Danny Green"@0] | ("Kings") | | - | [:like "Tiago Splitter"->"Tim Duncan"@0] | ("Tony Parker") | [:like "Marco Belinelli"->"Danny Green"@0] | ("Hawks") | | - | [:like "Tony Parker"->"Tim Duncan"@0] | ("Spurs") | [:serve "Marco Belinelli"->"76ers"@0] | ("Warriors") | | - | | | [:serve "Marco Belinelli"->"Bulls"@0] | ("Cavaliers") | | - | | | [:serve "Marco Belinelli"->"Hawks"@0] | ("Raptors") | | - | | | [:serve "Marco Belinelli"->"Hornets"@0] | ("Jazz") | | - | | | [:serve "Marco Belinelli"->"Kings"@0] | ("Pistons") | | - | | | [:serve "Marco Belinelli"->"Raptors"@0] | ("Lakers") | | - | | | [:serve "Marco Belinelli"->"Spurs"@0] | ("Suns") | | - | | | [:serve "Marco Belinelli"->"Warriors"@0] | ("Magic") | | - | | | [:serve "Marco Belinelli"->"Hornets"@1] | ("Yao Ming") | | - | | | [:serve "Marco Belinelli"->"Spurs"@1] | | | - | | | [:like "Danny Green"->"Marco Belinelli"@0] | | | - | | | [:like "Dejounte Murray"->"Marco Belinelli"@0] | | | - | | | [:serve "Boris Diaw"->"Hawks"@0] | | | - | | | [:serve "Boris Diaw"->"Hornets"@0] | | | - | | | [:serve "Boris Diaw"->"Jazz"@0] | | | - | | | [:serve "Boris Diaw"->"Spurs"@0] | | | - | | | [:serve "Boris Diaw"->"Suns"@0] | | | - | | | [:serve "Dejounte Murray"->"Spurs"@0] | | | - | | | [:serve "Aron Baynes"->"Celtics"@0] | | | - | | | [:serve "Aron Baynes"->"Pistons"@0] | | | - | | | [:serve "Aron Baynes"->"Spurs"@0] | | | - | | | [:serve "Manu Ginobili"->"Spurs"@0] | | | - | | | [:like "Dejounte Murray"->"Manu Ginobili"@0] | | | - | | | [:like "Tiago Splitter"->"Manu Ginobili"@0] | | | - | | | [:like "Tim Duncan"->"Manu Ginobili"@0] | | | - | | | [:like "Tony Parker"->"Manu Ginobili"@0] | | | - | | | [:serve "Tiago Splitter"->"76ers"@0] | | | - | | | [:serve "Tiago Splitter"->"Hawks"@0] | | | - | | | [:serve "Tiago Splitter"->"Spurs"@0] | | | - | | | [:serve "Shaquille O'Neal"->"Cavaliers"@0] | | | - | | | [:serve "Shaquille O'Neal"->"Celtics"@0] | | | - | | | [:serve "Shaquille O'Neal"->"Heat"@0] | | | - | | | [:serve "Shaquille O'Neal"->"Lakers"@0] | | | - | | | [:serve "Shaquille O'Neal"->"Magic"@0] | | | - | | | [:serve "Shaquille O'Neal"->"Suns"@0] | | | - | | | [:like "Yao Ming"->"Shaquille O'Neal"@0] | | | - | | | [:serve "Tony Parker"->"Hornets"@0] | | | - | | | [:serve "Tony Parker"->"Spurs"@0] | | | - | | | [:like "Boris Diaw"->"Tony Parker"@0] | | | - | | | [:like "Dejounte Murray"->"Tony Parker"@0] | | | - | | | [:like "LaMarcus Aldridge"->"Tony Parker"@0] | | | - | | | [:like "Marco Belinelli"->"Tony Parker"@0] | | | - | | | [:like "Tim Duncan"->"Tony Parker"@0] | | | - Then the result should be, in any order, with relax comparison: - | _vertices | _edges | - | [("Tim Duncan")] | <[edge1]> | - | <[vertex2]> | <[edge2]> | - | <[vertex3]> | <[edge3]> | - - Scenario: Integer Vid two steps in and out edge - When executing query: - """ - GET SUBGRAPH WITH PROP 2 STEPS FROM hash('Tim Duncan'), hash('James Harden') IN teammate OUT serve - """ - Then define some list variables: - | vertex1 | edge1 | vertex2 | edge2 | vertex3 | - | ("Tim Duncan") | [:serve "Tim Duncan"->"Spurs"@0] | ("Manu Ginobili") | [:serve "Manu Ginobili"->"Spurs"@0] | ("Hornets") | - | ("James Harden") | [:teammate "Manu Ginobili"->"Tim Duncan"@0] | ("Tony Parker") | [:teammate "Tim Duncan"->"Manu Ginobili"@0] | | - | | [:teammate "Tony Parker"->"Tim Duncan"@0] | ("Spurs") | [:teammate "Tony Parker"->"Manu Ginobili"@0] | | - | | [:serve "James Harden"->"Rockets"@0] | ("Rockets") | [:serve "Tony Parker"->"Hornets"@0] | | - | | [:serve "James Harden"->"Thunders"@0] | ("Thunders") | [:serve "Tony Parker"->"Spurs"@0] | | - | | | | [:teammate "Manu Ginobili"->"Tony Parker"@0] | | - | | | | [:teammate "Tim Duncan"->"Tony Parker"@0] | | - Then the result should be, in any order, with relax comparison: - | _vertices | _edges | - | <[vertex1]> | <[edge1]> | - | <[vertex2]> | <[edge2]> | - | <[vertex3]> | [] | - - Scenario: Integer Vid three steps - When executing query: - """ - GET SUBGRAPH WITH PROP 3 STEPS FROM hash('Paul George') OUT serve BOTH like - """ - Then define some list variables: - | edge1 | edge2 | edge3 | vertex4 | edge4 | - | [:like "Russell Westbrook"->"Paul George"@0] | [:like "Dejounte Murray"->"Russell Westbrook"@0] | [:serve "Dejounte Murray"->"Spurs"@0] | ("Kyle Anderson") | [:like "Tony Parker"->"Tim Duncan"@0] | - | [:serve "Paul George"->"Pacers"@0] | [:like "James Harden"->"Russell Westbrook"@0] | [:like "Dejounte Murray"->"Chris Paul"@0] | ("Tony Parker") | [:serve "Kyle Anderson"->"Spurs"@0] | - | [:serve "Paul George"->"Thunders"@0] | [:serve "Russell Westbrook"->"Thunders"@0] | [:like "Dejounte Murray"->"Danny Green"@0] | ("Danny Green") | [:like "Marco Belinelli"->"Danny Green"@0] | - | [:like "Paul George"->"Russell Westbrook"@0] | [:like "Russell Westbrook"->"James Harden"@0] | [:like "Dejounte Murray"->"James Harden"@0] | ("Luka Doncic") | [:like "Tony Parker"->"Manu Ginobili"@0] | - | | | [:like "Dejounte Murray"->"Kevin Durant"@0] | ("Tim Duncan") | [:serve "Tony Parker"->"Spurs"@0] | - | | | [:like "Dejounte Murray"->"Kyle Anderson"@0] | ("Marco Belinelli") | [:serve "Danny Green"->"Spurs"@0] | - | | | [:like "Dejounte Murray"->"LeBron James"@0] | ("Kevin Durant") | [:like "Danny Green"->"LeBron James"@0] | - | | | [:like "Dejounte Murray"->"Manu Ginobili"@0] | ("Manu Ginobili") | [:like "Danny Green"->"Marco Belinelli"@0] | - | | | [:like "Dejounte Murray"->"Marco Belinelli"@0] | ("Chris Paul") | [:like "Danny Green"->"Tim Duncan"@0] | - | | | [:like "Dejounte Murray"->"Tim Duncan"@0] | ("LeBron James") | [:like "Tim Duncan"->"Tony Parker"@0] | - | | | [:like "Dejounte Murray"->"Tony Parker"@0] | ("Spurs") | [:like "Marco Belinelli"->"Tony Parker"@0] | - | | | [:like "Luka Doncic"->"James Harden"@0] | ("Rockets") | [:like "Tim Duncan"->"Manu Ginobili"@0] | - | | | [:serve "James Harden"->"Rockets"@0] | | [:serve "Tim Duncan"->"Spurs"@0] | - | | | [:serve "James Harden"->"Thunders"@0] | | [:like "Marco Belinelli"->"Tim Duncan"@0] | - | | | | | [:like "Manu Ginobili"->"Tim Duncan"@0] | - | | | | | [:serve "Marco Belinelli"->"Spurs"@0] | - | | | | | [:serve "Kevin Durant"->"Thunders"@0] | - | | | | | [:serve "Marco Belinelli"->"Spurs"@1] | - | | | | | [:serve "Manu Ginobili"->"Spurs"@0] | - | | | | | [:serve "Chris Paul"->"Rockets"@0] | - | | | | | [:like "Chris Paul"->"LeBron James"@0] | - Then the result should be, in any order, with relax comparison: - | _vertices | _edges | - | [("Paul George")] | <[edge1]> | - | [("Russell Westbrook"), ("Pacers"), ("Thunders")] | <[edge2]> | - | [("Dejounte Murray"), ("James Harden")] | <[edge3]> | - | <[vertex4]> | <[edge4]> | - - Scenario: Integer Vid bidirect edge - When executing query: - """ - GET SUBGRAPH WITH PROP FROM hash('Tony Parker') BOTH like - """ - Then define some list variables: - | edge1 | vertex2 | edge2 | - | [:like "Boris Diaw"->"Tony Parker"@0] | ("Manu Ginobili") | [:like "Manu Ginobili"->"Tim Duncan"@0] | - | [:like "Dejounte Murray"->"Tony Parker"@0] | ("Marco Belinelli") | [:like "Dejounte Murray"->"Marco Belinelli"@0] | - | [:like "LaMarcus Aldridge"->"Tony Parker"@0] | ("Tim Duncan") | [:like "Marco Belinelli"->"Tim Duncan"@0] | - | [:like "Marco Belinelli"->"Tony Parker"@0] | ("Dejounte Murray") | [:like "Tim Duncan"->"Manu Ginobili"@0] | - | [:like "Tim Duncan"->"Tony Parker"@0] | ("LaMarcus Aldridge") | [:like "Boris Diaw"->"Tim Duncan"@0] | - | [:like "Tony Parker"->"LaMarcus Aldridge"@0] | ("Boris Diaw") | [:like "Dejounte Murray"->"Manu Ginobili"@0] | - | [:like "Tony Parker"->"Manu Ginobili"@0] | | [:like "Dejounte Murray"->"Tim Duncan"@0] | - | [:like "Tony Parker"->"Tim Duncan"@0] | | [:like "LaMarcus Aldridge"->"Tim Duncan"@0] | - Then the result should be, in any order, with relax comparison: - | _vertices | _edges | - | [("Tony Parker")] | <[edge1]> | - | <[vertex2]> | <[edge2]> | - - Scenario: Integer Vid pipe - When executing query: - """ - GO FROM hash('Tim Duncan') over serve YIELD serve._src AS id | GET SUBGRAPH WITH PROP FROM $-.id - """ - Then define some list variables: - | edge1 | vertex2 | edge2 | - | [:teammate "Manu Ginobili"->"Tim Duncan"@0] | ("Danny Green") | [:like "Dejounte Murray"->"Danny Green"@0] | - | [:teammate "Tony Parker"->"Tim Duncan"@0] | ("Manu Ginobili") | [:like "Marco Belinelli"->"Danny Green"@0] | - | [:like "Aron Baynes"->"Tim Duncan"@0] | ("Aron Baynes") | [:like "Danny Green"->"Marco Belinelli"@0] | - | [:like "Boris Diaw"->"Tim Duncan"@0] | ("Boris Diaw") | [:serve "Danny Green"->"Spurs"@0] | - | [:like "Danny Green"->"Tim Duncan"@0] | ("Shaquille O\'Neal") | [:teammate "Tony Parker"->"Manu Ginobili"@0] | - | [:like "Dejounte Murray"->"Tim Duncan"@0] | ("Tony Parker") | [:like "Dejounte Murray"->"Manu Ginobili"@0] | - | [:like "LaMarcus Aldridge"->"Tim Duncan"@0] | ("Spurs") | [:like "Tiago Splitter"->"Manu Ginobili"@0] | - | [:like "Manu Ginobili"->"Tim Duncan"@0] | ("Dejounte Murray") | [:like "Tony Parker"->"Manu Ginobili"@0] | - | [:like "Marco Belinelli"->"Tim Duncan"@0] | ("LaMarcus Aldridge") | [:serve "Manu Ginobili"->"Spurs"@0] | - | [:like "Shaquille O\'Neal"->"Tim Duncan"@0] | ("Marco Belinelli") | [:teammate "Manu Ginobili"->"Tony Parker"@0] | - | [:like "Tiago Splitter"->"Tim Duncan"@0] | ("Tiago Splitter") | [:serve "Aron Baynes"->"Spurs"@0] | - | [:like "Tony Parker"->"Tim Duncan"@0] | | [:like "Boris Diaw"->"Tony Parker"@0] | - | [:like "Tim Duncan"->"Manu Ginobili"@0] | | [:serve "Boris Diaw"->"Spurs"@0] | - | [:like "Tim Duncan"->"Tony Parker"@0] | | [:like "Dejounte Murray"->"Tony Parker"@0] | - | [:serve "Tim Duncan"->"Spurs"@0] | | [:like "LaMarcus Aldridge"->"Tony Parker"@0] | - | [:teammate "Tim Duncan"->"Danny Green"@0] | | [:like "Marco Belinelli"->"Tony Parker"@0] | - | [:teammate "Tim Duncan"->"LaMarcus Aldridge"@0] | | [:like "Tony Parker"->"LaMarcus Aldridge"@0] | - | [:teammate "Tim Duncan"->"Manu Ginobili"@0] | | [:serve "Tony Parker"->"Spurs"@0] | - | [:teammate "Tim Duncan"->"Tony Parker"@0] | | [:teammate "Tony Parker"->"LaMarcus Aldridge"@0] | - | | | [:serve "Dejounte Murray"->"Spurs"@0] | - | | | [:serve "LaMarcus Aldridge"->"Spurs"@0] | - | | | [:serve "Marco Belinelli"->"Spurs"@0] | - | | | [:serve "Tiago Splitter"->"Spurs"@0] | - | | | [:serve "Marco Belinelli"->"Spurs"@1] | - | | | [:like "Dejounte Murray"->"Marco Belinelli"@0] | - Then the result should be, in any order, with relax comparison: - | _vertices | _edges | - | [("Tim Duncan")] | <[edge1]> | - | <[vertex2]> | <[edge2]> | - - Scenario: Integer Vid var - When executing query: - """ - $a = GO FROM hash('Tim Duncan') over serve YIELD serve._src AS id; - GET SUBGRAPH WITH PROP FROM $a.id - """ - Then define some list variables: - | edge1 | vertex2 | edge2 | - | [:teammate "Manu Ginobili"->"Tim Duncan"@0] | ("Danny Green") | [:like "Dejounte Murray"->"Danny Green"@0] | - | [:teammate "Tony Parker"->"Tim Duncan"@0] | ("Manu Ginobili") | [:like "Marco Belinelli"->"Danny Green"@0] | - | [:like "Aron Baynes"->"Tim Duncan"@0] | ("Aron Baynes") | [:like "Danny Green"->"Marco Belinelli"@0] | - | [:like "Boris Diaw"->"Tim Duncan"@0] | ("Boris Diaw") | [:serve "Danny Green"->"Spurs"@0] | - | [:like "Danny Green"->"Tim Duncan"@0] | ("Shaquille O\'Neal") | [:teammate "Tony Parker"->"Manu Ginobili"@0] | - | [:like "Dejounte Murray"->"Tim Duncan"@0] | ("Tony Parker") | [:like "Dejounte Murray"->"Manu Ginobili"@0] | - | [:like "LaMarcus Aldridge"->"Tim Duncan"@0] | ("Spurs") | [:like "Tiago Splitter"->"Manu Ginobili"@0] | - | [:like "Manu Ginobili"->"Tim Duncan"@0] | ("Dejounte Murray") | [:like "Tony Parker"->"Manu Ginobili"@0] | - | [:like "Marco Belinelli"->"Tim Duncan"@0] | ("LaMarcus Aldridge") | [:serve "Manu Ginobili"->"Spurs"@0] | - | [:like "Shaquille O\'Neal"->"Tim Duncan"@0] | ("Marco Belinelli") | [:teammate "Manu Ginobili"->"Tony Parker"@0] | - | [:like "Tiago Splitter"->"Tim Duncan"@0] | ("Tiago Splitter") | [:serve "Aron Baynes"->"Spurs"@0] | - | [:like "Tony Parker"->"Tim Duncan"@0] | | [:like "Boris Diaw"->"Tony Parker"@0] | - | [:like "Tim Duncan"->"Manu Ginobili"@0] | | [:serve "Boris Diaw"->"Spurs"@0] | - | [:like "Tim Duncan"->"Tony Parker"@0] | | [:like "Dejounte Murray"->"Tony Parker"@0] | - | [:serve "Tim Duncan"->"Spurs"@0] | | [:like "LaMarcus Aldridge"->"Tony Parker"@0] | - | [:teammate "Tim Duncan"->"Danny Green"@0] | | [:like "Marco Belinelli"->"Tony Parker"@0] | - | [:teammate "Tim Duncan"->"LaMarcus Aldridge"@0] | | [:like "Tony Parker"->"LaMarcus Aldridge"@0] | - | [:teammate "Tim Duncan"->"Manu Ginobili"@0] | | [:serve "Tony Parker"->"Spurs"@0] | - | [:teammate "Tim Duncan"->"Tony Parker"@0] | | [:teammate "Tony Parker"->"LaMarcus Aldridge"@0] | - | | | [:serve "Dejounte Murray"->"Spurs"@0] | - | | | [:serve "LaMarcus Aldridge"->"Spurs"@0] | - | | | [:serve "Marco Belinelli"->"Spurs"@0] | - | | | [:serve "Tiago Splitter"->"Spurs"@0] | - | | | [:serve "Marco Belinelli"->"Spurs"@1] | - | | | [:like "Dejounte Murray"->"Marco Belinelli"@0] | - Then the result should be, in any order, with relax comparison: - | _vertices | _edges | - | [("Tim Duncan")] | <[edge1]> | - | <[vertex2]> | <[edge2]> | - - Scenario: Integer Vid many steps - When executing query: - """ - GET SUBGRAPH WITH PROP 4 STEPS FROM hash('Yao Ming') IN teammate OUT serve - """ - Then the result should be, in any order, with relax comparison: - | _vertices | _edges | - | [("Yao Ming")] | [[:serve "Yao Ming"->"Rockets"@0]] | - | [("Rockets")] | [] | - When executing query: - """ - GET SUBGRAPH WITH PROP 4 STEPS FROM hash('NOBODY') IN teammate OUT serve - """ - Then the result should be, in any order, with relax comparison: - | _vertices | _edges | - | [("NOBODY")] | [] | - When executing query: - """ - GET SUBGRAPH WITH PROP 4 steps from hash('Yao Ming') IN teammate OUT serve BOTH like - """ - Then define some list variables: - | edge1 | vertex2 | edge2 | vertex3 | edge3 | vertex4 | edge4 | vertex5 | edge5 | - | [:serve "Yao Ming"->"Rockets"@0] | ("Shaquille O'Neal") | [:serve "Shaquille O'Neal"->"Cavaliers"@0] | ("Kobe Bryant") | [:serve "Kobe Bryant"->"Lakers"@0] | ("Manu Ginobili") | [:serve "Manu Ginobili"->"Spurs"@0] | ("Dirk Nowitzki") | [:like "Dirk Nowitzki"->"Steve Nash"@0] | - | [:like "Yao Ming"->"Shaquille O'Neal"@0] | ("Tracy McGrady") | [:serve "Shaquille O'Neal"->"Celtics"@0] | ("Grant Hill") | [:like "Paul Gasol"->"Kobe Bryant"@0] | ("Paul Gasol") | [:teammate "Tim Duncan"->"Manu Ginobili"@0] | ("Kevin Durant") | [:serve "Kevin Durant"->"Warriors"@0] | - | [:like "Yao Ming"->"Tracy McGrady"@0] | ("Rockets") | [:serve "Shaquille O'Neal"->"Heat"@0] | ("Vince Carter") | [:serve "Grant Hill"->"Clippers"@0] | ("Jason Kidd") | [:teammate "Tony Parker"->"Manu Ginobili"@0] | ("Damian Lillard") | [:serve "Damian Lillard"->"Trail Blazers"@0] | - | | | [:serve "Shaquille O'Neal"->"Lakers"@0] | ("Tim Duncan") | [:serve "Grant Hill"->"Magic"@0] | ("Tony Parker") | [:like "Dejounte Murray"->"Manu Ginobili"@0] | ("James Harden") | [:serve "James Harden"->"Rockets"@0] | - | | | [:serve "Shaquille O'Neal"->"Magic"@0] | ("JaVale McGee") | [:serve "Grant Hill"->"Pistons"@0] | ("Marco Belinelli") | [:like "Tiago Splitter"->"Manu Ginobili"@0] | ("Chris Paul") | [:like "Steve Nash"->"Dirk Nowitzki"@0] | - | | | [:serve "Shaquille O'Neal"->"Suns"@0] | ("Rudy Gay") | [:serve "Grant Hill"->"Suns"@0] | ("Dejounte Murray") | [:like "Tony Parker"->"Manu Ginobili"@0] | ("LeBron James") | [:like "Russell Westbrook"->"James Harden"@0] | - | | | [:like "Shaquille O'Neal"->"JaVale McGee"@0] | ("Magic") | [:serve "Vince Carter"->"Grizzlies"@0] | ("Aron Baynes") | [:serve "Paul Gasol"->"Bucks"@0] | ("Steve Nash") | [:like "James Harden"->"Russell Westbrook"@0] | - | | | [:like "Shaquille O'Neal"->"Tim Duncan"@0] | ("Spurs") | [:serve "Vince Carter"->"Hawks"@0] | ("Boris Diaw") | [:serve "Paul Gasol"->"Bulls"@0] | ("Marc Gasol") | [:serve "Chris Paul"->"Clippers"@0] | - | | | [:serve "Tracy McGrady"->"Magic"@0] | ("Celtics") | [:serve "Vince Carter"->"Kings"@0] | ("Danny Green") | [:serve "Paul Gasol"->"Grizzlies"@0] | ("Kyle Anderson") | [:serve "Chris Paul"->"Hornets"@0] | - | | | [:serve "Tracy McGrady"->"Raptors"@0] | ("Heat") | [:serve "Vince Carter"->"Magic"@0] | ("LaMarcus Aldridge") | [:serve "Paul Gasol"->"Lakers"@0] | ("Russell Westbrook") | [:serve "Chris Paul"->"Rockets"@0] | - | | | [:serve "Tracy McGrady"->"Rockets"@0] | ("Suns") | [:serve "Vince Carter"->"Mavericks"@0] | ("Tiago Splitter") | [:serve "Paul Gasol"->"Spurs"@0] | ("76ers") | [:serve "Dirk Nowitzki"->"Mavericks"@0] | - | | | [:serve "Tracy McGrady"->"Spurs"@0] | ("Lakers") | [:serve "Vince Carter"->"Nets"@0] | ("Pistons") | [:like "Marc Gasol"->"Paul Gasol"@0] | ("Hornets") | [:like "Chris Paul"->"LeBron James"@0] | - | | | [:like "Grant Hill"->"Tracy McGrady"@0] | ("Cavaliers") | [:serve "Vince Carter"->"Raptors"@0] | ("Nets") | [:like "Paul Gasol"->"Marc Gasol"@0] | ("Bucks") | [:serve "Steve Nash"->"Lakers"@0] | - | | | [:like "Vince Carter"->"Tracy McGrady"@0] | ("Raptors") | [:serve "Vince Carter"->"Suns"@0] | ("Kings") | [:serve "Jason Kidd"->"Knicks"@0] | ("Knicks") | [:serve "Steve Nash"->"Mavericks"@0] | - | | | [:like "Tracy McGrady"->"Grant Hill"@0] | | [:like "Jason Kidd"->"Vince Carter"@0] | ("Clippers") | [:serve "Jason Kidd"->"Mavericks"@0] | ("Bulls") | [:serve "Steve Nash"->"Suns"@0] | - | | | [:like "Tracy McGrady"->"Kobe Bryant"@0] | | [:like "Vince Carter"->"Jason Kidd"@0] | ("Mavericks") | [:serve "Jason Kidd"->"Nets"@0] | ("Trail Blazers") | [:serve "Steve Nash"->"Suns"@1] | - | | | [:like "Tracy McGrady"->"Rudy Gay"@0] | | [:serve "Tim Duncan"->"Spurs"@0] | ("Hawks") | [:serve "Jason Kidd"->"Suns"@0] | ("Jazz") | [:serve "LeBron James"->"Cavaliers"@1] | - | | | | | [:teammate "Manu Ginobili"->"Tim Duncan"@0] | ("Warriors") | [:serve "Jason Kidd"->"Mavericks"@1] | | [:serve "LeBron James"->"Lakers"@0] | - | | | | | [:teammate "Tony Parker"->"Tim Duncan"@0] | ("Nuggets") | [:like "Dirk Nowitzki"->"Jason Kidd"@0] | | [:serve "LeBron James"->"Heat"@0] | - | | | | | [:like "Aron Baynes"->"Tim Duncan"@0] | ("Grizzlies") | [:like "Steve Nash"->"Jason Kidd"@0] | | [:serve "Marc Gasol"->"Grizzlies"@0] | - | | | | | [:like "Boris Diaw"->"Tim Duncan"@0] | ("Wizards") | [:like "Jason Kidd"->"Dirk Nowitzki"@0] | | [:serve "Marc Gasol"->"Raptors"@0] | - | | | | | [:like "Danny Green"->"Tim Duncan"@0] | | [:like "Jason Kidd"->"Steve Nash"@0] | | [:serve "Kyle Anderson"->"Grizzlies"@0] | - | | | | | [:like "Dejounte Murray"->"Tim Duncan"@0] | | [:serve "Tony Parker"->"Hornets"@0] | | [:serve "Kyle Anderson"->"Spurs"@0] | - | | | | | [:like "LaMarcus Aldridge"->"Tim Duncan"@0] | | [:serve "Tony Parker"->"Spurs"@0] | | [:teammate "Tony Parker"->"Kyle Anderson"@0] | - | | | | | [:like "Manu Ginobili"->"Tim Duncan"@0] | | [:teammate "Manu Ginobili"->"Tony Parker"@0] | | [:serve "LeBron James"->"Cavaliers"@0] | - | | | | | [:like "Marco Belinelli"->"Tim Duncan"@0] | | [:teammate "Tim Duncan"->"Tony Parker"@0] | | | - | | | | | [:like "Tiago Splitter"->"Tim Duncan"@0] | | [:like "Boris Diaw"->"Tony Parker"@0] | | | - | | | | | [:like "Tony Parker"->"Tim Duncan"@0] | | [:like "Dejounte Murray"->"Tony Parker"@0] | | | - | | | | | [:like "Tim Duncan"->"Manu Ginobili"@0] | | [:like "LaMarcus Aldridge"->"Tony Parker"@0] | | | - | | | | | [:like "Tim Duncan"->"Tony Parker"@0] | | [:like "Marco Belinelli"->"Tony Parker"@0] | | | - | | | | | [:serve "JaVale McGee"->"Lakers"@0] | | [:like "Tony Parker"->"LaMarcus Aldridge"@0] | | | - | | | | | [:serve "JaVale McGee"->"Mavericks"@0] | | [:serve "Marco Belinelli"->"76ers"@0] | | | - | | | | | [:serve "JaVale McGee"->"Nuggets"@0] | | [:serve "Marco Belinelli"->"Bulls"@0] | | | - | | | | | [:serve "JaVale McGee"->"Warriors"@0] | | [:serve "Marco Belinelli"->"Hawks"@0] | | | - | | | | | [:serve "JaVale McGee"->"Wizards"@0] | | [:serve "Marco Belinelli"->"Hornets"@0] | | | - | | | | | [:serve "Rudy Gay"->"Grizzlies"@0] | | [:serve "Marco Belinelli"->"Kings"@0] | | | - | | | | | [:serve "Rudy Gay"->"Kings"@0] | | [:serve "Marco Belinelli"->"Raptors"@0] | | | - | | | | | [:serve "Rudy Gay"->"Raptors"@0] | | [:serve "Marco Belinelli"->"Spurs"@0] | | | - | | | | | [:serve "Rudy Gay"->"Spurs"@0] | | [:serve "Marco Belinelli"->"Warriors"@0] | | | - | | | | | [:like "Rudy Gay"->"LaMarcus Aldridge"@0] | | [:serve "Marco Belinelli"->"Hornets"@1] | | | - | | | | | | | [:serve "Marco Belinelli"->"Spurs"@1] | | | - | | | | | | | [:like "Danny Green"->"Marco Belinelli"@0] | | | - | | | | | | | [:like "Dejounte Murray"->"Marco Belinelli"@0] | | | - | | | | | | | [:like "Marco Belinelli"->"Danny Green"@0] | | | - | | | | | | | [:serve "Dejounte Murray"->"Spurs"@0] | | | - | | | | | | | [:like "Dejounte Murray"->"Chris Paul"@0] | | | - | | | | | | | [:like "Dejounte Murray"->"Danny Green"@0] | | | - | | | | | | | [:like "Dejounte Murray"->"James Harden"@0] | | | - | | | | | | | [:like "Dejounte Murray"->"Kevin Durant"@0] | | | - | | | | | | | [:like "Dejounte Murray"->"Kyle Anderson"@0] | | | - | | | | | | | [:like "Dejounte Murray"->"LeBron James"@0] | | | - | | | | | | | [:like "Dejounte Murray"->"Russell Westbrook"@0] | | | - | | | | | | | [:serve "Aron Baynes"->"Celtics"@0] | | | - | | | | | | | [:serve "Aron Baynes"->"Pistons"@0] | | | - | | | | | | | [:serve "Aron Baynes"->"Spurs"@0] | | | - | | | | | | | [:serve "Boris Diaw"->"Hawks"@0] | | | - | | | | | | | [:serve "Boris Diaw"->"Hornets"@0] | | | - | | | | | | | [:serve "Boris Diaw"->"Jazz"@0] | | | - | | | | | | | [:serve "Boris Diaw"->"Spurs"@0] | | | - | | | | | | | [:serve "Boris Diaw"->"Suns"@0] | | | - | | | | | | | [:serve "Danny Green"->"Cavaliers"@0] | | | - | | | | | | | [:serve "Danny Green"->"Raptors"@0] | | | - | | | | | | | [:serve "Danny Green"->"Spurs"@0] | | | - | | | | | | | [:teammate "Tim Duncan"->"Danny Green"@0] | | | - | | | | | | | [:like "Danny Green"->"LeBron James"@0] | | | - | | | | | | | [:serve "LaMarcus Aldridge"->"Spurs"@0] | | | - | | | | | | | [:serve "LaMarcus Aldridge"->"Trail Blazers"@0] | | | - | | | | | | | [:teammate "Tim Duncan"->"LaMarcus Aldridge"@0] | | | - | | | | | | | [:teammate "Tony Parker"->"LaMarcus Aldridge"@0] | | | - | | | | | | | [:like "Damian Lillard"->"LaMarcus Aldridge"@0] | | | - | | | | | | | [:serve "Tiago Splitter"->"76ers"@0] | | | - | | | | | | | [:serve "Tiago Splitter"->"Hawks"@0] | | | - | | | | | | | [:serve "Tiago Splitter"->"Spurs"@0] | | | - Then the result should be, in any order, with relax comparison: - | _vertices | _edges | - | [("Yao Ming")] | <[edge1]> | - | <[vertex2]> | <[edge2]> | - | <[vertex3]> | <[edge3]> | - | <[vertex4]> | <[edge4]> | - | <[vertex5]> | <[edge5]> | - When executing query: - """ - GET SUBGRAPH WITH PROP 5 steps from hash('Tony Parker') IN teammate OUT serve BOTH like - """ - Then define some list variables: - | edge1 | vertex2 | edge2 | vertex3 | edge3 | vertex4 | edge4 | vertex5 | edge5 | vertex6 | edge6 | - | [:serve "Tony Parker"->"Hornets"@0] | ("Tim Duncan") | [:serve "Tim Duncan"->"Spurs"@0] | ("Aron Baynes") | [:serve "Aron Baynes"->"Celtics"@0] | ("Yao Ming") | [:serve "Yao Ming"->"Rockets"@0] | ("Grant Hill") | [:serve "Grant Hill"->"Clippers"@0] | ("Steve Nash") | [:serve "Steve Nash"->"Lakers"@0] | - | [:serve "Tony Parker"->"Spurs"@0] | ("Boris Diaw") | [:teammate "Manu Ginobili"->"Tim Duncan"@0] | ("Rudy Gay") | [:serve "Aron Baynes"->"Pistons"@0] | ("Ray Allen") | [:like "Yao Ming"->"Tracy McGrady"@0] | ("Kristaps Porzingis") | [:serve "Grant Hill"->"Magic"@0] | ("Paul Gasol") | [:serve "Steve Nash"->"Mavericks"@0] | - | [:teammate "Manu Ginobili"->"Tony Parker"@0] | ("LaMarcus Aldridge") | [:teammate "Tony Parker"->"Tim Duncan"@0] | ("Damian Lillard") | [:serve "Aron Baynes"->"Spurs"@0] | ("Blake Griffin") | [:serve "Ray Allen"->"Bucks"@0] | ("Dirk Nowitzki") | [:serve "Grant Hill"->"Pistons"@0] | ("Jason Kidd") | [:serve "Steve Nash"->"Suns"@0] | - | [:teammate "Tim Duncan"->"Tony Parker"@0] | ("Manu Ginobili") | [:like "Aron Baynes"->"Tim Duncan"@0] | ("Kevin Durant") | [:serve "Rudy Gay"->"Grizzlies"@0] | ("Paul George") | [:serve "Ray Allen"->"Celtics"@0] | ("Rajon Rondo") | [:serve "Grant Hill"->"Suns"@0] | ("Pelicans") | [:serve "Steve Nash"->"Suns"@1] | - | [:like "Boris Diaw"->"Tony Parker"@0] | ("Marco Belinelli") | [:like "Boris Diaw"->"Tim Duncan"@0] | ("Shaquille O'Neal") | [:serve "Rudy Gay"->"Kings"@0] | ("JaVale McGee") | [:serve "Ray Allen"->"Heat"@0] | ("Vince Carter") | [:serve "Kristaps Porzingis"->"Knicks"@0] | ("Nets") | [:like "Jason Kidd"->"Steve Nash"@0] | - | [:like "Dejounte Murray"->"Tony Parker"@0] | ("Dejounte Murray") | [:like "Danny Green"->"Tim Duncan"@0] | ("Tiago Splitter") | [:serve "Rudy Gay"->"Raptors"@0] | ("Luka Doncic") | [:serve "Ray Allen"->"Thunders"@0] | ("Kobe Bryant") | [:serve "Kristaps Porzingis"->"Mavericks"@0] | | [:serve "Paul Gasol"->"Spurs"@0] | - | [:like "LaMarcus Aldridge"->"Tony Parker"@0] | ("Hornets") | [:like "Dejounte Murray"->"Tim Duncan"@0] | ("Russell Westbrook") | [:serve "Rudy Gay"->"Spurs"@0] | ("Carmelo Anthony") | [:like "Rajon Rondo"->"Ray Allen"@0] | ("Wizards") | [:serve "Dirk Nowitzki"->"Mavericks"@0] | | [:like "Steve Nash"->"Jason Kidd"@0] | - | [:like "Marco Belinelli"->"Tony Parker"@0] | ("Spurs") | [:like "LaMarcus Aldridge"->"Tim Duncan"@0] | ("Danny Green") | [:like "Tracy McGrady"->"Rudy Gay"@0] | ("Tracy McGrady") | [:like "Ray Allen"->"Rajon Rondo"@0] | ("Pacers") | [:like "Jason Kidd"->"Dirk Nowitzki"@0] | | [:serve "Paul Gasol"->"Lakers"@0] | - | [:like "Tim Duncan"->"Tony Parker"@0] | | [:like "Manu Ginobili"->"Tim Duncan"@0] | ("Kyle Anderson") | [:serve "Damian Lillard"->"Trail Blazers"@0] | ("Dwyane Wade") | [:serve "Blake Griffin"->"Clippers"@0] | ("Knicks") | [:like "Steve Nash"->"Dirk Nowitzki"@0] | | [:serve "Jason Kidd"->"Knicks"@0] | - | [:like "Tony Parker"->"LaMarcus Aldridge"@0] | | [:like "Marco Belinelli"->"Tim Duncan"@0] | ("James Harden") | [:serve "Kevin Durant"->"Thunders"@0] | ("Kyrie Irving") | [:serve "Blake Griffin"->"Pistons"@0] | ("Bucks") | [:like "Dirk Nowitzki"->"Jason Kidd"@0] | | [:serve "Jason Kidd"->"Mavericks"@0] | - | [:like "Tony Parker"->"Manu Ginobili"@0] | | [:like "Shaquille O'Neal"->"Tim Duncan"@0] | ("LeBron James") | [:serve "Kevin Durant"->"Warriors"@0] | ("Cavaliers") | [:serve "Paul George"->"Pacers"@0] | ("Mavericks") | [:like "Dirk Nowitzki"->"Steve Nash"@0] | | [:serve "Jason Kidd"->"Nets"@0] | - | [:like "Tony Parker"->"Tim Duncan"@0] | | [:like "Tiago Splitter"->"Tim Duncan"@0] | ("Chris Paul") | [:serve "Shaquille O'Neal"->"Cavaliers"@0] | ("Celtics") | [:serve "Paul George"->"Thunders"@0] | ("Nuggets") | [:serve "Rajon Rondo"->"Bulls"@0] | | [:serve "Jason Kidd"->"Suns"@0] | - | | | [:like "Tim Duncan"->"Manu Ginobili"@0] | ("Bulls") | [:serve "Shaquille O'Neal"->"Celtics"@0] | ("Pistons") | [:serve "JaVale McGee"->"Lakers"@0] | | [:serve "Rajon Rondo"->"Celtics"@0] | | [:serve "Jason Kidd"->"Mavericks"@1] | - | | | [:serve "Boris Diaw"->"Hawks"@0] | ("Jazz") | [:serve "Shaquille O'Neal"->"Heat"@0] | ("Grizzlies") | [:serve "JaVale McGee"->"Mavericks"@0] | | [:serve "Rajon Rondo"->"Kings"@0] | | [:serve "Paul Gasol"->"Bucks"@0] | - | | | [:serve "Boris Diaw"->"Hornets"@0] | ("Hawks") | [:serve "Shaquille O'Neal"->"Lakers"@0] | ("Heat") | [:serve "JaVale McGee"->"Nuggets"@0] | | [:serve "Rajon Rondo"->"Lakers"@0] | | [:serve "Paul Gasol"->"Bulls"@0] | - | | | [:serve "Boris Diaw"->"Jazz"@0] | ("Warriors") | [:serve "Shaquille O'Neal"->"Magic"@0] | ("Magic") | [:serve "JaVale McGee"->"Warriors"@0] | | [:serve "Rajon Rondo"->"Mavericks"@0] | | [:serve "Paul Gasol"->"Grizzlies"@0] | - | | | [:serve "Boris Diaw"->"Spurs"@0] | ("Suns") | [:serve "Shaquille O'Neal"->"Suns"@0] | ("Lakers") | [:serve "JaVale McGee"->"Wizards"@0] | | [:serve "Rajon Rondo"->"Pelicans"@0] | | | - | | | [:serve "Boris Diaw"->"Suns"@0] | ("Trail Blazers") | [:like "Yao Ming"->"Shaquille O'Neal"@0] | ("Clippers") | [:serve "Luka Doncic"->"Mavericks"@0] | | [:serve "Vince Carter"->"Grizzlies"@0] | | | - | | | [:serve "LaMarcus Aldridge"->"Spurs"@0] | ("Kings") | [:like "Shaquille O'Neal"->"JaVale McGee"@0] | ("Thunders") | [:like "Kristaps Porzingis"->"Luka Doncic"@0] | | [:serve "Vince Carter"->"Hawks"@0] | | | - | | | [:serve "LaMarcus Aldridge"->"Trail Blazers"@0] | ("Raptors") | [:serve "Tiago Splitter"->"76ers"@0] | ("Rockets") | [:like "Luka Doncic"->"Dirk Nowitzki"@0] | | [:serve "Vince Carter"->"Kings"@0] | | | - | | | [:teammate "Tim Duncan"->"LaMarcus Aldridge"@0] | ("76ers") | [:serve "Tiago Splitter"->"Hawks"@0] | | [:like "Luka Doncic"->"Kristaps Porzingis"@0] | | [:serve "Vince Carter"->"Magic"@0] | | | - | | | [:teammate "Tony Parker"->"LaMarcus Aldridge"@0] | | [:serve "Tiago Splitter"->"Spurs"@0] | | [:serve "Carmelo Anthony"->"Knicks"@0] | | [:serve "Vince Carter"->"Mavericks"@0] | | | - | | | [:like "Damian Lillard"->"LaMarcus Aldridge"@0] | | [:serve "Russell Westbrook"->"Thunders"@0] | | [:serve "Carmelo Anthony"->"Nuggets"@0] | | [:serve "Vince Carter"->"Nets"@0] | | | - | | | [:like "Rudy Gay"->"LaMarcus Aldridge"@0] | | [:like "James Harden"->"Russell Westbrook"@0] | | [:serve "Carmelo Anthony"->"Rockets"@0] | | [:serve "Vince Carter"->"Raptors"@0] | | | - | | | [:serve "Manu Ginobili"->"Spurs"@0] | | [:like "Paul George"->"Russell Westbrook"@0] | | [:serve "Carmelo Anthony"->"Thunders"@0] | | [:serve "Vince Carter"->"Suns"@0] | | | - | | | [:teammate "Tim Duncan"->"Manu Ginobili"@0] | | [:like "Russell Westbrook"->"James Harden"@0] | | [:like "Dwyane Wade"->"Carmelo Anthony"@0] | | [:like "Jason Kidd"->"Vince Carter"@0] | | | - | | | [:teammate "Tony Parker"->"Manu Ginobili"@0] | | [:like "Russell Westbrook"->"Paul George"@0] | | [:like "Carmelo Anthony"->"Dwyane Wade"@0] | | [:like "Vince Carter"->"Jason Kidd"@0] | | | - | | | [:like "Dejounte Murray"->"Manu Ginobili"@0] | | [:serve "Danny Green"->"Cavaliers"@0] | | [:serve "Tracy McGrady"->"Magic"@0] | | [:serve "Kobe Bryant"->"Lakers"@0] | | | - | | | [:like "Tiago Splitter"->"Manu Ginobili"@0] | | [:serve "Danny Green"->"Raptors"@0] | | [:serve "Tracy McGrady"->"Raptors"@0] | | [:like "Paul Gasol"->"Kobe Bryant"@0] | | | - | | | [:serve "Marco Belinelli"->"76ers"@0] | | [:serve "Danny Green"->"Spurs"@0] | | [:serve "Tracy McGrady"->"Rockets"@0] | | | | | - | | | [:serve "Marco Belinelli"->"Bulls"@0] | | [:teammate "Tim Duncan"->"Danny Green"@0] | | [:serve "Tracy McGrady"->"Spurs"@0] | | | | | - | | | [:serve "Marco Belinelli"->"Hawks"@0] | | [:like "Danny Green"->"LeBron James"@0] | | [:like "Grant Hill"->"Tracy McGrady"@0] | | | | | - | | | [:serve "Marco Belinelli"->"Hornets"@0] | | [:serve "Kyle Anderson"->"Grizzlies"@0] | | [:like "Vince Carter"->"Tracy McGrady"@0] | | | | | - | | | [:serve "Marco Belinelli"->"Kings"@0] | | [:serve "Kyle Anderson"->"Spurs"@0] | | [:like "Tracy McGrady"->"Grant Hill"@0] | | | | | - | | | [:serve "Marco Belinelli"->"Raptors"@0] | | [:teammate "Tony Parker"->"Kyle Anderson"@0] | | [:like "Tracy McGrady"->"Kobe Bryant"@0] | | | | | - | | | [:serve "Marco Belinelli"->"Spurs"@0] | | [:serve "James Harden"->"Rockets"@0] | | [:serve "Dwyane Wade"->"Bulls"@0] | | | | | - | | | [:serve "Marco Belinelli"->"Warriors"@0] | | [:serve "James Harden"->"Thunders"@0] | | [:serve "Dwyane Wade"->"Cavaliers"@0] | | | | | - | | | [:serve "Marco Belinelli"->"Hornets"@1] | | [:like "Luka Doncic"->"James Harden"@0] | | [:serve "Dwyane Wade"->"Heat"@0] | | | | | - | | | [:serve "Marco Belinelli"->"Spurs"@1] | | [:serve "LeBron James"->"Cavaliers"@0] | | [:serve "Dwyane Wade"->"Heat"@1] | | | | | - | | | [:like "Danny Green"->"Marco Belinelli"@0] | | [:serve "LeBron James"->"Heat"@0] | | [:like "Dirk Nowitzki"->"Dwyane Wade"@0] | | | | | - | | | [:like "Dejounte Murray"->"Marco Belinelli"@0] | | [:serve "LeBron James"->"Lakers"@0] | | [:serve "Kyrie Irving"->"Cavaliers"@0] | | | | | - | | | [:like "Marco Belinelli"->"Danny Green"@0] | | [:serve "LeBron James"->"Cavaliers"@1] | | [:serve "Kyrie Irving"->"Celtics"@0] | | | | | - | | | [:serve "Dejounte Murray"->"Spurs"@0] | | [:like "Carmelo Anthony"->"LeBron James"@0] | | | | | | | - | | | [:like "Dejounte Murray"->"Chris Paul"@0] | | [:like "Chris Paul"->"LeBron James"@0] | | | | | | | - | | | [:like "Dejounte Murray"->"Danny Green"@0] | | [:like "Dwyane Wade"->"LeBron James"@0] | | | | | | | - | | | [:like "Dejounte Murray"->"James Harden"@0] | | [:like "Kyrie Irving"->"LeBron James"@0] | | | | | | | - | | | [:like "Dejounte Murray"->"Kevin Durant"@0] | | [:like "LeBron James"->"Ray Allen"@0] | | | | | | | - | | | [:like "Dejounte Murray"->"Kyle Anderson"@0] | | [:serve "Chris Paul"->"Clippers"@0] | | | | | | | - | | | [:like "Dejounte Murray"->"LeBron James"@0] | | [:serve "Chris Paul"->"Hornets"@0] | | | | | | | - | | | [:like "Dejounte Murray"->"Russell Westbrook"@0] | | [:serve "Chris Paul"->"Rockets"@0] | | | | | | | - | | | | | [:like "Blake Griffin"->"Chris Paul"@0] | | | | | | | - | | | | | [:like "Carmelo Anthony"->"Chris Paul"@0] | | | | | | | - | | | | | [:like "Dwyane Wade"->"Chris Paul"@0] | | | | | | | - | | | | | [:like "Chris Paul"->"Carmelo Anthony"@0] | | | | | | | - | | | | | [:like "Chris Paul"->"Dwyane Wade"@0] | | | | | | | - Then the result should be, in any order, with relax comparison: - | _vertices | _edges | - | [("Tony Parker")] | <[edge1]> | - | <[vertex2]> | <[edge2]> | - | <[vertex3]> | <[edge3]> | - | <[vertex4]> | <[edge4]> | - | <[vertex5]> | <[edge5]> | - | <[vertex6]> | <[edge6]> | - When executing query: - """ - GET SUBGRAPH WITH PROP 4 steps from hash('Tim Duncan') BOTH like - """ - Then define some list variables: - | edge1 | vertex2 | edge2 | vertex3 | edge3 | vertex4 | edge4 | vertex5 | - | [:like "Aron Baynes"->"Tim Duncan"@0] | ("LaMarcus Aldridge") | [:like "Damian Lillard"->"LaMarcus Aldridge"@0] | ("Kevin Durant") | [:like "Luka Doncic"->"James Harden"@0] | ("Tracy McGrady") | [:like "Grant Hill"->"Tracy McGrady"@0] | ("Kobe Bryant") | - | [:like "Boris Diaw"->"Tim Duncan"@0] | ("Boris Diaw") | [:like "Rudy Gay"->"LaMarcus Aldridge"@0] | ("James Harden") | [:like "Russell Westbrook"->"James Harden"@0] | ("Carmelo Anthony") | [:like "Vince Carter"->"Tracy McGrady"@0] | ("Dirk Nowitzki") | - | [:like "Danny Green"->"Tim Duncan"@0] | ("Dejounte Murray") | [:like "Tony Parker"->"LaMarcus Aldridge"@0] | ("Chris Paul") | [:like "James Harden"->"Russell Westbrook"@0] | ("Luka Doncic") | [:like "Tracy McGrady"->"Grant Hill"@0] | ("Grant Hill") | - | [:like "Dejounte Murray"->"Tim Duncan"@0] | ("Danny Green") | [:like "LaMarcus Aldridge"->"Tony Parker"@0] | ("Damian Lillard") | [:like "Blake Griffin"->"Chris Paul"@0] | ("Blake Griffin") | [:like "Tracy McGrady"->"Kobe Bryant"@0] | ("Vince Carter") | - | [:like "LaMarcus Aldridge"->"Tim Duncan"@0] | ("Marco Belinelli") | [:like "Boris Diaw"->"Tony Parker"@0] | ("Rudy Gay") | [:like "Carmelo Anthony"->"Chris Paul"@0] | ("Dwyane Wade") | [:like "Dwyane Wade"->"Carmelo Anthony"@0] | ("Rajon Rondo") | - | [:like "Manu Ginobili"->"Tim Duncan"@0] | ("Aron Baynes") | [:like "Dejounte Murray"->"Chris Paul"@0] | ("Kyle Anderson") | [:like "Dwyane Wade"->"Chris Paul"@0] | ("Kyrie Irving") | [:like "Carmelo Anthony"->"Dwyane Wade"@0] | ("Kristaps Porzingis") | - | [:like "Marco Belinelli"->"Tim Duncan"@0] | ("Manu Ginobili") | [:like "Dejounte Murray"->"Danny Green"@0] | ("LeBron James") | [:like "Chris Paul"->"Carmelo Anthony"@0] | ("Ray Allen") | [:like "Kristaps Porzingis"->"Luka Doncic"@0] | | - | [:like "Shaquille O'Neal"->"Tim Duncan"@0] | ("Tiago Splitter") | [:like "Dejounte Murray"->"James Harden"@0] | ("Russell Westbrook") | [:like "Chris Paul"->"Dwyane Wade"@0] | ("Paul George") | [:like "Luka Doncic"->"Dirk Nowitzki"@0] | | - | [:like "Tiago Splitter"->"Tim Duncan"@0] | ("Shaquille O'Neal") | [:like "Dejounte Murray"->"Kevin Durant"@0] | ("Yao Ming") | [:like "Chris Paul"->"LeBron James"@0] | | [:like "Luka Doncic"->"Kristaps Porzingis"@0] | | - | [:like "Tony Parker"->"Tim Duncan"@0] | ("Tony Parker") | [:like "Dejounte Murray"->"Kyle Anderson"@0] | ("JaVale McGee") | [:like "Tracy McGrady"->"Rudy Gay"@0] | | [:like "Dirk Nowitzki"->"Dwyane Wade"@0] | | - | [:like "Tim Duncan"->"Manu Ginobili"@0] | | [:like "Dejounte Murray"->"LeBron James"@0] | | [:like "Carmelo Anthony"->"LeBron James"@0] | | [:like "Rajon Rondo"->"Ray Allen"@0] | | - | [:like "Tim Duncan"->"Tony Parker"@0] | | [:like "Dejounte Murray"->"Manu Ginobili"@0] | | [:like "Dwyane Wade"->"LeBron James"@0] | | [:like "Ray Allen"->"Rajon Rondo"@0] | | - | | | [:like "Dejounte Murray"->"Marco Belinelli"@0] | | [:like "Kyrie Irving"->"LeBron James"@0] | | | | - | | | [:like "Dejounte Murray"->"Russell Westbrook"@0] | | [:like "LeBron James"->"Ray Allen"@0] | | | | - | | | [:like "Dejounte Murray"->"Tony Parker"@0] | | [:like "Paul George"->"Russell Westbrook"@0] | | | | - | | | [:like "Marco Belinelli"->"Danny Green"@0] | | [:like "Russell Westbrook"->"Paul George"@0] | | | | - | | | [:like "Danny Green"->"LeBron James"@0] | | [:like "Yao Ming"->"Tracy McGrady"@0] | | | | - | | | [:like "Danny Green"->"Marco Belinelli"@0] | | | | | | - | | | [:like "Marco Belinelli"->"Tony Parker"@0] | | | | | | - | | | [:like "Tiago Splitter"->"Manu Ginobili"@0] | | | | | | - | | | [:like "Tony Parker"->"Manu Ginobili"@0] | | | | | | - | | | [:like "Yao Ming"->"Shaquille O'Neal"@0] | | | | | | - | | | [:like "Shaquille O'Neal"->"JaVale McGee"@0] | | | | | | - Then the result should be, in any order, with relax comparison: - | _vertices | _edges | - | [("Tim Duncan")] | <[edge1]> | - | <[vertex2]> | <[edge2]> | - | <[vertex3]> | <[edge3]> | - | <[vertex4]> | <[edge4]> | - | <[vertex5]> | [] | - - Scenario: Integer Vid over end - When executing query: - """ - GET SUBGRAPH WITH PROP 10000000000000 STEPS FROM hash('Yao Ming') IN teammate OUT serve - """ - Then the result should be, in any order, with relax comparison: - | _vertices | _edges | - | [("Yao Ming")] | [[:serve "Yao Ming"->"Rockets"@0]] | - | [("Rockets")] | [] | - When executing query: - """ - GET SUBGRAPH 10000000000000 STEPS FROM hash('Yao Ming') IN teammate OUT serve - """ - Then the result should be, in any order, with relax comparison: - | _vertices | _edges | - | [("Yao Ming")] | [[:serve "Yao Ming"->"Rockets"@0]] | - | [("Rockets")] | [] | - - Scenario: Integer Vid many steps without prop - When executing query: - """ - GET SUBGRAPH 4 STEPS FROM hash('Yao Ming') IN teammate OUT serve - """ - Then the result should be, in any order, with relax comparison: - | _vertices | _edges | - | [("Yao Ming")] | [[:serve "Yao Ming"->"Rockets"@0]] | - | [("Rockets")] | [] | - When executing query: - """ - GET SUBGRAPH 4 STEPS FROM hash('NOBODY') IN teammate OUT serve - """ - Then the result should be, in any order, with relax comparison: - | _vertices | _edges | - | [("NOBODY")] | [] | - When executing query: - """ - GET SUBGRAPH 4 steps from hash('Yao Ming') IN teammate OUT serve BOTH like - """ - Then define some list variables: - | edge1 | vertex2 | edge2 | vertex3 | edge3 | vertex4 | edge4 | vertex5 | edge5 | - | [:serve "Yao Ming"->"Rockets"@0] | ("Shaquille O'Neal") | [:serve "Shaquille O'Neal"->"Cavaliers"@0] | ("Kobe Bryant") | [:serve "Kobe Bryant"->"Lakers"@0] | ("Manu Ginobili") | [:serve "Manu Ginobili"->"Spurs"@0] | ("Dirk Nowitzki") | [:like "Dirk Nowitzki"->"Steve Nash"@0] | - | [:like "Yao Ming"->"Shaquille O'Neal"@0] | ("Tracy McGrady") | [:serve "Shaquille O'Neal"->"Celtics"@0] | ("Grant Hill") | [:like "Paul Gasol"->"Kobe Bryant"@0] | ("Paul Gasol") | [:teammate "Tim Duncan"->"Manu Ginobili"@0] | ("Kevin Durant") | [:serve "Kevin Durant"->"Warriors"@0] | - | [:like "Yao Ming"->"Tracy McGrady"@0] | ("Rockets") | [:serve "Shaquille O'Neal"->"Heat"@0] | ("Vince Carter") | [:serve "Grant Hill"->"Clippers"@0] | ("Jason Kidd") | [:teammate "Tony Parker"->"Manu Ginobili"@0] | ("Damian Lillard") | [:serve "Damian Lillard"->"Trail Blazers"@0] | - | | | [:serve "Shaquille O'Neal"->"Lakers"@0] | ("Tim Duncan") | [:serve "Grant Hill"->"Magic"@0] | ("Tony Parker") | [:like "Dejounte Murray"->"Manu Ginobili"@0] | ("James Harden") | [:serve "James Harden"->"Rockets"@0] | - | | | [:serve "Shaquille O'Neal"->"Magic"@0] | ("JaVale McGee") | [:serve "Grant Hill"->"Pistons"@0] | ("Marco Belinelli") | [:like "Tiago Splitter"->"Manu Ginobili"@0] | ("Chris Paul") | [:like "Steve Nash"->"Dirk Nowitzki"@0] | - | | | [:serve "Shaquille O'Neal"->"Suns"@0] | ("Rudy Gay") | [:serve "Grant Hill"->"Suns"@0] | ("Dejounte Murray") | [:like "Tony Parker"->"Manu Ginobili"@0] | ("LeBron James") | [:like "Russell Westbrook"->"James Harden"@0] | - | | | [:like "Shaquille O'Neal"->"JaVale McGee"@0] | ("Magic") | [:serve "Vince Carter"->"Grizzlies"@0] | ("Aron Baynes") | [:serve "Paul Gasol"->"Bucks"@0] | ("Steve Nash") | [:like "James Harden"->"Russell Westbrook"@0] | - | | | [:like "Shaquille O'Neal"->"Tim Duncan"@0] | ("Spurs") | [:serve "Vince Carter"->"Hawks"@0] | ("Boris Diaw") | [:serve "Paul Gasol"->"Bulls"@0] | ("Marc Gasol") | [:serve "Chris Paul"->"Clippers"@0] | - | | | [:serve "Tracy McGrady"->"Magic"@0] | ("Celtics") | [:serve "Vince Carter"->"Kings"@0] | ("Danny Green") | [:serve "Paul Gasol"->"Grizzlies"@0] | ("Kyle Anderson") | [:serve "Chris Paul"->"Hornets"@0] | - | | | [:serve "Tracy McGrady"->"Raptors"@0] | ("Heat") | [:serve "Vince Carter"->"Magic"@0] | ("LaMarcus Aldridge") | [:serve "Paul Gasol"->"Lakers"@0] | ("Russell Westbrook") | [:serve "Chris Paul"->"Rockets"@0] | - | | | [:serve "Tracy McGrady"->"Rockets"@0] | ("Suns") | [:serve "Vince Carter"->"Mavericks"@0] | ("Tiago Splitter") | [:serve "Paul Gasol"->"Spurs"@0] | ("76ers") | [:serve "Dirk Nowitzki"->"Mavericks"@0] | - | | | [:serve "Tracy McGrady"->"Spurs"@0] | ("Lakers") | [:serve "Vince Carter"->"Nets"@0] | ("Pistons") | [:like "Marc Gasol"->"Paul Gasol"@0] | ("Hornets") | [:like "Chris Paul"->"LeBron James"@0] | - | | | [:like "Grant Hill"->"Tracy McGrady"@0] | ("Cavaliers") | [:serve "Vince Carter"->"Raptors"@0] | ("Nets") | [:like "Paul Gasol"->"Marc Gasol"@0] | ("Bucks") | [:serve "Steve Nash"->"Lakers"@0] | - | | | [:like "Vince Carter"->"Tracy McGrady"@0] | ("Raptors") | [:serve "Vince Carter"->"Suns"@0] | ("Kings") | [:serve "Jason Kidd"->"Knicks"@0] | ("Knicks") | [:serve "Steve Nash"->"Mavericks"@0] | - | | | [:like "Tracy McGrady"->"Grant Hill"@0] | | [:like "Jason Kidd"->"Vince Carter"@0] | ("Clippers") | [:serve "Jason Kidd"->"Mavericks"@0] | ("Bulls") | [:serve "Steve Nash"->"Suns"@0] | - | | | [:like "Tracy McGrady"->"Kobe Bryant"@0] | | [:like "Vince Carter"->"Jason Kidd"@0] | ("Mavericks") | [:serve "Jason Kidd"->"Nets"@0] | ("Trail Blazers") | [:serve "Steve Nash"->"Suns"@1] | - | | | [:like "Tracy McGrady"->"Rudy Gay"@0] | | [:serve "Tim Duncan"->"Spurs"@0] | ("Hawks") | [:serve "Jason Kidd"->"Suns"@0] | ("Jazz") | [:serve "LeBron James"->"Cavaliers"@1] | - | | | | | [:teammate "Manu Ginobili"->"Tim Duncan"@0] | ("Warriors") | [:serve "Jason Kidd"->"Mavericks"@1] | | [:serve "LeBron James"->"Lakers"@0] | - | | | | | [:teammate "Tony Parker"->"Tim Duncan"@0] | ("Nuggets") | [:like "Dirk Nowitzki"->"Jason Kidd"@0] | | [:serve "LeBron James"->"Heat"@0] | - | | | | | [:like "Aron Baynes"->"Tim Duncan"@0] | ("Grizzlies") | [:like "Steve Nash"->"Jason Kidd"@0] | | [:serve "Marc Gasol"->"Grizzlies"@0] | - | | | | | [:like "Boris Diaw"->"Tim Duncan"@0] | ("Wizards") | [:like "Jason Kidd"->"Dirk Nowitzki"@0] | | [:serve "Marc Gasol"->"Raptors"@0] | - | | | | | [:like "Danny Green"->"Tim Duncan"@0] | | [:like "Jason Kidd"->"Steve Nash"@0] | | [:serve "Kyle Anderson"->"Grizzlies"@0] | - | | | | | [:like "Dejounte Murray"->"Tim Duncan"@0] | | [:serve "Tony Parker"->"Hornets"@0] | | [:serve "Kyle Anderson"->"Spurs"@0] | - | | | | | [:like "LaMarcus Aldridge"->"Tim Duncan"@0] | | [:serve "Tony Parker"->"Spurs"@0] | | [:teammate "Tony Parker"->"Kyle Anderson"@0] | - | | | | | [:like "Manu Ginobili"->"Tim Duncan"@0] | | [:teammate "Manu Ginobili"->"Tony Parker"@0] | | [:serve "LeBron James"->"Cavaliers"@0] | - | | | | | [:like "Marco Belinelli"->"Tim Duncan"@0] | | [:teammate "Tim Duncan"->"Tony Parker"@0] | | | - | | | | | [:like "Tiago Splitter"->"Tim Duncan"@0] | | [:like "Boris Diaw"->"Tony Parker"@0] | | | - | | | | | [:like "Tony Parker"->"Tim Duncan"@0] | | [:like "Dejounte Murray"->"Tony Parker"@0] | | | - | | | | | [:like "Tim Duncan"->"Manu Ginobili"@0] | | [:like "LaMarcus Aldridge"->"Tony Parker"@0] | | | - | | | | | [:like "Tim Duncan"->"Tony Parker"@0] | | [:like "Marco Belinelli"->"Tony Parker"@0] | | | - | | | | | [:serve "JaVale McGee"->"Lakers"@0] | | [:like "Tony Parker"->"LaMarcus Aldridge"@0] | | | - | | | | | [:serve "JaVale McGee"->"Mavericks"@0] | | [:serve "Marco Belinelli"->"76ers"@0] | | | - | | | | | [:serve "JaVale McGee"->"Nuggets"@0] | | [:serve "Marco Belinelli"->"Bulls"@0] | | | - | | | | | [:serve "JaVale McGee"->"Warriors"@0] | | [:serve "Marco Belinelli"->"Hawks"@0] | | | - | | | | | [:serve "JaVale McGee"->"Wizards"@0] | | [:serve "Marco Belinelli"->"Hornets"@0] | | | - | | | | | [:serve "Rudy Gay"->"Grizzlies"@0] | | [:serve "Marco Belinelli"->"Kings"@0] | | | - | | | | | [:serve "Rudy Gay"->"Kings"@0] | | [:serve "Marco Belinelli"->"Raptors"@0] | | | - | | | | | [:serve "Rudy Gay"->"Raptors"@0] | | [:serve "Marco Belinelli"->"Spurs"@0] | | | - | | | | | [:serve "Rudy Gay"->"Spurs"@0] | | [:serve "Marco Belinelli"->"Warriors"@0] | | | - | | | | | [:like "Rudy Gay"->"LaMarcus Aldridge"@0] | | [:serve "Marco Belinelli"->"Hornets"@1] | | | - | | | | | | | [:serve "Marco Belinelli"->"Spurs"@1] | | | - | | | | | | | [:like "Danny Green"->"Marco Belinelli"@0] | | | - | | | | | | | [:like "Dejounte Murray"->"Marco Belinelli"@0] | | | - | | | | | | | [:like "Marco Belinelli"->"Danny Green"@0] | | | - | | | | | | | [:serve "Dejounte Murray"->"Spurs"@0] | | | - | | | | | | | [:like "Dejounte Murray"->"Chris Paul"@0] | | | - | | | | | | | [:like "Dejounte Murray"->"Danny Green"@0] | | | - | | | | | | | [:like "Dejounte Murray"->"James Harden"@0] | | | - | | | | | | | [:like "Dejounte Murray"->"Kevin Durant"@0] | | | - | | | | | | | [:like "Dejounte Murray"->"Kyle Anderson"@0] | | | - | | | | | | | [:like "Dejounte Murray"->"LeBron James"@0] | | | - | | | | | | | [:like "Dejounte Murray"->"Russell Westbrook"@0] | | | - | | | | | | | [:serve "Aron Baynes"->"Celtics"@0] | | | - | | | | | | | [:serve "Aron Baynes"->"Pistons"@0] | | | - | | | | | | | [:serve "Aron Baynes"->"Spurs"@0] | | | - | | | | | | | [:serve "Boris Diaw"->"Hawks"@0] | | | - | | | | | | | [:serve "Boris Diaw"->"Hornets"@0] | | | - | | | | | | | [:serve "Boris Diaw"->"Jazz"@0] | | | - | | | | | | | [:serve "Boris Diaw"->"Spurs"@0] | | | - | | | | | | | [:serve "Boris Diaw"->"Suns"@0] | | | - | | | | | | | [:serve "Danny Green"->"Cavaliers"@0] | | | - | | | | | | | [:serve "Danny Green"->"Raptors"@0] | | | - | | | | | | | [:serve "Danny Green"->"Spurs"@0] | | | - | | | | | | | [:teammate "Tim Duncan"->"Danny Green"@0] | | | - | | | | | | | [:like "Danny Green"->"LeBron James"@0] | | | - | | | | | | | [:serve "LaMarcus Aldridge"->"Spurs"@0] | | | - | | | | | | | [:serve "LaMarcus Aldridge"->"Trail Blazers"@0] | | | - | | | | | | | [:teammate "Tim Duncan"->"LaMarcus Aldridge"@0] | | | - | | | | | | | [:teammate "Tony Parker"->"LaMarcus Aldridge"@0] | | | - | | | | | | | [:like "Damian Lillard"->"LaMarcus Aldridge"@0] | | | - | | | | | | | [:serve "Tiago Splitter"->"76ers"@0] | | | - | | | | | | | [:serve "Tiago Splitter"->"Hawks"@0] | | | - | | | | | | | [:serve "Tiago Splitter"->"Spurs"@0] | | | - Then the result should be, in any order, with relax comparison: - | _vertices | _edges | - | [("Yao Ming")] | <[edge1]> | - | <[vertex2]> | <[edge2]> | - | <[vertex3]> | <[edge3]> | - | <[vertex4]> | <[edge4]> | - | <[vertex5]> | <[edge5]> | - When executing query: - """ - GET SUBGRAPH 5 steps from hash('Tony Parker') IN teammate OUT serve BOTH like - """ - Then define some list variables: - | edge1 | vertex2 | edge2 | vertex3 | edge3 | vertex4 | edge4 | vertex5 | edge5 | vertex6 | edge6 | - | [:serve "Tony Parker"->"Hornets"@0] | ("Tim Duncan") | [:serve "Tim Duncan"->"Spurs"@0] | ("Aron Baynes") | [:serve "Aron Baynes"->"Celtics"@0] | ("Yao Ming") | [:serve "Yao Ming"->"Rockets"@0] | ("Grant Hill") | [:serve "Grant Hill"->"Clippers"@0] | ("Steve Nash") | [:serve "Steve Nash"->"Lakers"@0] | - | [:serve "Tony Parker"->"Spurs"@0] | ("Boris Diaw") | [:teammate "Manu Ginobili"->"Tim Duncan"@0] | ("Rudy Gay") | [:serve "Aron Baynes"->"Pistons"@0] | ("Ray Allen") | [:like "Yao Ming"->"Tracy McGrady"@0] | ("Kristaps Porzingis") | [:serve "Grant Hill"->"Magic"@0] | ("Paul Gasol") | [:serve "Steve Nash"->"Mavericks"@0] | - | [:teammate "Manu Ginobili"->"Tony Parker"@0] | ("LaMarcus Aldridge") | [:teammate "Tony Parker"->"Tim Duncan"@0] | ("Damian Lillard") | [:serve "Aron Baynes"->"Spurs"@0] | ("Blake Griffin") | [:serve "Ray Allen"->"Bucks"@0] | ("Dirk Nowitzki") | [:serve "Grant Hill"->"Pistons"@0] | ("Jason Kidd") | [:serve "Steve Nash"->"Suns"@0] | - | [:teammate "Tim Duncan"->"Tony Parker"@0] | ("Manu Ginobili") | [:like "Aron Baynes"->"Tim Duncan"@0] | ("Kevin Durant") | [:serve "Rudy Gay"->"Grizzlies"@0] | ("Paul George") | [:serve "Ray Allen"->"Celtics"@0] | ("Rajon Rondo") | [:serve "Grant Hill"->"Suns"@0] | ("Pelicans") | [:serve "Steve Nash"->"Suns"@1] | - | [:like "Boris Diaw"->"Tony Parker"@0] | ("Marco Belinelli") | [:like "Boris Diaw"->"Tim Duncan"@0] | ("Shaquille O'Neal") | [:serve "Rudy Gay"->"Kings"@0] | ("JaVale McGee") | [:serve "Ray Allen"->"Heat"@0] | ("Vince Carter") | [:serve "Kristaps Porzingis"->"Knicks"@0] | ("Nets") | [:like "Jason Kidd"->"Steve Nash"@0] | - | [:like "Dejounte Murray"->"Tony Parker"@0] | ("Dejounte Murray") | [:like "Danny Green"->"Tim Duncan"@0] | ("Tiago Splitter") | [:serve "Rudy Gay"->"Raptors"@0] | ("Luka Doncic") | [:serve "Ray Allen"->"Thunders"@0] | ("Kobe Bryant") | [:serve "Kristaps Porzingis"->"Mavericks"@0] | | [:serve "Paul Gasol"->"Spurs"@0] | - | [:like "LaMarcus Aldridge"->"Tony Parker"@0] | ("Hornets") | [:like "Dejounte Murray"->"Tim Duncan"@0] | ("Russell Westbrook") | [:serve "Rudy Gay"->"Spurs"@0] | ("Carmelo Anthony") | [:like "Rajon Rondo"->"Ray Allen"@0] | ("Wizards") | [:serve "Dirk Nowitzki"->"Mavericks"@0] | | [:like "Steve Nash"->"Jason Kidd"@0] | - | [:like "Marco Belinelli"->"Tony Parker"@0] | ("Spurs") | [:like "LaMarcus Aldridge"->"Tim Duncan"@0] | ("Danny Green") | [:like "Tracy McGrady"->"Rudy Gay"@0] | ("Tracy McGrady") | [:like "Ray Allen"->"Rajon Rondo"@0] | ("Pacers") | [:like "Jason Kidd"->"Dirk Nowitzki"@0] | | [:serve "Paul Gasol"->"Lakers"@0] | - | [:like "Tim Duncan"->"Tony Parker"@0] | | [:like "Manu Ginobili"->"Tim Duncan"@0] | ("Kyle Anderson") | [:serve "Damian Lillard"->"Trail Blazers"@0] | ("Dwyane Wade") | [:serve "Blake Griffin"->"Clippers"@0] | ("Knicks") | [:like "Steve Nash"->"Dirk Nowitzki"@0] | | [:serve "Jason Kidd"->"Knicks"@0] | - | [:like "Tony Parker"->"LaMarcus Aldridge"@0] | | [:like "Marco Belinelli"->"Tim Duncan"@0] | ("James Harden") | [:serve "Kevin Durant"->"Thunders"@0] | ("Kyrie Irving") | [:serve "Blake Griffin"->"Pistons"@0] | ("Bucks") | [:like "Dirk Nowitzki"->"Jason Kidd"@0] | | [:serve "Jason Kidd"->"Mavericks"@0] | - | [:like "Tony Parker"->"Manu Ginobili"@0] | | [:like "Shaquille O'Neal"->"Tim Duncan"@0] | ("LeBron James") | [:serve "Kevin Durant"->"Warriors"@0] | ("Cavaliers") | [:serve "Paul George"->"Pacers"@0] | ("Mavericks") | [:like "Dirk Nowitzki"->"Steve Nash"@0] | | [:serve "Jason Kidd"->"Nets"@0] | - | [:like "Tony Parker"->"Tim Duncan"@0] | | [:like "Tiago Splitter"->"Tim Duncan"@0] | ("Chris Paul") | [:serve "Shaquille O'Neal"->"Cavaliers"@0] | ("Celtics") | [:serve "Paul George"->"Thunders"@0] | ("Nuggets") | [:serve "Rajon Rondo"->"Bulls"@0] | | [:serve "Jason Kidd"->"Suns"@0] | - | | | [:like "Tim Duncan"->"Manu Ginobili"@0] | ("Bulls") | [:serve "Shaquille O'Neal"->"Celtics"@0] | ("Pistons") | [:serve "JaVale McGee"->"Lakers"@0] | | [:serve "Rajon Rondo"->"Celtics"@0] | | [:serve "Jason Kidd"->"Mavericks"@1] | - | | | [:serve "Boris Diaw"->"Hawks"@0] | ("Jazz") | [:serve "Shaquille O'Neal"->"Heat"@0] | ("Grizzlies") | [:serve "JaVale McGee"->"Mavericks"@0] | | [:serve "Rajon Rondo"->"Kings"@0] | | [:serve "Paul Gasol"->"Bucks"@0] | - | | | [:serve "Boris Diaw"->"Hornets"@0] | ("Hawks") | [:serve "Shaquille O'Neal"->"Lakers"@0] | ("Heat") | [:serve "JaVale McGee"->"Nuggets"@0] | | [:serve "Rajon Rondo"->"Lakers"@0] | | [:serve "Paul Gasol"->"Bulls"@0] | - | | | [:serve "Boris Diaw"->"Jazz"@0] | ("Warriors") | [:serve "Shaquille O'Neal"->"Magic"@0] | ("Magic") | [:serve "JaVale McGee"->"Warriors"@0] | | [:serve "Rajon Rondo"->"Mavericks"@0] | | [:serve "Paul Gasol"->"Grizzlies"@0] | - | | | [:serve "Boris Diaw"->"Spurs"@0] | ("Suns") | [:serve "Shaquille O'Neal"->"Suns"@0] | ("Lakers") | [:serve "JaVale McGee"->"Wizards"@0] | | [:serve "Rajon Rondo"->"Pelicans"@0] | | | - | | | [:serve "Boris Diaw"->"Suns"@0] | ("Trail Blazers") | [:like "Yao Ming"->"Shaquille O'Neal"@0] | ("Clippers") | [:serve "Luka Doncic"->"Mavericks"@0] | | [:serve "Vince Carter"->"Grizzlies"@0] | | | - | | | [:serve "LaMarcus Aldridge"->"Spurs"@0] | ("Kings") | [:like "Shaquille O'Neal"->"JaVale McGee"@0] | ("Thunders") | [:like "Kristaps Porzingis"->"Luka Doncic"@0] | | [:serve "Vince Carter"->"Hawks"@0] | | | - | | | [:serve "LaMarcus Aldridge"->"Trail Blazers"@0] | ("Raptors") | [:serve "Tiago Splitter"->"76ers"@0] | ("Rockets") | [:like "Luka Doncic"->"Dirk Nowitzki"@0] | | [:serve "Vince Carter"->"Kings"@0] | | | - | | | [:teammate "Tim Duncan"->"LaMarcus Aldridge"@0] | ("76ers") | [:serve "Tiago Splitter"->"Hawks"@0] | | [:like "Luka Doncic"->"Kristaps Porzingis"@0] | | [:serve "Vince Carter"->"Magic"@0] | | | - | | | [:teammate "Tony Parker"->"LaMarcus Aldridge"@0] | | [:serve "Tiago Splitter"->"Spurs"@0] | | [:serve "Carmelo Anthony"->"Knicks"@0] | | [:serve "Vince Carter"->"Mavericks"@0] | | | - | | | [:like "Damian Lillard"->"LaMarcus Aldridge"@0] | | [:serve "Russell Westbrook"->"Thunders"@0] | | [:serve "Carmelo Anthony"->"Nuggets"@0] | | [:serve "Vince Carter"->"Nets"@0] | | | - | | | [:like "Rudy Gay"->"LaMarcus Aldridge"@0] | | [:like "James Harden"->"Russell Westbrook"@0] | | [:serve "Carmelo Anthony"->"Rockets"@0] | | [:serve "Vince Carter"->"Raptors"@0] | | | - | | | [:serve "Manu Ginobili"->"Spurs"@0] | | [:like "Paul George"->"Russell Westbrook"@0] | | [:serve "Carmelo Anthony"->"Thunders"@0] | | [:serve "Vince Carter"->"Suns"@0] | | | - | | | [:teammate "Tim Duncan"->"Manu Ginobili"@0] | | [:like "Russell Westbrook"->"James Harden"@0] | | [:like "Dwyane Wade"->"Carmelo Anthony"@0] | | [:like "Jason Kidd"->"Vince Carter"@0] | | | - | | | [:teammate "Tony Parker"->"Manu Ginobili"@0] | | [:like "Russell Westbrook"->"Paul George"@0] | | [:like "Carmelo Anthony"->"Dwyane Wade"@0] | | [:like "Vince Carter"->"Jason Kidd"@0] | | | - | | | [:like "Dejounte Murray"->"Manu Ginobili"@0] | | [:serve "Danny Green"->"Cavaliers"@0] | | [:serve "Tracy McGrady"->"Magic"@0] | | [:serve "Kobe Bryant"->"Lakers"@0] | | | - | | | [:like "Tiago Splitter"->"Manu Ginobili"@0] | | [:serve "Danny Green"->"Raptors"@0] | | [:serve "Tracy McGrady"->"Raptors"@0] | | [:like "Paul Gasol"->"Kobe Bryant"@0] | | | - | | | [:serve "Marco Belinelli"->"76ers"@0] | | [:serve "Danny Green"->"Spurs"@0] | | [:serve "Tracy McGrady"->"Rockets"@0] | | | | | - | | | [:serve "Marco Belinelli"->"Bulls"@0] | | [:teammate "Tim Duncan"->"Danny Green"@0] | | [:serve "Tracy McGrady"->"Spurs"@0] | | | | | - | | | [:serve "Marco Belinelli"->"Hawks"@0] | | [:like "Danny Green"->"LeBron James"@0] | | [:like "Grant Hill"->"Tracy McGrady"@0] | | | | | - | | | [:serve "Marco Belinelli"->"Hornets"@0] | | [:serve "Kyle Anderson"->"Grizzlies"@0] | | [:like "Vince Carter"->"Tracy McGrady"@0] | | | | | - | | | [:serve "Marco Belinelli"->"Kings"@0] | | [:serve "Kyle Anderson"->"Spurs"@0] | | [:like "Tracy McGrady"->"Grant Hill"@0] | | | | | - | | | [:serve "Marco Belinelli"->"Raptors"@0] | | [:teammate "Tony Parker"->"Kyle Anderson"@0] | | [:like "Tracy McGrady"->"Kobe Bryant"@0] | | | | | - | | | [:serve "Marco Belinelli"->"Spurs"@0] | | [:serve "James Harden"->"Rockets"@0] | | [:serve "Dwyane Wade"->"Bulls"@0] | | | | | - | | | [:serve "Marco Belinelli"->"Warriors"@0] | | [:serve "James Harden"->"Thunders"@0] | | [:serve "Dwyane Wade"->"Cavaliers"@0] | | | | | - | | | [:serve "Marco Belinelli"->"Hornets"@1] | | [:like "Luka Doncic"->"James Harden"@0] | | [:serve "Dwyane Wade"->"Heat"@0] | | | | | - | | | [:serve "Marco Belinelli"->"Spurs"@1] | | [:serve "LeBron James"->"Cavaliers"@0] | | [:serve "Dwyane Wade"->"Heat"@1] | | | | | - | | | [:like "Danny Green"->"Marco Belinelli"@0] | | [:serve "LeBron James"->"Heat"@0] | | [:like "Dirk Nowitzki"->"Dwyane Wade"@0] | | | | | - | | | [:like "Dejounte Murray"->"Marco Belinelli"@0] | | [:serve "LeBron James"->"Lakers"@0] | | [:serve "Kyrie Irving"->"Cavaliers"@0] | | | | | - | | | [:like "Marco Belinelli"->"Danny Green"@0] | | [:serve "LeBron James"->"Cavaliers"@1] | | [:serve "Kyrie Irving"->"Celtics"@0] | | | | | - | | | [:serve "Dejounte Murray"->"Spurs"@0] | | [:like "Carmelo Anthony"->"LeBron James"@0] | | | | | | | - | | | [:like "Dejounte Murray"->"Chris Paul"@0] | | [:like "Chris Paul"->"LeBron James"@0] | | | | | | | - | | | [:like "Dejounte Murray"->"Danny Green"@0] | | [:like "Dwyane Wade"->"LeBron James"@0] | | | | | | | - | | | [:like "Dejounte Murray"->"James Harden"@0] | | [:like "Kyrie Irving"->"LeBron James"@0] | | | | | | | - | | | [:like "Dejounte Murray"->"Kevin Durant"@0] | | [:like "LeBron James"->"Ray Allen"@0] | | | | | | | - | | | [:like "Dejounte Murray"->"Kyle Anderson"@0] | | [:serve "Chris Paul"->"Clippers"@0] | | | | | | | - | | | [:like "Dejounte Murray"->"LeBron James"@0] | | [:serve "Chris Paul"->"Hornets"@0] | | | | | | | - | | | [:like "Dejounte Murray"->"Russell Westbrook"@0] | | [:serve "Chris Paul"->"Rockets"@0] | | | | | | | - | | | | | [:like "Blake Griffin"->"Chris Paul"@0] | | | | | | | - | | | | | [:like "Carmelo Anthony"->"Chris Paul"@0] | | | | | | | - | | | | | [:like "Dwyane Wade"->"Chris Paul"@0] | | | | | | | - | | | | | [:like "Chris Paul"->"Carmelo Anthony"@0] | | | | | | | - | | | | | [:like "Chris Paul"->"Dwyane Wade"@0] | | | | | | | - Then the result should be, in any order, with relax comparison: - | _vertices | _edges | - | [("Tony Parker")] | <[edge1]> | - | <[vertex2]> | <[edge2]> | - | <[vertex3]> | <[edge3]> | - | <[vertex4]> | <[edge4]> | - | <[vertex5]> | <[edge5]> | - | <[vertex6]> | <[edge6]> | - When executing query: - """ - GET SUBGRAPH 4 steps from hash('Tim Duncan') BOTH like - """ - Then define some list variables: - | edge1 | vertex2 | edge2 | vertex3 | edge3 | vertex4 | edge4 | vertex5 | - | [:like "Aron Baynes"->"Tim Duncan"@0] | ("LaMarcus Aldridge") | [:like "Damian Lillard"->"LaMarcus Aldridge"@0] | ("Kevin Durant") | [:like "Luka Doncic"->"James Harden"@0] | ("Tracy McGrady") | [:like "Grant Hill"->"Tracy McGrady"@0] | ("Kobe Bryant") | - | [:like "Boris Diaw"->"Tim Duncan"@0] | ("Boris Diaw") | [:like "Rudy Gay"->"LaMarcus Aldridge"@0] | ("James Harden") | [:like "Russell Westbrook"->"James Harden"@0] | ("Carmelo Anthony") | [:like "Vince Carter"->"Tracy McGrady"@0] | ("Dirk Nowitzki") | - | [:like "Danny Green"->"Tim Duncan"@0] | ("Dejounte Murray") | [:like "Tony Parker"->"LaMarcus Aldridge"@0] | ("Chris Paul") | [:like "James Harden"->"Russell Westbrook"@0] | ("Luka Doncic") | [:like "Tracy McGrady"->"Grant Hill"@0] | ("Grant Hill") | - | [:like "Dejounte Murray"->"Tim Duncan"@0] | ("Danny Green") | [:like "LaMarcus Aldridge"->"Tony Parker"@0] | ("Damian Lillard") | [:like "Blake Griffin"->"Chris Paul"@0] | ("Blake Griffin") | [:like "Tracy McGrady"->"Kobe Bryant"@0] | ("Vince Carter") | - | [:like "LaMarcus Aldridge"->"Tim Duncan"@0] | ("Marco Belinelli") | [:like "Boris Diaw"->"Tony Parker"@0] | ("Rudy Gay") | [:like "Carmelo Anthony"->"Chris Paul"@0] | ("Dwyane Wade") | [:like "Dwyane Wade"->"Carmelo Anthony"@0] | ("Rajon Rondo") | - | [:like "Manu Ginobili"->"Tim Duncan"@0] | ("Aron Baynes") | [:like "Dejounte Murray"->"Chris Paul"@0] | ("Kyle Anderson") | [:like "Dwyane Wade"->"Chris Paul"@0] | ("Kyrie Irving") | [:like "Carmelo Anthony"->"Dwyane Wade"@0] | ("Kristaps Porzingis") | - | [:like "Marco Belinelli"->"Tim Duncan"@0] | ("Manu Ginobili") | [:like "Dejounte Murray"->"Danny Green"@0] | ("LeBron James") | [:like "Chris Paul"->"Carmelo Anthony"@0] | ("Ray Allen") | [:like "Kristaps Porzingis"->"Luka Doncic"@0] | | - | [:like "Shaquille O'Neal"->"Tim Duncan"@0] | ("Tiago Splitter") | [:like "Dejounte Murray"->"James Harden"@0] | ("Russell Westbrook") | [:like "Chris Paul"->"Dwyane Wade"@0] | ("Paul George") | [:like "Luka Doncic"->"Dirk Nowitzki"@0] | | - | [:like "Tiago Splitter"->"Tim Duncan"@0] | ("Shaquille O'Neal") | [:like "Dejounte Murray"->"Kevin Durant"@0] | ("Yao Ming") | [:like "Chris Paul"->"LeBron James"@0] | | [:like "Luka Doncic"->"Kristaps Porzingis"@0] | | - | [:like "Tony Parker"->"Tim Duncan"@0] | ("Tony Parker") | [:like "Dejounte Murray"->"Kyle Anderson"@0] | ("JaVale McGee") | [:like "Tracy McGrady"->"Rudy Gay"@0] | | [:like "Dirk Nowitzki"->"Dwyane Wade"@0] | | - | [:like "Tim Duncan"->"Manu Ginobili"@0] | | [:like "Dejounte Murray"->"LeBron James"@0] | | [:like "Carmelo Anthony"->"LeBron James"@0] | | [:like "Rajon Rondo"->"Ray Allen"@0] | | - | [:like "Tim Duncan"->"Tony Parker"@0] | | [:like "Dejounte Murray"->"Manu Ginobili"@0] | | [:like "Dwyane Wade"->"LeBron James"@0] | | [:like "Ray Allen"->"Rajon Rondo"@0] | | - | | | [:like "Dejounte Murray"->"Marco Belinelli"@0] | | [:like "Kyrie Irving"->"LeBron James"@0] | | | | - | | | [:like "Dejounte Murray"->"Russell Westbrook"@0] | | [:like "LeBron James"->"Ray Allen"@0] | | | | - | | | [:like "Dejounte Murray"->"Tony Parker"@0] | | [:like "Paul George"->"Russell Westbrook"@0] | | | | - | | | [:like "Marco Belinelli"->"Danny Green"@0] | | [:like "Russell Westbrook"->"Paul George"@0] | | | | - | | | [:like "Danny Green"->"LeBron James"@0] | | [:like "Yao Ming"->"Tracy McGrady"@0] | | | | - | | | [:like "Danny Green"->"Marco Belinelli"@0] | | | | | | - | | | [:like "Marco Belinelli"->"Tony Parker"@0] | | | | | | - | | | [:like "Tiago Splitter"->"Manu Ginobili"@0] | | | | | | - | | | [:like "Tony Parker"->"Manu Ginobili"@0] | | | | | | - | | | [:like "Yao Ming"->"Shaquille O'Neal"@0] | | | | | | - | | | [:like "Shaquille O'Neal"->"JaVale McGee"@0] | | | | | | - Then the result should be, in any order, with relax comparison: - | _vertices | _edges | - | [("Tim Duncan")] | <[edge1]> | - | <[vertex2]> | <[edge2]> | - | <[vertex3]> | <[edge3]> | - | <[vertex4]> | <[edge4]> | - | <[vertex5]> | [] | - Scenario: yield Integer Vid zero step When executing query: """ diff --git a/tests/tck/features/subgraph/subgraph.feature b/tests/tck/features/subgraph/subgraph.feature index 622b28b8fae..c90b90017e9 100644 --- a/tests/tck/features/subgraph/subgraph.feature +++ b/tests/tck/features/subgraph/subgraph.feature @@ -9,12 +9,12 @@ Feature: subgraph Scenario: invalid input When executing query: """ - GET SUBGRAPH WITH PROP FROM $-.id + GET SUBGRAPH WITH PROP FROM $-.id YIELD vertices as nodes """ Then a SemanticError should be raised at runtime: `$-.id', not exist prop `id' When executing query: """ - GET SUBGRAPH WITH PROP FROM $a.id + GET SUBGRAPH WITH PROP FROM $a.id YIELD edges as relationships """ Then a SemanticError should be raised at runtime: `$a.id', not exist variable `a' When executing query: @@ -34,85 +34,85 @@ Feature: subgraph Then a SyntaxError should be raised at runtime: please add alias when using `edges'. near `edges' When executing query: """ - GO FROM "Tim Duncan" OVER like YIELD $$.player.age AS id | GET SUBGRAPH WITH PROP FROM $-.id + GO FROM "Tim Duncan" OVER like YIELD $$.player.age AS id | GET SUBGRAPH WITH PROP FROM $-.id YIELD vertices as nodes """ Then a SemanticError should be raised at runtime: `$-.id', the srcs should be type of FIXED_STRING, but was`INT' When executing query: """ - $a = GO FROM "Tim Duncan" OVER like YIELD $$.player.age AS ID; GET SUBGRAPH WITH PROP FROM $a.ID + $a = GO FROM "Tim Duncan" OVER like YIELD $$.player.age AS ID; GET SUBGRAPH WITH PROP FROM $a.ID YIELD edges as relationships """ Then a SemanticError should be raised at runtime: `$a.ID', the srcs should be type of FIXED_STRING, but was`INT' When executing query: """ - $a = GO FROM "Tim Duncan" OVER like YIELD like._src AS src; GET SUBGRAPH WITH PROP FROM $b.src + $a = GO FROM "Tim Duncan" OVER like YIELD like._src AS src; GET SUBGRAPH WITH PROP FROM $b.src YIELD vertices as nodes """ Then a SemanticError should be raised at runtime: `$b.src', not exist variable `b' When executing query: """ - GO FROM "Tim Duncan" OVER like YIELD like._dst AS id, like._src AS id | GET SUBGRAPH WITH PROP FROM $-.id + GO FROM "Tim Duncan" OVER like YIELD like._dst AS id, like._src AS id | GET SUBGRAPH WITH PROP FROM $-.id YIELD vertices as nodes """ Then a SemanticError should be raised at runtime: Duplicate Column Name : `id' When executing query: """ - $a = GO FROM "Tim Duncan" OVER like YIELD like._dst AS id, like._src AS id; GET SUBGRAPH WITH PROP FROM $a.id + $a = GO FROM "Tim Duncan" OVER like YIELD like._dst AS id, like._src AS id; GET SUBGRAPH WITH PROP FROM $a.id YIELD vertices as nodes """ Then a SemanticError should be raised at runtime: Duplicate Column Name : `id' Scenario: zero step When executing query: """ - GET SUBGRAPH WITH PROP 0 STEPS FROM "Tim Duncan" + GET SUBGRAPH WITH PROP 0 STEPS FROM "Tim Duncan" YIELD vertices as nodes """ Then the result should be, in any order, with relax comparison: - | _vertices | + | nodes | | [("Tim Duncan")] | When executing query: """ - GET SUBGRAPH WITH PROP 0 STEPS FROM "Tim Duncan", "Spurs" + GET SUBGRAPH WITH PROP 0 STEPS FROM "Tim Duncan", "Spurs" YIELD vertices as nodes """ Then the result should be, in any order, with relax comparison: - | _vertices | + | nodes | | [("Tim Duncan"), ("Spurs")] | When executing query: """ - GET SUBGRAPH WITH PROP 0 STEPS FROM "Tim Duncan", "Tony Parker", "Spurs" + GET SUBGRAPH WITH PROP 0 STEPS FROM "Tim Duncan", "Tony Parker", "Spurs" YIELD vertices as nodes """ Then the result should be, in any order, with relax comparison: - | _vertices | + | nodes | | [("Tim Duncan"), ("Spurs"), ("Tony Parker")] | When executing query: """ - GO FROM 'Tim Duncan' over serve YIELD serve._dst AS id | GET SUBGRAPH WITH PROP 0 STEPS FROM $-.id + GO FROM 'Tim Duncan' over serve YIELD serve._dst AS id | GET SUBGRAPH WITH PROP 0 STEPS FROM $-.id YIELD vertices as nodes """ Then the result should be, in any order, with relax comparison: - | _vertices | + | nodes | | [("Spurs")] | When executing query: """ - GO FROM 'Tim Duncan' over like YIELD like._dst AS id | GET SUBGRAPH WITH PROP 0 STEPS FROM $-.id + GO FROM 'Tim Duncan' over like YIELD like._dst AS id | GET SUBGRAPH WITH PROP 0 STEPS FROM $-.id YIELD vertices as nodes """ Then the result should be, in any order, with relax comparison: - | _vertices | + | nodes | | [("Manu Ginobili"), ("Tony Parker")] | When executing query: """ - $a = GO FROM 'Tim Duncan' over serve YIELD serve._dst AS id; GET SUBGRAPH WITH PROP 0 STEPS FROM $a.id + $a = GO FROM 'Tim Duncan' over serve YIELD serve._dst AS id; GET SUBGRAPH WITH PROP 0 STEPS FROM $a.id YIELD vertices as nodes """ Then the result should be, in any order, with relax comparison: - | _vertices | + | nodes | | [("Spurs")] | When executing query: """ - $a = GO FROM 'Tim Duncan' over like YIELD like._dst AS id; GET SUBGRAPH WITH PROP 0 STEPS FROM $a.id + $a = GO FROM 'Tim Duncan' over like YIELD like._dst AS id; GET SUBGRAPH WITH PROP 0 STEPS FROM $a.id YIELD vertices as nodes """ Then the result should be, in any order, with relax comparison: - | _vertices | + | nodes | | [("Manu Ginobili"), ("Tony Parker")] | Scenario: subgraph When executing query: """ - GET SUBGRAPH WITH PROP FROM 'Tim Duncan' + GET SUBGRAPH WITH PROP FROM 'Tim Duncan' YIELD vertices as nodes, edges as relationships """ Then define some list variables: | edge1 | vertex2 | edge2 | @@ -142,14 +142,14 @@ Feature: subgraph | | | [:like "Danny Green"->"Marco Belinelli"@0] | | | | [:serve "Danny Green"->"Spurs"@0] | Then the result should be, in any order, with relax comparison: - | _vertices | _edges | - | [("Tim Duncan")] | <[edge1]> | - | <[vertex2]> | <[edge2]> | + | nodes | relationships | + | [("Tim Duncan")] | <[edge1]> | + | <[vertex2]> | <[edge2]> | Scenario: two steps When executing query: """ - GET SUBGRAPH WITH PROP 2 STEPS FROM 'Tim Duncan' + GET SUBGRAPH WITH PROP 2 STEPS FROM 'Tim Duncan' YIELD vertices as nodes, edges as relationships """ Then define some list variables: | edge1 | vertex2 | edge2 | vertex3 | edge3 | @@ -224,15 +224,15 @@ Feature: subgraph | | | [:serve "Tiago Splitter"->"76ers"@0] | | | | | | [:serve "Tiago Splitter"->"Hawks"@0] | | | Then the result should be, in any order, with relax comparison: - | _vertices | _edges | - | [("Tim Duncan")] | <[edge1]> | - | <[vertex2]> | <[edge2]> | - | <[vertex3]> | <[edge3]> | + | nodes | relationships | + | [("Tim Duncan")] | <[edge1]> | + | <[vertex2]> | <[edge2]> | + | <[vertex3]> | <[edge3]> | Scenario: in edge When executing query: """ - GET SUBGRAPH WITH PROP 2 STEPS FROM 'Tim Duncan' IN like, serve + GET SUBGRAPH WITH PROP 2 STEPS FROM 'Tim Duncan' IN like, serve YIELD vertices as nodes, edges as relationships """ Then define some list variables: | edge1 | vertex2 | edge2 | vertex3 | @@ -254,15 +254,15 @@ Feature: subgraph | | | [:like "Marco Belinelli"->"Tony Parker"@0] | | | | | [:like "Tim Duncan"->"Tony Parker"@0] | | Then the result should be, in any order, with relax comparison: - | _vertices | _edges | - | [("Tim Duncan")] | <[edge1]> | - | <[vertex2]> | <[edge2]> | - | <[vertex3]> | [] | + | nodes | relationships | + | [("Tim Duncan")] | <[edge1]> | + | <[vertex2]> | <[edge2]> | + | <[vertex3]> | [] | Scenario: in and out edge When executing query: """ - GET SUBGRAPH WITH PROP 2 STEPS FROM 'Tim Duncan' IN like OUT serve + GET SUBGRAPH WITH PROP 2 STEPS FROM 'Tim Duncan' IN like OUT serve YIELD vertices as nodes, edges as relationships """ Then define some list variables: | edge1 | vertex2 | edge2 | vertex3 | edge3 | @@ -320,15 +320,15 @@ Feature: subgraph | | | [:like "Marco Belinelli"->"Tony Parker"@0] | | | | | | [:like "Tim Duncan"->"Tony Parker"@0] | | | Then the result should be, in any order, with relax comparison: - | _vertices | _edges | - | [("Tim Duncan")] | <[edge1]> | - | <[vertex2]> | <[edge2]> | - | <[vertex3]> | <[edge3]> | + | nodes | relationships | + | [("Tim Duncan")] | <[edge1]> | + | <[vertex2]> | <[edge2]> | + | <[vertex3]> | <[edge3]> | Scenario: two steps in and out edge When executing query: """ - GET SUBGRAPH WITH PROP 2 STEPS FROM 'Tim Duncan', 'James Harden' IN teammate OUT serve + GET SUBGRAPH WITH PROP 2 STEPS FROM 'Tim Duncan', 'James Harden' IN teammate OUT serve YIELD vertices as nodes, edges as relationships """ Then define some list variables: | vertex1 | edge1 | vertex2 | edge2 | vertex3 | @@ -340,15 +340,15 @@ Feature: subgraph | | | | [:teammate "Manu Ginobili"->"Tony Parker"@0] | | | | | | [:teammate "Tim Duncan"->"Tony Parker"@0] | | Then the result should be, in any order, with relax comparison: - | _vertices | _edges | - | <[vertex1]> | <[edge1]> | - | <[vertex2]> | <[edge2]> | - | <[vertex3]> | [] | + | nodes | relationships | + | <[vertex1]> | <[edge1]> | + | <[vertex2]> | <[edge2]> | + | <[vertex3]> | [] | Scenario: three steps When executing query: """ - GET SUBGRAPH WITH PROP 3 STEPS FROM 'Paul George' OUT serve BOTH like + GET SUBGRAPH WITH PROP 3 STEPS FROM 'Paul George' OUT serve BOTH like YIELD vertices as nodes, edges as relationships """ Then define some list variables: | edge1 | edge2 | edge3 | vertex4 | edge4 | @@ -374,11 +374,11 @@ Feature: subgraph | | | | | [:serve "Chris Paul"->"Rockets"@0] | | | | | | [:like "Chris Paul"->"LeBron James"@0] | Then the result should be, in any order, with relax comparison: - | _vertices | _edges | - | [("Paul George")] | <[edge1]> | - | [("Russell Westbrook"), ("Pacers"), ("Thunders")] | <[edge2]> | - | [("Dejounte Murray"), ("James Harden")] | <[edge3]> | - | <[vertex4]> | <[edge4]> | + | nodes | relationships | + | [("Paul George")] | <[edge1]> | + | [("Russell Westbrook"), ("Pacers"), ("Thunders")] | <[edge2]> | + | [("Dejounte Murray"), ("James Harden")] | <[edge3]> | + | <[vertex4]> | <[edge4]> | Scenario: yield bidirect edge When executing query: @@ -1035,535 +1035,6 @@ Feature: subgraph | [("Tom")] | [] | | [] | [] | - Scenario: bidirect edge - When executing query: - """ - GET SUBGRAPH WITH PROP FROM 'Tony Parker' BOTH like - """ - Then define some list variables: - | edge1 | vertex2 | edge2 | - | [:like "Boris Diaw"->"Tony Parker"@0] | ("Manu Ginobili") | [:like "Manu Ginobili"->"Tim Duncan"@0] | - | [:like "Dejounte Murray"->"Tony Parker"@0] | ("Marco Belinelli") | [:like "Dejounte Murray"->"Marco Belinelli"@0] | - | [:like "LaMarcus Aldridge"->"Tony Parker"@0] | ("Tim Duncan") | [:like "Marco Belinelli"->"Tim Duncan"@0] | - | [:like "Marco Belinelli"->"Tony Parker"@0] | ("Dejounte Murray") | [:like "Tim Duncan"->"Manu Ginobili"@0] | - | [:like "Tim Duncan"->"Tony Parker"@0] | ("LaMarcus Aldridge") | [:like "Boris Diaw"->"Tim Duncan"@0] | - | [:like "Tony Parker"->"LaMarcus Aldridge"@0] | ("Boris Diaw") | [:like "Dejounte Murray"->"Manu Ginobili"@0] | - | [:like "Tony Parker"->"Manu Ginobili"@0] | | [:like "Dejounte Murray"->"Tim Duncan"@0] | - | [:like "Tony Parker"->"Tim Duncan"@0] | | [:like "LaMarcus Aldridge"->"Tim Duncan"@0] | - Then the result should be, in any order, with relax comparison: - | _vertices | _edges | - | [("Tony Parker")] | <[edge1]> | - | <[vertex2]> | <[edge2]> | - - Scenario: pipe - When executing query: - """ - GO FROM 'Tim Duncan' over serve YIELD serve._src AS id | GET SUBGRAPH WITH PROP FROM $-.id - """ - Then define some list variables: - | edge1 | vertex2 | edge2 | - | [:teammate "Manu Ginobili"->"Tim Duncan"@0] | ("Danny Green") | [:like "Dejounte Murray"->"Danny Green"@0] | - | [:teammate "Tony Parker"->"Tim Duncan"@0] | ("Manu Ginobili") | [:like "Marco Belinelli"->"Danny Green"@0] | - | [:like "Aron Baynes"->"Tim Duncan"@0] | ("Aron Baynes") | [:like "Danny Green"->"Marco Belinelli"@0] | - | [:like "Boris Diaw"->"Tim Duncan"@0] | ("Boris Diaw") | [:serve "Danny Green"->"Spurs"@0] | - | [:like "Danny Green"->"Tim Duncan"@0] | ("Shaquille O\'Neal") | [:teammate "Tony Parker"->"Manu Ginobili"@0] | - | [:like "Dejounte Murray"->"Tim Duncan"@0] | ("Tony Parker") | [:like "Dejounte Murray"->"Manu Ginobili"@0] | - | [:like "LaMarcus Aldridge"->"Tim Duncan"@0] | ("Spurs") | [:like "Tiago Splitter"->"Manu Ginobili"@0] | - | [:like "Manu Ginobili"->"Tim Duncan"@0] | ("Dejounte Murray") | [:like "Tony Parker"->"Manu Ginobili"@0] | - | [:like "Marco Belinelli"->"Tim Duncan"@0] | ("LaMarcus Aldridge") | [:serve "Manu Ginobili"->"Spurs"@0] | - | [:like "Shaquille O\'Neal"->"Tim Duncan"@0] | ("Marco Belinelli") | [:teammate "Manu Ginobili"->"Tony Parker"@0] | - | [:like "Tiago Splitter"->"Tim Duncan"@0] | ("Tiago Splitter") | [:serve "Aron Baynes"->"Spurs"@0] | - | [:like "Tony Parker"->"Tim Duncan"@0] | | [:like "Boris Diaw"->"Tony Parker"@0] | - | [:like "Tim Duncan"->"Manu Ginobili"@0] | | [:serve "Boris Diaw"->"Spurs"@0] | - | [:like "Tim Duncan"->"Tony Parker"@0] | | [:like "Dejounte Murray"->"Tony Parker"@0] | - | [:serve "Tim Duncan"->"Spurs"@0] | | [:like "LaMarcus Aldridge"->"Tony Parker"@0] | - | [:teammate "Tim Duncan"->"Danny Green"@0] | | [:like "Marco Belinelli"->"Tony Parker"@0] | - | [:teammate "Tim Duncan"->"LaMarcus Aldridge"@0] | | [:like "Tony Parker"->"LaMarcus Aldridge"@0] | - | [:teammate "Tim Duncan"->"Manu Ginobili"@0] | | [:serve "Tony Parker"->"Spurs"@0] | - | [:teammate "Tim Duncan"->"Tony Parker"@0] | | [:teammate "Tony Parker"->"LaMarcus Aldridge"@0] | - | | | [:serve "Dejounte Murray"->"Spurs"@0] | - | | | [:serve "LaMarcus Aldridge"->"Spurs"@0] | - | | | [:serve "Marco Belinelli"->"Spurs"@0] | - | | | [:serve "Tiago Splitter"->"Spurs"@0] | - | | | [:serve "Marco Belinelli"->"Spurs"@1] | - | | | [:like "Dejounte Murray"->"Marco Belinelli"@0] | - Then the result should be, in any order, with relax comparison: - | _vertices | _edges | - | [("Tim Duncan")] | <[edge1]> | - | <[vertex2]> | <[edge2]> | - - Scenario: var - When executing query: - """ - $a = GO FROM 'Tim Duncan' over serve YIELD serve._src AS id; - GET SUBGRAPH WITH PROP FROM $a.id - """ - Then define some list variables: - | edge1 | vertex2 | edge2 | - | [:teammate "Manu Ginobili"->"Tim Duncan"@0] | ("Danny Green") | [:like "Dejounte Murray"->"Danny Green"@0] | - | [:teammate "Tony Parker"->"Tim Duncan"@0] | ("Manu Ginobili") | [:like "Marco Belinelli"->"Danny Green"@0] | - | [:like "Aron Baynes"->"Tim Duncan"@0] | ("Aron Baynes") | [:like "Danny Green"->"Marco Belinelli"@0] | - | [:like "Boris Diaw"->"Tim Duncan"@0] | ("Boris Diaw") | [:serve "Danny Green"->"Spurs"@0] | - | [:like "Danny Green"->"Tim Duncan"@0] | ("Shaquille O\'Neal") | [:teammate "Tony Parker"->"Manu Ginobili"@0] | - | [:like "Dejounte Murray"->"Tim Duncan"@0] | ("Tony Parker") | [:like "Dejounte Murray"->"Manu Ginobili"@0] | - | [:like "LaMarcus Aldridge"->"Tim Duncan"@0] | ("Spurs") | [:like "Tiago Splitter"->"Manu Ginobili"@0] | - | [:like "Manu Ginobili"->"Tim Duncan"@0] | ("Dejounte Murray") | [:like "Tony Parker"->"Manu Ginobili"@0] | - | [:like "Marco Belinelli"->"Tim Duncan"@0] | ("LaMarcus Aldridge") | [:serve "Manu Ginobili"->"Spurs"@0] | - | [:like "Shaquille O\'Neal"->"Tim Duncan"@0] | ("Marco Belinelli") | [:teammate "Manu Ginobili"->"Tony Parker"@0] | - | [:like "Tiago Splitter"->"Tim Duncan"@0] | ("Tiago Splitter") | [:serve "Aron Baynes"->"Spurs"@0] | - | [:like "Tony Parker"->"Tim Duncan"@0] | | [:like "Boris Diaw"->"Tony Parker"@0] | - | [:like "Tim Duncan"->"Manu Ginobili"@0] | | [:serve "Boris Diaw"->"Spurs"@0] | - | [:like "Tim Duncan"->"Tony Parker"@0] | | [:like "Dejounte Murray"->"Tony Parker"@0] | - | [:serve "Tim Duncan"->"Spurs"@0] | | [:like "LaMarcus Aldridge"->"Tony Parker"@0] | - | [:teammate "Tim Duncan"->"Danny Green"@0] | | [:like "Marco Belinelli"->"Tony Parker"@0] | - | [:teammate "Tim Duncan"->"LaMarcus Aldridge"@0] | | [:like "Tony Parker"->"LaMarcus Aldridge"@0] | - | [:teammate "Tim Duncan"->"Manu Ginobili"@0] | | [:serve "Tony Parker"->"Spurs"@0] | - | [:teammate "Tim Duncan"->"Tony Parker"@0] | | [:teammate "Tony Parker"->"LaMarcus Aldridge"@0] | - | | | [:serve "Dejounte Murray"->"Spurs"@0] | - | | | [:serve "LaMarcus Aldridge"->"Spurs"@0] | - | | | [:serve "Marco Belinelli"->"Spurs"@0] | - | | | [:serve "Tiago Splitter"->"Spurs"@0] | - | | | [:serve "Marco Belinelli"->"Spurs"@1] | - | | | [:like "Dejounte Murray"->"Marco Belinelli"@0] | - Then the result should be, in any order, with relax comparison: - | _vertices | _edges | - | [("Tim Duncan")] | <[edge1]> | - | <[vertex2]> | <[edge2]> | - - Scenario: many steps - When executing query: - """ - GET SUBGRAPH WITH PROP 4 STEPS FROM 'Yao Ming' IN teammate OUT serve - """ - Then the result should be, in any order, with relax comparison: - | _vertices | _edges | - | [("Yao Ming")] | [[:serve "Yao Ming"->"Rockets"@0]] | - | [("Rockets")] | [] | - When executing query: - """ - GET SUBGRAPH WITH PROP 4 STEPS FROM 'NOBODY' IN teammate OUT serve - """ - Then the result should be, in any order, with relax comparison: - | _vertices | _edges | - | [("NOBODY")] | [] | - When executing query: - """ - GET SUBGRAPH WITH PROP 4 steps from 'Yao Ming' IN teammate OUT serve BOTH like - """ - Then define some list variables: - | edge1 | vertex2 | edge2 | vertex3 | edge3 | vertex4 | edge4 | vertex5 | edge5 | - | [:serve "Yao Ming"->"Rockets"@0] | ("Shaquille O'Neal") | [:serve "Shaquille O'Neal"->"Cavaliers"@0] | ("Kobe Bryant") | [:serve "Kobe Bryant"->"Lakers"@0] | ("Manu Ginobili") | [:serve "Manu Ginobili"->"Spurs"@0] | ("Dirk Nowitzki") | [:like "Dirk Nowitzki"->"Steve Nash"@0] | - | [:like "Yao Ming"->"Shaquille O'Neal"@0] | ("Tracy McGrady") | [:serve "Shaquille O'Neal"->"Celtics"@0] | ("Grant Hill") | [:like "Paul Gasol"->"Kobe Bryant"@0] | ("Paul Gasol") | [:teammate "Tim Duncan"->"Manu Ginobili"@0] | ("Kevin Durant") | [:serve "Kevin Durant"->"Warriors"@0] | - | [:like "Yao Ming"->"Tracy McGrady"@0] | ("Rockets") | [:serve "Shaquille O'Neal"->"Heat"@0] | ("Vince Carter") | [:serve "Grant Hill"->"Clippers"@0] | ("Jason Kidd") | [:teammate "Tony Parker"->"Manu Ginobili"@0] | ("Damian Lillard") | [:serve "Damian Lillard"->"Trail Blazers"@0] | - | | | [:serve "Shaquille O'Neal"->"Lakers"@0] | ("Tim Duncan") | [:serve "Grant Hill"->"Magic"@0] | ("Tony Parker") | [:like "Dejounte Murray"->"Manu Ginobili"@0] | ("James Harden") | [:serve "James Harden"->"Rockets"@0] | - | | | [:serve "Shaquille O'Neal"->"Magic"@0] | ("JaVale McGee") | [:serve "Grant Hill"->"Pistons"@0] | ("Marco Belinelli") | [:like "Tiago Splitter"->"Manu Ginobili"@0] | ("Chris Paul") | [:like "Steve Nash"->"Dirk Nowitzki"@0] | - | | | [:serve "Shaquille O'Neal"->"Suns"@0] | ("Rudy Gay") | [:serve "Grant Hill"->"Suns"@0] | ("Dejounte Murray") | [:like "Tony Parker"->"Manu Ginobili"@0] | ("LeBron James") | [:like "Russell Westbrook"->"James Harden"@0] | - | | | [:like "Shaquille O'Neal"->"JaVale McGee"@0] | ("Magic") | [:serve "Vince Carter"->"Grizzlies"@0] | ("Aron Baynes") | [:serve "Paul Gasol"->"Bucks"@0] | ("Steve Nash") | [:like "James Harden"->"Russell Westbrook"@0] | - | | | [:like "Shaquille O'Neal"->"Tim Duncan"@0] | ("Spurs") | [:serve "Vince Carter"->"Hawks"@0] | ("Boris Diaw") | [:serve "Paul Gasol"->"Bulls"@0] | ("Marc Gasol") | [:serve "Chris Paul"->"Clippers"@0] | - | | | [:serve "Tracy McGrady"->"Magic"@0] | ("Celtics") | [:serve "Vince Carter"->"Kings"@0] | ("Danny Green") | [:serve "Paul Gasol"->"Grizzlies"@0] | ("Kyle Anderson") | [:serve "Chris Paul"->"Hornets"@0] | - | | | [:serve "Tracy McGrady"->"Raptors"@0] | ("Heat") | [:serve "Vince Carter"->"Magic"@0] | ("LaMarcus Aldridge") | [:serve "Paul Gasol"->"Lakers"@0] | ("Russell Westbrook") | [:serve "Chris Paul"->"Rockets"@0] | - | | | [:serve "Tracy McGrady"->"Rockets"@0] | ("Suns") | [:serve "Vince Carter"->"Mavericks"@0] | ("Tiago Splitter") | [:serve "Paul Gasol"->"Spurs"@0] | ("76ers") | [:serve "Dirk Nowitzki"->"Mavericks"@0] | - | | | [:serve "Tracy McGrady"->"Spurs"@0] | ("Lakers") | [:serve "Vince Carter"->"Nets"@0] | ("Pistons") | [:like "Marc Gasol"->"Paul Gasol"@0] | ("Hornets") | [:like "Chris Paul"->"LeBron James"@0] | - | | | [:like "Grant Hill"->"Tracy McGrady"@0] | ("Cavaliers") | [:serve "Vince Carter"->"Raptors"@0] | ("Nets") | [:like "Paul Gasol"->"Marc Gasol"@0] | ("Bucks") | [:serve "Steve Nash"->"Lakers"@0] | - | | | [:like "Vince Carter"->"Tracy McGrady"@0] | ("Raptors") | [:serve "Vince Carter"->"Suns"@0] | ("Kings") | [:serve "Jason Kidd"->"Knicks"@0] | ("Knicks") | [:serve "Steve Nash"->"Mavericks"@0] | - | | | [:like "Tracy McGrady"->"Grant Hill"@0] | | [:like "Jason Kidd"->"Vince Carter"@0] | ("Clippers") | [:serve "Jason Kidd"->"Mavericks"@0] | ("Bulls") | [:serve "Steve Nash"->"Suns"@0] | - | | | [:like "Tracy McGrady"->"Kobe Bryant"@0] | | [:like "Vince Carter"->"Jason Kidd"@0] | ("Mavericks") | [:serve "Jason Kidd"->"Nets"@0] | ("Trail Blazers") | [:serve "Steve Nash"->"Suns"@1] | - | | | [:like "Tracy McGrady"->"Rudy Gay"@0] | | [:serve "Tim Duncan"->"Spurs"@0] | ("Hawks") | [:serve "Jason Kidd"->"Suns"@0] | ("Jazz") | [:serve "LeBron James"->"Cavaliers"@1] | - | | | | | [:teammate "Manu Ginobili"->"Tim Duncan"@0] | ("Warriors") | [:serve "Jason Kidd"->"Mavericks"@1] | | [:serve "LeBron James"->"Lakers"@0] | - | | | | | [:teammate "Tony Parker"->"Tim Duncan"@0] | ("Nuggets") | [:like "Dirk Nowitzki"->"Jason Kidd"@0] | | [:serve "LeBron James"->"Heat"@0] | - | | | | | [:like "Aron Baynes"->"Tim Duncan"@0] | ("Grizzlies") | [:like "Steve Nash"->"Jason Kidd"@0] | | [:serve "Marc Gasol"->"Grizzlies"@0] | - | | | | | [:like "Boris Diaw"->"Tim Duncan"@0] | ("Wizards") | [:like "Jason Kidd"->"Dirk Nowitzki"@0] | | [:serve "Marc Gasol"->"Raptors"@0] | - | | | | | [:like "Danny Green"->"Tim Duncan"@0] | | [:like "Jason Kidd"->"Steve Nash"@0] | | [:serve "Kyle Anderson"->"Grizzlies"@0] | - | | | | | [:like "Dejounte Murray"->"Tim Duncan"@0] | | [:serve "Tony Parker"->"Hornets"@0] | | [:serve "Kyle Anderson"->"Spurs"@0] | - | | | | | [:like "LaMarcus Aldridge"->"Tim Duncan"@0] | | [:serve "Tony Parker"->"Spurs"@0] | | [:teammate "Tony Parker"->"Kyle Anderson"@0] | - | | | | | [:like "Manu Ginobili"->"Tim Duncan"@0] | | [:teammate "Manu Ginobili"->"Tony Parker"@0] | | [:serve "LeBron James"->"Cavaliers"@0] | - | | | | | [:like "Marco Belinelli"->"Tim Duncan"@0] | | [:teammate "Tim Duncan"->"Tony Parker"@0] | | | - | | | | | [:like "Tiago Splitter"->"Tim Duncan"@0] | | [:like "Boris Diaw"->"Tony Parker"@0] | | | - | | | | | [:like "Tony Parker"->"Tim Duncan"@0] | | [:like "Dejounte Murray"->"Tony Parker"@0] | | | - | | | | | [:like "Tim Duncan"->"Manu Ginobili"@0] | | [:like "LaMarcus Aldridge"->"Tony Parker"@0] | | | - | | | | | [:like "Tim Duncan"->"Tony Parker"@0] | | [:like "Marco Belinelli"->"Tony Parker"@0] | | | - | | | | | [:serve "JaVale McGee"->"Lakers"@0] | | [:like "Tony Parker"->"LaMarcus Aldridge"@0] | | | - | | | | | [:serve "JaVale McGee"->"Mavericks"@0] | | [:serve "Marco Belinelli"->"76ers"@0] | | | - | | | | | [:serve "JaVale McGee"->"Nuggets"@0] | | [:serve "Marco Belinelli"->"Bulls"@0] | | | - | | | | | [:serve "JaVale McGee"->"Warriors"@0] | | [:serve "Marco Belinelli"->"Hawks"@0] | | | - | | | | | [:serve "JaVale McGee"->"Wizards"@0] | | [:serve "Marco Belinelli"->"Hornets"@0] | | | - | | | | | [:serve "Rudy Gay"->"Grizzlies"@0] | | [:serve "Marco Belinelli"->"Kings"@0] | | | - | | | | | [:serve "Rudy Gay"->"Kings"@0] | | [:serve "Marco Belinelli"->"Raptors"@0] | | | - | | | | | [:serve "Rudy Gay"->"Raptors"@0] | | [:serve "Marco Belinelli"->"Spurs"@0] | | | - | | | | | [:serve "Rudy Gay"->"Spurs"@0] | | [:serve "Marco Belinelli"->"Warriors"@0] | | | - | | | | | [:like "Rudy Gay"->"LaMarcus Aldridge"@0] | | [:serve "Marco Belinelli"->"Hornets"@1] | | | - | | | | | | | [:serve "Marco Belinelli"->"Spurs"@1] | | | - | | | | | | | [:like "Danny Green"->"Marco Belinelli"@0] | | | - | | | | | | | [:like "Dejounte Murray"->"Marco Belinelli"@0] | | | - | | | | | | | [:like "Marco Belinelli"->"Danny Green"@0] | | | - | | | | | | | [:serve "Dejounte Murray"->"Spurs"@0] | | | - | | | | | | | [:like "Dejounte Murray"->"Chris Paul"@0] | | | - | | | | | | | [:like "Dejounte Murray"->"Danny Green"@0] | | | - | | | | | | | [:like "Dejounte Murray"->"James Harden"@0] | | | - | | | | | | | [:like "Dejounte Murray"->"Kevin Durant"@0] | | | - | | | | | | | [:like "Dejounte Murray"->"Kyle Anderson"@0] | | | - | | | | | | | [:like "Dejounte Murray"->"LeBron James"@0] | | | - | | | | | | | [:like "Dejounte Murray"->"Russell Westbrook"@0] | | | - | | | | | | | [:serve "Aron Baynes"->"Celtics"@0] | | | - | | | | | | | [:serve "Aron Baynes"->"Pistons"@0] | | | - | | | | | | | [:serve "Aron Baynes"->"Spurs"@0] | | | - | | | | | | | [:serve "Boris Diaw"->"Hawks"@0] | | | - | | | | | | | [:serve "Boris Diaw"->"Hornets"@0] | | | - | | | | | | | [:serve "Boris Diaw"->"Jazz"@0] | | | - | | | | | | | [:serve "Boris Diaw"->"Spurs"@0] | | | - | | | | | | | [:serve "Boris Diaw"->"Suns"@0] | | | - | | | | | | | [:serve "Danny Green"->"Cavaliers"@0] | | | - | | | | | | | [:serve "Danny Green"->"Raptors"@0] | | | - | | | | | | | [:serve "Danny Green"->"Spurs"@0] | | | - | | | | | | | [:teammate "Tim Duncan"->"Danny Green"@0] | | | - | | | | | | | [:like "Danny Green"->"LeBron James"@0] | | | - | | | | | | | [:serve "LaMarcus Aldridge"->"Spurs"@0] | | | - | | | | | | | [:serve "LaMarcus Aldridge"->"Trail Blazers"@0] | | | - | | | | | | | [:teammate "Tim Duncan"->"LaMarcus Aldridge"@0] | | | - | | | | | | | [:teammate "Tony Parker"->"LaMarcus Aldridge"@0] | | | - | | | | | | | [:like "Damian Lillard"->"LaMarcus Aldridge"@0] | | | - | | | | | | | [:serve "Tiago Splitter"->"76ers"@0] | | | - | | | | | | | [:serve "Tiago Splitter"->"Hawks"@0] | | | - | | | | | | | [:serve "Tiago Splitter"->"Spurs"@0] | | | - Then the result should be, in any order, with relax comparison: - | _vertices | _edges | - | [("Yao Ming")] | <[edge1]> | - | <[vertex2]> | <[edge2]> | - | <[vertex3]> | <[edge3]> | - | <[vertex4]> | <[edge4]> | - | <[vertex5]> | <[edge5]> | - When executing query: - """ - GET SUBGRAPH WITH PROP 5 steps from 'Tony Parker' IN teammate OUT serve BOTH like - """ - Then define some list variables: - | edge1 | vertex2 | edge2 | vertex3 | edge3 | vertex4 | edge4 | vertex5 | edge5 | vertex6 | edge6 | - | [:serve "Tony Parker"->"Hornets"@0] | ("Tim Duncan") | [:serve "Tim Duncan"->"Spurs"@0] | ("Aron Baynes") | [:serve "Aron Baynes"->"Celtics"@0] | ("Yao Ming") | [:serve "Yao Ming"->"Rockets"@0] | ("Grant Hill") | [:serve "Grant Hill"->"Clippers"@0] | ("Steve Nash") | [:serve "Steve Nash"->"Lakers"@0] | - | [:serve "Tony Parker"->"Spurs"@0] | ("Boris Diaw") | [:teammate "Manu Ginobili"->"Tim Duncan"@0] | ("Rudy Gay") | [:serve "Aron Baynes"->"Pistons"@0] | ("Ray Allen") | [:like "Yao Ming"->"Tracy McGrady"@0] | ("Kristaps Porzingis") | [:serve "Grant Hill"->"Magic"@0] | ("Paul Gasol") | [:serve "Steve Nash"->"Mavericks"@0] | - | [:teammate "Manu Ginobili"->"Tony Parker"@0] | ("LaMarcus Aldridge") | [:teammate "Tony Parker"->"Tim Duncan"@0] | ("Damian Lillard") | [:serve "Aron Baynes"->"Spurs"@0] | ("Blake Griffin") | [:serve "Ray Allen"->"Bucks"@0] | ("Dirk Nowitzki") | [:serve "Grant Hill"->"Pistons"@0] | ("Jason Kidd") | [:serve "Steve Nash"->"Suns"@0] | - | [:teammate "Tim Duncan"->"Tony Parker"@0] | ("Manu Ginobili") | [:like "Aron Baynes"->"Tim Duncan"@0] | ("Kevin Durant") | [:serve "Rudy Gay"->"Grizzlies"@0] | ("Paul George") | [:serve "Ray Allen"->"Celtics"@0] | ("Rajon Rondo") | [:serve "Grant Hill"->"Suns"@0] | ("Pelicans") | [:serve "Steve Nash"->"Suns"@1] | - | [:like "Boris Diaw"->"Tony Parker"@0] | ("Marco Belinelli") | [:like "Boris Diaw"->"Tim Duncan"@0] | ("Shaquille O'Neal") | [:serve "Rudy Gay"->"Kings"@0] | ("JaVale McGee") | [:serve "Ray Allen"->"Heat"@0] | ("Vince Carter") | [:serve "Kristaps Porzingis"->"Knicks"@0] | ("Nets") | [:like "Jason Kidd"->"Steve Nash"@0] | - | [:like "Dejounte Murray"->"Tony Parker"@0] | ("Dejounte Murray") | [:like "Danny Green"->"Tim Duncan"@0] | ("Tiago Splitter") | [:serve "Rudy Gay"->"Raptors"@0] | ("Luka Doncic") | [:serve "Ray Allen"->"Thunders"@0] | ("Kobe Bryant") | [:serve "Kristaps Porzingis"->"Mavericks"@0] | | [:serve "Paul Gasol"->"Spurs"@0] | - | [:like "LaMarcus Aldridge"->"Tony Parker"@0] | ("Hornets") | [:like "Dejounte Murray"->"Tim Duncan"@0] | ("Russell Westbrook") | [:serve "Rudy Gay"->"Spurs"@0] | ("Carmelo Anthony") | [:like "Rajon Rondo"->"Ray Allen"@0] | ("Wizards") | [:serve "Dirk Nowitzki"->"Mavericks"@0] | | [:like "Steve Nash"->"Jason Kidd"@0] | - | [:like "Marco Belinelli"->"Tony Parker"@0] | ("Spurs") | [:like "LaMarcus Aldridge"->"Tim Duncan"@0] | ("Danny Green") | [:like "Tracy McGrady"->"Rudy Gay"@0] | ("Tracy McGrady") | [:like "Ray Allen"->"Rajon Rondo"@0] | ("Pacers") | [:like "Jason Kidd"->"Dirk Nowitzki"@0] | | [:serve "Paul Gasol"->"Lakers"@0] | - | [:like "Tim Duncan"->"Tony Parker"@0] | | [:like "Manu Ginobili"->"Tim Duncan"@0] | ("Kyle Anderson") | [:serve "Damian Lillard"->"Trail Blazers"@0] | ("Dwyane Wade") | [:serve "Blake Griffin"->"Clippers"@0] | ("Knicks") | [:like "Steve Nash"->"Dirk Nowitzki"@0] | | [:serve "Jason Kidd"->"Knicks"@0] | - | [:like "Tony Parker"->"LaMarcus Aldridge"@0] | | [:like "Marco Belinelli"->"Tim Duncan"@0] | ("James Harden") | [:serve "Kevin Durant"->"Thunders"@0] | ("Kyrie Irving") | [:serve "Blake Griffin"->"Pistons"@0] | ("Bucks") | [:like "Dirk Nowitzki"->"Jason Kidd"@0] | | [:serve "Jason Kidd"->"Mavericks"@0] | - | [:like "Tony Parker"->"Manu Ginobili"@0] | | [:like "Shaquille O'Neal"->"Tim Duncan"@0] | ("LeBron James") | [:serve "Kevin Durant"->"Warriors"@0] | ("Cavaliers") | [:serve "Paul George"->"Pacers"@0] | ("Mavericks") | [:like "Dirk Nowitzki"->"Steve Nash"@0] | | [:serve "Jason Kidd"->"Nets"@0] | - | [:like "Tony Parker"->"Tim Duncan"@0] | | [:like "Tiago Splitter"->"Tim Duncan"@0] | ("Chris Paul") | [:serve "Shaquille O'Neal"->"Cavaliers"@0] | ("Celtics") | [:serve "Paul George"->"Thunders"@0] | ("Nuggets") | [:serve "Rajon Rondo"->"Bulls"@0] | | [:serve "Jason Kidd"->"Suns"@0] | - | | | [:like "Tim Duncan"->"Manu Ginobili"@0] | ("Bulls") | [:serve "Shaquille O'Neal"->"Celtics"@0] | ("Pistons") | [:serve "JaVale McGee"->"Lakers"@0] | | [:serve "Rajon Rondo"->"Celtics"@0] | | [:serve "Jason Kidd"->"Mavericks"@1] | - | | | [:serve "Boris Diaw"->"Hawks"@0] | ("Jazz") | [:serve "Shaquille O'Neal"->"Heat"@0] | ("Grizzlies") | [:serve "JaVale McGee"->"Mavericks"@0] | | [:serve "Rajon Rondo"->"Kings"@0] | | [:serve "Paul Gasol"->"Bucks"@0] | - | | | [:serve "Boris Diaw"->"Hornets"@0] | ("Hawks") | [:serve "Shaquille O'Neal"->"Lakers"@0] | ("Heat") | [:serve "JaVale McGee"->"Nuggets"@0] | | [:serve "Rajon Rondo"->"Lakers"@0] | | [:serve "Paul Gasol"->"Bulls"@0] | - | | | [:serve "Boris Diaw"->"Jazz"@0] | ("Warriors") | [:serve "Shaquille O'Neal"->"Magic"@0] | ("Magic") | [:serve "JaVale McGee"->"Warriors"@0] | | [:serve "Rajon Rondo"->"Mavericks"@0] | | [:serve "Paul Gasol"->"Grizzlies"@0] | - | | | [:serve "Boris Diaw"->"Spurs"@0] | ("Suns") | [:serve "Shaquille O'Neal"->"Suns"@0] | ("Lakers") | [:serve "JaVale McGee"->"Wizards"@0] | | [:serve "Rajon Rondo"->"Pelicans"@0] | | | - | | | [:serve "Boris Diaw"->"Suns"@0] | ("Trail Blazers") | [:like "Yao Ming"->"Shaquille O'Neal"@0] | ("Clippers") | [:serve "Luka Doncic"->"Mavericks"@0] | | [:serve "Vince Carter"->"Grizzlies"@0] | | | - | | | [:serve "LaMarcus Aldridge"->"Spurs"@0] | ("Kings") | [:like "Shaquille O'Neal"->"JaVale McGee"@0] | ("Thunders") | [:like "Kristaps Porzingis"->"Luka Doncic"@0] | | [:serve "Vince Carter"->"Hawks"@0] | | | - | | | [:serve "LaMarcus Aldridge"->"Trail Blazers"@0] | ("Raptors") | [:serve "Tiago Splitter"->"76ers"@0] | ("Rockets") | [:like "Luka Doncic"->"Dirk Nowitzki"@0] | | [:serve "Vince Carter"->"Kings"@0] | | | - | | | [:teammate "Tim Duncan"->"LaMarcus Aldridge"@0] | ("76ers") | [:serve "Tiago Splitter"->"Hawks"@0] | | [:like "Luka Doncic"->"Kristaps Porzingis"@0] | | [:serve "Vince Carter"->"Magic"@0] | | | - | | | [:teammate "Tony Parker"->"LaMarcus Aldridge"@0] | | [:serve "Tiago Splitter"->"Spurs"@0] | | [:serve "Carmelo Anthony"->"Knicks"@0] | | [:serve "Vince Carter"->"Mavericks"@0] | | | - | | | [:like "Damian Lillard"->"LaMarcus Aldridge"@0] | | [:serve "Russell Westbrook"->"Thunders"@0] | | [:serve "Carmelo Anthony"->"Nuggets"@0] | | [:serve "Vince Carter"->"Nets"@0] | | | - | | | [:like "Rudy Gay"->"LaMarcus Aldridge"@0] | | [:like "James Harden"->"Russell Westbrook"@0] | | [:serve "Carmelo Anthony"->"Rockets"@0] | | [:serve "Vince Carter"->"Raptors"@0] | | | - | | | [:serve "Manu Ginobili"->"Spurs"@0] | | [:like "Paul George"->"Russell Westbrook"@0] | | [:serve "Carmelo Anthony"->"Thunders"@0] | | [:serve "Vince Carter"->"Suns"@0] | | | - | | | [:teammate "Tim Duncan"->"Manu Ginobili"@0] | | [:like "Russell Westbrook"->"James Harden"@0] | | [:like "Dwyane Wade"->"Carmelo Anthony"@0] | | [:like "Jason Kidd"->"Vince Carter"@0] | | | - | | | [:teammate "Tony Parker"->"Manu Ginobili"@0] | | [:like "Russell Westbrook"->"Paul George"@0] | | [:like "Carmelo Anthony"->"Dwyane Wade"@0] | | [:like "Vince Carter"->"Jason Kidd"@0] | | | - | | | [:like "Dejounte Murray"->"Manu Ginobili"@0] | | [:serve "Danny Green"->"Cavaliers"@0] | | [:serve "Tracy McGrady"->"Magic"@0] | | [:serve "Kobe Bryant"->"Lakers"@0] | | | - | | | [:like "Tiago Splitter"->"Manu Ginobili"@0] | | [:serve "Danny Green"->"Raptors"@0] | | [:serve "Tracy McGrady"->"Raptors"@0] | | [:like "Paul Gasol"->"Kobe Bryant"@0] | | | - | | | [:serve "Marco Belinelli"->"76ers"@0] | | [:serve "Danny Green"->"Spurs"@0] | | [:serve "Tracy McGrady"->"Rockets"@0] | | | | | - | | | [:serve "Marco Belinelli"->"Bulls"@0] | | [:teammate "Tim Duncan"->"Danny Green"@0] | | [:serve "Tracy McGrady"->"Spurs"@0] | | | | | - | | | [:serve "Marco Belinelli"->"Hawks"@0] | | [:like "Danny Green"->"LeBron James"@0] | | [:like "Grant Hill"->"Tracy McGrady"@0] | | | | | - | | | [:serve "Marco Belinelli"->"Hornets"@0] | | [:serve "Kyle Anderson"->"Grizzlies"@0] | | [:like "Vince Carter"->"Tracy McGrady"@0] | | | | | - | | | [:serve "Marco Belinelli"->"Kings"@0] | | [:serve "Kyle Anderson"->"Spurs"@0] | | [:like "Tracy McGrady"->"Grant Hill"@0] | | | | | - | | | [:serve "Marco Belinelli"->"Raptors"@0] | | [:teammate "Tony Parker"->"Kyle Anderson"@0] | | [:like "Tracy McGrady"->"Kobe Bryant"@0] | | | | | - | | | [:serve "Marco Belinelli"->"Spurs"@0] | | [:serve "James Harden"->"Rockets"@0] | | [:serve "Dwyane Wade"->"Bulls"@0] | | | | | - | | | [:serve "Marco Belinelli"->"Warriors"@0] | | [:serve "James Harden"->"Thunders"@0] | | [:serve "Dwyane Wade"->"Cavaliers"@0] | | | | | - | | | [:serve "Marco Belinelli"->"Hornets"@1] | | [:like "Luka Doncic"->"James Harden"@0] | | [:serve "Dwyane Wade"->"Heat"@0] | | | | | - | | | [:serve "Marco Belinelli"->"Spurs"@1] | | [:serve "LeBron James"->"Cavaliers"@0] | | [:serve "Dwyane Wade"->"Heat"@1] | | | | | - | | | [:like "Danny Green"->"Marco Belinelli"@0] | | [:serve "LeBron James"->"Heat"@0] | | [:like "Dirk Nowitzki"->"Dwyane Wade"@0] | | | | | - | | | [:like "Dejounte Murray"->"Marco Belinelli"@0] | | [:serve "LeBron James"->"Lakers"@0] | | [:serve "Kyrie Irving"->"Cavaliers"@0] | | | | | - | | | [:like "Marco Belinelli"->"Danny Green"@0] | | [:serve "LeBron James"->"Cavaliers"@1] | | [:serve "Kyrie Irving"->"Celtics"@0] | | | | | - | | | [:serve "Dejounte Murray"->"Spurs"@0] | | [:like "Carmelo Anthony"->"LeBron James"@0] | | | | | | | - | | | [:like "Dejounte Murray"->"Chris Paul"@0] | | [:like "Chris Paul"->"LeBron James"@0] | | | | | | | - | | | [:like "Dejounte Murray"->"Danny Green"@0] | | [:like "Dwyane Wade"->"LeBron James"@0] | | | | | | | - | | | [:like "Dejounte Murray"->"James Harden"@0] | | [:like "Kyrie Irving"->"LeBron James"@0] | | | | | | | - | | | [:like "Dejounte Murray"->"Kevin Durant"@0] | | [:like "LeBron James"->"Ray Allen"@0] | | | | | | | - | | | [:like "Dejounte Murray"->"Kyle Anderson"@0] | | [:serve "Chris Paul"->"Clippers"@0] | | | | | | | - | | | [:like "Dejounte Murray"->"LeBron James"@0] | | [:serve "Chris Paul"->"Hornets"@0] | | | | | | | - | | | [:like "Dejounte Murray"->"Russell Westbrook"@0] | | [:serve "Chris Paul"->"Rockets"@0] | | | | | | | - | | | | | [:like "Blake Griffin"->"Chris Paul"@0] | | | | | | | - | | | | | [:like "Carmelo Anthony"->"Chris Paul"@0] | | | | | | | - | | | | | [:like "Dwyane Wade"->"Chris Paul"@0] | | | | | | | - | | | | | [:like "Chris Paul"->"Carmelo Anthony"@0] | | | | | | | - | | | | | [:like "Chris Paul"->"Dwyane Wade"@0] | | | | | | | - Then the result should be, in any order, with relax comparison: - | _vertices | _edges | - | [("Tony Parker")] | <[edge1]> | - | <[vertex2]> | <[edge2]> | - | <[vertex3]> | <[edge3]> | - | <[vertex4]> | <[edge4]> | - | <[vertex5]> | <[edge5]> | - | <[vertex6]> | <[edge6]> | - When executing query: - """ - GET SUBGRAPH WITH PROP 4 steps from 'Tim Duncan' BOTH like - """ - Then define some list variables: - | edge1 | vertex2 | edge2 | vertex3 | edge3 | vertex4 | edge4 | vertex5 | - | [:like "Aron Baynes"->"Tim Duncan"@0] | ("LaMarcus Aldridge") | [:like "Damian Lillard"->"LaMarcus Aldridge"@0] | ("Kevin Durant") | [:like "Luka Doncic"->"James Harden"@0] | ("Tracy McGrady") | [:like "Grant Hill"->"Tracy McGrady"@0] | ("Kobe Bryant") | - | [:like "Boris Diaw"->"Tim Duncan"@0] | ("Boris Diaw") | [:like "Rudy Gay"->"LaMarcus Aldridge"@0] | ("James Harden") | [:like "Russell Westbrook"->"James Harden"@0] | ("Carmelo Anthony") | [:like "Vince Carter"->"Tracy McGrady"@0] | ("Dirk Nowitzki") | - | [:like "Danny Green"->"Tim Duncan"@0] | ("Dejounte Murray") | [:like "Tony Parker"->"LaMarcus Aldridge"@0] | ("Chris Paul") | [:like "James Harden"->"Russell Westbrook"@0] | ("Luka Doncic") | [:like "Tracy McGrady"->"Grant Hill"@0] | ("Grant Hill") | - | [:like "Dejounte Murray"->"Tim Duncan"@0] | ("Danny Green") | [:like "LaMarcus Aldridge"->"Tony Parker"@0] | ("Damian Lillard") | [:like "Blake Griffin"->"Chris Paul"@0] | ("Blake Griffin") | [:like "Tracy McGrady"->"Kobe Bryant"@0] | ("Vince Carter") | - | [:like "LaMarcus Aldridge"->"Tim Duncan"@0] | ("Marco Belinelli") | [:like "Boris Diaw"->"Tony Parker"@0] | ("Rudy Gay") | [:like "Carmelo Anthony"->"Chris Paul"@0] | ("Dwyane Wade") | [:like "Dwyane Wade"->"Carmelo Anthony"@0] | ("Rajon Rondo") | - | [:like "Manu Ginobili"->"Tim Duncan"@0] | ("Aron Baynes") | [:like "Dejounte Murray"->"Chris Paul"@0] | ("Kyle Anderson") | [:like "Dwyane Wade"->"Chris Paul"@0] | ("Kyrie Irving") | [:like "Carmelo Anthony"->"Dwyane Wade"@0] | ("Kristaps Porzingis") | - | [:like "Marco Belinelli"->"Tim Duncan"@0] | ("Manu Ginobili") | [:like "Dejounte Murray"->"Danny Green"@0] | ("LeBron James") | [:like "Chris Paul"->"Carmelo Anthony"@0] | ("Ray Allen") | [:like "Kristaps Porzingis"->"Luka Doncic"@0] | | - | [:like "Shaquille O'Neal"->"Tim Duncan"@0] | ("Tiago Splitter") | [:like "Dejounte Murray"->"James Harden"@0] | ("Russell Westbrook") | [:like "Chris Paul"->"Dwyane Wade"@0] | ("Paul George") | [:like "Luka Doncic"->"Dirk Nowitzki"@0] | | - | [:like "Tiago Splitter"->"Tim Duncan"@0] | ("Shaquille O'Neal") | [:like "Dejounte Murray"->"Kevin Durant"@0] | ("Yao Ming") | [:like "Chris Paul"->"LeBron James"@0] | | [:like "Luka Doncic"->"Kristaps Porzingis"@0] | | - | [:like "Tony Parker"->"Tim Duncan"@0] | ("Tony Parker") | [:like "Dejounte Murray"->"Kyle Anderson"@0] | ("JaVale McGee") | [:like "Tracy McGrady"->"Rudy Gay"@0] | | [:like "Dirk Nowitzki"->"Dwyane Wade"@0] | | - | [:like "Tim Duncan"->"Manu Ginobili"@0] | | [:like "Dejounte Murray"->"LeBron James"@0] | | [:like "Carmelo Anthony"->"LeBron James"@0] | | [:like "Rajon Rondo"->"Ray Allen"@0] | | - | [:like "Tim Duncan"->"Tony Parker"@0] | | [:like "Dejounte Murray"->"Manu Ginobili"@0] | | [:like "Dwyane Wade"->"LeBron James"@0] | | [:like "Ray Allen"->"Rajon Rondo"@0] | | - | | | [:like "Dejounte Murray"->"Marco Belinelli"@0] | | [:like "Kyrie Irving"->"LeBron James"@0] | | | | - | | | [:like "Dejounte Murray"->"Russell Westbrook"@0] | | [:like "LeBron James"->"Ray Allen"@0] | | | | - | | | [:like "Dejounte Murray"->"Tony Parker"@0] | | [:like "Paul George"->"Russell Westbrook"@0] | | | | - | | | [:like "Marco Belinelli"->"Danny Green"@0] | | [:like "Russell Westbrook"->"Paul George"@0] | | | | - | | | [:like "Danny Green"->"LeBron James"@0] | | [:like "Yao Ming"->"Tracy McGrady"@0] | | | | - | | | [:like "Danny Green"->"Marco Belinelli"@0] | | | | | | - | | | [:like "Marco Belinelli"->"Tony Parker"@0] | | | | | | - | | | [:like "Tiago Splitter"->"Manu Ginobili"@0] | | | | | | - | | | [:like "Tony Parker"->"Manu Ginobili"@0] | | | | | | - | | | [:like "Yao Ming"->"Shaquille O'Neal"@0] | | | | | | - | | | [:like "Shaquille O'Neal"->"JaVale McGee"@0] | | | | | | - Then the result should be, in any order, with relax comparison: - | _vertices | _edges | - | [("Tim Duncan")] | <[edge1]> | - | <[vertex2]> | <[edge2]> | - | <[vertex3]> | <[edge3]> | - | <[vertex4]> | <[edge4]> | - | <[vertex5]> | [] | - - Scenario: over end - When executing query: - """ - GET SUBGRAPH WITH PROP 10000000000000 STEPS FROM 'Yao Ming' IN teammate OUT serve - """ - Then the result should be, in any order, with relax comparison: - | _vertices | _edges | - | [("Yao Ming")] | [[:serve "Yao Ming"->"Rockets"@0]] | - | [("Rockets")] | [] | - When executing query: - """ - GET SUBGRAPH 10000000000000 STEPS FROM 'Yao Ming' IN teammate OUT serve - """ - Then the result should be, in any order, with relax comparison: - | _vertices | _edges | - | [("Yao Ming")] | [[:serve "Yao Ming"->"Rockets"@0]] | - | [("Rockets")] | [] | - - Scenario: many steps without prop - When executing query: - """ - GET SUBGRAPH 4 STEPS FROM 'Yao Ming' IN teammate OUT serve - """ - Then the result should be, in any order, with relax comparison: - | _vertices | _edges | - | [("Yao Ming")] | [[:serve "Yao Ming"->"Rockets"@0]] | - | [("Rockets")] | [] | - When executing query: - """ - GET SUBGRAPH 4 STEPS FROM 'NOBODY' IN teammate OUT serve - """ - Then the result should be, in any order, with relax comparison: - | _vertices | _edges | - | [("NOBODY")] | [] | - When executing query: - """ - GET SUBGRAPH 4 steps from 'Yao Ming' IN teammate OUT serve BOTH like - """ - Then define some list variables: - | edge1 | vertex2 | edge2 | vertex3 | edge3 | vertex4 | edge4 | vertex5 | edge5 | - | [:serve "Yao Ming"->"Rockets"@0] | ("Shaquille O'Neal") | [:serve "Shaquille O'Neal"->"Cavaliers"@0] | ("Kobe Bryant") | [:serve "Kobe Bryant"->"Lakers"@0] | ("Manu Ginobili") | [:serve "Manu Ginobili"->"Spurs"@0] | ("Dirk Nowitzki") | [:like "Dirk Nowitzki"->"Steve Nash"@0] | - | [:like "Yao Ming"->"Shaquille O'Neal"@0] | ("Tracy McGrady") | [:serve "Shaquille O'Neal"->"Celtics"@0] | ("Grant Hill") | [:like "Paul Gasol"->"Kobe Bryant"@0] | ("Paul Gasol") | [:teammate "Tim Duncan"->"Manu Ginobili"@0] | ("Kevin Durant") | [:serve "Kevin Durant"->"Warriors"@0] | - | [:like "Yao Ming"->"Tracy McGrady"@0] | ("Rockets") | [:serve "Shaquille O'Neal"->"Heat"@0] | ("Vince Carter") | [:serve "Grant Hill"->"Clippers"@0] | ("Jason Kidd") | [:teammate "Tony Parker"->"Manu Ginobili"@0] | ("Damian Lillard") | [:serve "Damian Lillard"->"Trail Blazers"@0] | - | | | [:serve "Shaquille O'Neal"->"Lakers"@0] | ("Tim Duncan") | [:serve "Grant Hill"->"Magic"@0] | ("Tony Parker") | [:like "Dejounte Murray"->"Manu Ginobili"@0] | ("James Harden") | [:serve "James Harden"->"Rockets"@0] | - | | | [:serve "Shaquille O'Neal"->"Magic"@0] | ("JaVale McGee") | [:serve "Grant Hill"->"Pistons"@0] | ("Marco Belinelli") | [:like "Tiago Splitter"->"Manu Ginobili"@0] | ("Chris Paul") | [:like "Steve Nash"->"Dirk Nowitzki"@0] | - | | | [:serve "Shaquille O'Neal"->"Suns"@0] | ("Rudy Gay") | [:serve "Grant Hill"->"Suns"@0] | ("Dejounte Murray") | [:like "Tony Parker"->"Manu Ginobili"@0] | ("LeBron James") | [:like "Russell Westbrook"->"James Harden"@0] | - | | | [:like "Shaquille O'Neal"->"JaVale McGee"@0] | ("Magic") | [:serve "Vince Carter"->"Grizzlies"@0] | ("Aron Baynes") | [:serve "Paul Gasol"->"Bucks"@0] | ("Steve Nash") | [:like "James Harden"->"Russell Westbrook"@0] | - | | | [:like "Shaquille O'Neal"->"Tim Duncan"@0] | ("Spurs") | [:serve "Vince Carter"->"Hawks"@0] | ("Boris Diaw") | [:serve "Paul Gasol"->"Bulls"@0] | ("Marc Gasol") | [:serve "Chris Paul"->"Clippers"@0] | - | | | [:serve "Tracy McGrady"->"Magic"@0] | ("Celtics") | [:serve "Vince Carter"->"Kings"@0] | ("Danny Green") | [:serve "Paul Gasol"->"Grizzlies"@0] | ("Kyle Anderson") | [:serve "Chris Paul"->"Hornets"@0] | - | | | [:serve "Tracy McGrady"->"Raptors"@0] | ("Heat") | [:serve "Vince Carter"->"Magic"@0] | ("LaMarcus Aldridge") | [:serve "Paul Gasol"->"Lakers"@0] | ("Russell Westbrook") | [:serve "Chris Paul"->"Rockets"@0] | - | | | [:serve "Tracy McGrady"->"Rockets"@0] | ("Suns") | [:serve "Vince Carter"->"Mavericks"@0] | ("Tiago Splitter") | [:serve "Paul Gasol"->"Spurs"@0] | ("76ers") | [:serve "Dirk Nowitzki"->"Mavericks"@0] | - | | | [:serve "Tracy McGrady"->"Spurs"@0] | ("Lakers") | [:serve "Vince Carter"->"Nets"@0] | ("Pistons") | [:like "Marc Gasol"->"Paul Gasol"@0] | ("Hornets") | [:like "Chris Paul"->"LeBron James"@0] | - | | | [:like "Grant Hill"->"Tracy McGrady"@0] | ("Cavaliers") | [:serve "Vince Carter"->"Raptors"@0] | ("Nets") | [:like "Paul Gasol"->"Marc Gasol"@0] | ("Bucks") | [:serve "Steve Nash"->"Lakers"@0] | - | | | [:like "Vince Carter"->"Tracy McGrady"@0] | ("Raptors") | [:serve "Vince Carter"->"Suns"@0] | ("Kings") | [:serve "Jason Kidd"->"Knicks"@0] | ("Knicks") | [:serve "Steve Nash"->"Mavericks"@0] | - | | | [:like "Tracy McGrady"->"Grant Hill"@0] | | [:like "Jason Kidd"->"Vince Carter"@0] | ("Clippers") | [:serve "Jason Kidd"->"Mavericks"@0] | ("Bulls") | [:serve "Steve Nash"->"Suns"@0] | - | | | [:like "Tracy McGrady"->"Kobe Bryant"@0] | | [:like "Vince Carter"->"Jason Kidd"@0] | ("Mavericks") | [:serve "Jason Kidd"->"Nets"@0] | ("Trail Blazers") | [:serve "Steve Nash"->"Suns"@1] | - | | | [:like "Tracy McGrady"->"Rudy Gay"@0] | | [:serve "Tim Duncan"->"Spurs"@0] | ("Hawks") | [:serve "Jason Kidd"->"Suns"@0] | ("Jazz") | [:serve "LeBron James"->"Cavaliers"@1] | - | | | | | [:teammate "Manu Ginobili"->"Tim Duncan"@0] | ("Warriors") | [:serve "Jason Kidd"->"Mavericks"@1] | | [:serve "LeBron James"->"Lakers"@0] | - | | | | | [:teammate "Tony Parker"->"Tim Duncan"@0] | ("Nuggets") | [:like "Dirk Nowitzki"->"Jason Kidd"@0] | | [:serve "LeBron James"->"Heat"@0] | - | | | | | [:like "Aron Baynes"->"Tim Duncan"@0] | ("Grizzlies") | [:like "Steve Nash"->"Jason Kidd"@0] | | [:serve "Marc Gasol"->"Grizzlies"@0] | - | | | | | [:like "Boris Diaw"->"Tim Duncan"@0] | ("Wizards") | [:like "Jason Kidd"->"Dirk Nowitzki"@0] | | [:serve "Marc Gasol"->"Raptors"@0] | - | | | | | [:like "Danny Green"->"Tim Duncan"@0] | | [:like "Jason Kidd"->"Steve Nash"@0] | | [:serve "Kyle Anderson"->"Grizzlies"@0] | - | | | | | [:like "Dejounte Murray"->"Tim Duncan"@0] | | [:serve "Tony Parker"->"Hornets"@0] | | [:serve "Kyle Anderson"->"Spurs"@0] | - | | | | | [:like "LaMarcus Aldridge"->"Tim Duncan"@0] | | [:serve "Tony Parker"->"Spurs"@0] | | [:teammate "Tony Parker"->"Kyle Anderson"@0] | - | | | | | [:like "Manu Ginobili"->"Tim Duncan"@0] | | [:teammate "Manu Ginobili"->"Tony Parker"@0] | | [:serve "LeBron James"->"Cavaliers"@0] | - | | | | | [:like "Marco Belinelli"->"Tim Duncan"@0] | | [:teammate "Tim Duncan"->"Tony Parker"@0] | | | - | | | | | [:like "Tiago Splitter"->"Tim Duncan"@0] | | [:like "Boris Diaw"->"Tony Parker"@0] | | | - | | | | | [:like "Tony Parker"->"Tim Duncan"@0] | | [:like "Dejounte Murray"->"Tony Parker"@0] | | | - | | | | | [:like "Tim Duncan"->"Manu Ginobili"@0] | | [:like "LaMarcus Aldridge"->"Tony Parker"@0] | | | - | | | | | [:like "Tim Duncan"->"Tony Parker"@0] | | [:like "Marco Belinelli"->"Tony Parker"@0] | | | - | | | | | [:serve "JaVale McGee"->"Lakers"@0] | | [:like "Tony Parker"->"LaMarcus Aldridge"@0] | | | - | | | | | [:serve "JaVale McGee"->"Mavericks"@0] | | [:serve "Marco Belinelli"->"76ers"@0] | | | - | | | | | [:serve "JaVale McGee"->"Nuggets"@0] | | [:serve "Marco Belinelli"->"Bulls"@0] | | | - | | | | | [:serve "JaVale McGee"->"Warriors"@0] | | [:serve "Marco Belinelli"->"Hawks"@0] | | | - | | | | | [:serve "JaVale McGee"->"Wizards"@0] | | [:serve "Marco Belinelli"->"Hornets"@0] | | | - | | | | | [:serve "Rudy Gay"->"Grizzlies"@0] | | [:serve "Marco Belinelli"->"Kings"@0] | | | - | | | | | [:serve "Rudy Gay"->"Kings"@0] | | [:serve "Marco Belinelli"->"Raptors"@0] | | | - | | | | | [:serve "Rudy Gay"->"Raptors"@0] | | [:serve "Marco Belinelli"->"Spurs"@0] | | | - | | | | | [:serve "Rudy Gay"->"Spurs"@0] | | [:serve "Marco Belinelli"->"Warriors"@0] | | | - | | | | | [:like "Rudy Gay"->"LaMarcus Aldridge"@0] | | [:serve "Marco Belinelli"->"Hornets"@1] | | | - | | | | | | | [:serve "Marco Belinelli"->"Spurs"@1] | | | - | | | | | | | [:like "Danny Green"->"Marco Belinelli"@0] | | | - | | | | | | | [:like "Dejounte Murray"->"Marco Belinelli"@0] | | | - | | | | | | | [:like "Marco Belinelli"->"Danny Green"@0] | | | - | | | | | | | [:serve "Dejounte Murray"->"Spurs"@0] | | | - | | | | | | | [:like "Dejounte Murray"->"Chris Paul"@0] | | | - | | | | | | | [:like "Dejounte Murray"->"Danny Green"@0] | | | - | | | | | | | [:like "Dejounte Murray"->"James Harden"@0] | | | - | | | | | | | [:like "Dejounte Murray"->"Kevin Durant"@0] | | | - | | | | | | | [:like "Dejounte Murray"->"Kyle Anderson"@0] | | | - | | | | | | | [:like "Dejounte Murray"->"LeBron James"@0] | | | - | | | | | | | [:like "Dejounte Murray"->"Russell Westbrook"@0] | | | - | | | | | | | [:serve "Aron Baynes"->"Celtics"@0] | | | - | | | | | | | [:serve "Aron Baynes"->"Pistons"@0] | | | - | | | | | | | [:serve "Aron Baynes"->"Spurs"@0] | | | - | | | | | | | [:serve "Boris Diaw"->"Hawks"@0] | | | - | | | | | | | [:serve "Boris Diaw"->"Hornets"@0] | | | - | | | | | | | [:serve "Boris Diaw"->"Jazz"@0] | | | - | | | | | | | [:serve "Boris Diaw"->"Spurs"@0] | | | - | | | | | | | [:serve "Boris Diaw"->"Suns"@0] | | | - | | | | | | | [:serve "Danny Green"->"Cavaliers"@0] | | | - | | | | | | | [:serve "Danny Green"->"Raptors"@0] | | | - | | | | | | | [:serve "Danny Green"->"Spurs"@0] | | | - | | | | | | | [:teammate "Tim Duncan"->"Danny Green"@0] | | | - | | | | | | | [:like "Danny Green"->"LeBron James"@0] | | | - | | | | | | | [:serve "LaMarcus Aldridge"->"Spurs"@0] | | | - | | | | | | | [:serve "LaMarcus Aldridge"->"Trail Blazers"@0] | | | - | | | | | | | [:teammate "Tim Duncan"->"LaMarcus Aldridge"@0] | | | - | | | | | | | [:teammate "Tony Parker"->"LaMarcus Aldridge"@0] | | | - | | | | | | | [:like "Damian Lillard"->"LaMarcus Aldridge"@0] | | | - | | | | | | | [:serve "Tiago Splitter"->"76ers"@0] | | | - | | | | | | | [:serve "Tiago Splitter"->"Hawks"@0] | | | - | | | | | | | [:serve "Tiago Splitter"->"Spurs"@0] | | | - Then the result should be, in any order, with relax comparison: - | _vertices | _edges | - | [("Yao Ming")] | <[edge1]> | - | <[vertex2]> | <[edge2]> | - | <[vertex3]> | <[edge3]> | - | <[vertex4]> | <[edge4]> | - | <[vertex5]> | <[edge5]> | - When executing query: - """ - GET SUBGRAPH 5 steps from 'Tony Parker' IN teammate OUT serve BOTH like - """ - Then define some list variables: - | edge1 | vertex2 | edge2 | vertex3 | edge3 | vertex4 | edge4 | vertex5 | edge5 | vertex6 | edge6 | - | [:serve "Tony Parker"->"Hornets"@0] | ("Tim Duncan") | [:serve "Tim Duncan"->"Spurs"@0] | ("Aron Baynes") | [:serve "Aron Baynes"->"Celtics"@0] | ("Yao Ming") | [:serve "Yao Ming"->"Rockets"@0] | ("Grant Hill") | [:serve "Grant Hill"->"Clippers"@0] | ("Steve Nash") | [:serve "Steve Nash"->"Lakers"@0] | - | [:serve "Tony Parker"->"Spurs"@0] | ("Boris Diaw") | [:teammate "Manu Ginobili"->"Tim Duncan"@0] | ("Rudy Gay") | [:serve "Aron Baynes"->"Pistons"@0] | ("Ray Allen") | [:like "Yao Ming"->"Tracy McGrady"@0] | ("Kristaps Porzingis") | [:serve "Grant Hill"->"Magic"@0] | ("Paul Gasol") | [:serve "Steve Nash"->"Mavericks"@0] | - | [:teammate "Manu Ginobili"->"Tony Parker"@0] | ("LaMarcus Aldridge") | [:teammate "Tony Parker"->"Tim Duncan"@0] | ("Damian Lillard") | [:serve "Aron Baynes"->"Spurs"@0] | ("Blake Griffin") | [:serve "Ray Allen"->"Bucks"@0] | ("Dirk Nowitzki") | [:serve "Grant Hill"->"Pistons"@0] | ("Jason Kidd") | [:serve "Steve Nash"->"Suns"@0] | - | [:teammate "Tim Duncan"->"Tony Parker"@0] | ("Manu Ginobili") | [:like "Aron Baynes"->"Tim Duncan"@0] | ("Kevin Durant") | [:serve "Rudy Gay"->"Grizzlies"@0] | ("Paul George") | [:serve "Ray Allen"->"Celtics"@0] | ("Rajon Rondo") | [:serve "Grant Hill"->"Suns"@0] | ("Pelicans") | [:serve "Steve Nash"->"Suns"@1] | - | [:like "Boris Diaw"->"Tony Parker"@0] | ("Marco Belinelli") | [:like "Boris Diaw"->"Tim Duncan"@0] | ("Shaquille O'Neal") | [:serve "Rudy Gay"->"Kings"@0] | ("JaVale McGee") | [:serve "Ray Allen"->"Heat"@0] | ("Vince Carter") | [:serve "Kristaps Porzingis"->"Knicks"@0] | ("Nets") | [:like "Jason Kidd"->"Steve Nash"@0] | - | [:like "Dejounte Murray"->"Tony Parker"@0] | ("Dejounte Murray") | [:like "Danny Green"->"Tim Duncan"@0] | ("Tiago Splitter") | [:serve "Rudy Gay"->"Raptors"@0] | ("Luka Doncic") | [:serve "Ray Allen"->"Thunders"@0] | ("Kobe Bryant") | [:serve "Kristaps Porzingis"->"Mavericks"@0] | | [:serve "Paul Gasol"->"Spurs"@0] | - | [:like "LaMarcus Aldridge"->"Tony Parker"@0] | ("Hornets") | [:like "Dejounte Murray"->"Tim Duncan"@0] | ("Russell Westbrook") | [:serve "Rudy Gay"->"Spurs"@0] | ("Carmelo Anthony") | [:like "Rajon Rondo"->"Ray Allen"@0] | ("Wizards") | [:serve "Dirk Nowitzki"->"Mavericks"@0] | | [:like "Steve Nash"->"Jason Kidd"@0] | - | [:like "Marco Belinelli"->"Tony Parker"@0] | ("Spurs") | [:like "LaMarcus Aldridge"->"Tim Duncan"@0] | ("Danny Green") | [:like "Tracy McGrady"->"Rudy Gay"@0] | ("Tracy McGrady") | [:like "Ray Allen"->"Rajon Rondo"@0] | ("Pacers") | [:like "Jason Kidd"->"Dirk Nowitzki"@0] | | [:serve "Paul Gasol"->"Lakers"@0] | - | [:like "Tim Duncan"->"Tony Parker"@0] | | [:like "Manu Ginobili"->"Tim Duncan"@0] | ("Kyle Anderson") | [:serve "Damian Lillard"->"Trail Blazers"@0] | ("Dwyane Wade") | [:serve "Blake Griffin"->"Clippers"@0] | ("Knicks") | [:like "Steve Nash"->"Dirk Nowitzki"@0] | | [:serve "Jason Kidd"->"Knicks"@0] | - | [:like "Tony Parker"->"LaMarcus Aldridge"@0] | | [:like "Marco Belinelli"->"Tim Duncan"@0] | ("James Harden") | [:serve "Kevin Durant"->"Thunders"@0] | ("Kyrie Irving") | [:serve "Blake Griffin"->"Pistons"@0] | ("Bucks") | [:like "Dirk Nowitzki"->"Jason Kidd"@0] | | [:serve "Jason Kidd"->"Mavericks"@0] | - | [:like "Tony Parker"->"Manu Ginobili"@0] | | [:like "Shaquille O'Neal"->"Tim Duncan"@0] | ("LeBron James") | [:serve "Kevin Durant"->"Warriors"@0] | ("Cavaliers") | [:serve "Paul George"->"Pacers"@0] | ("Mavericks") | [:like "Dirk Nowitzki"->"Steve Nash"@0] | | [:serve "Jason Kidd"->"Nets"@0] | - | [:like "Tony Parker"->"Tim Duncan"@0] | | [:like "Tiago Splitter"->"Tim Duncan"@0] | ("Chris Paul") | [:serve "Shaquille O'Neal"->"Cavaliers"@0] | ("Celtics") | [:serve "Paul George"->"Thunders"@0] | ("Nuggets") | [:serve "Rajon Rondo"->"Bulls"@0] | | [:serve "Jason Kidd"->"Suns"@0] | - | | | [:like "Tim Duncan"->"Manu Ginobili"@0] | ("Bulls") | [:serve "Shaquille O'Neal"->"Celtics"@0] | ("Pistons") | [:serve "JaVale McGee"->"Lakers"@0] | | [:serve "Rajon Rondo"->"Celtics"@0] | | [:serve "Jason Kidd"->"Mavericks"@1] | - | | | [:serve "Boris Diaw"->"Hawks"@0] | ("Jazz") | [:serve "Shaquille O'Neal"->"Heat"@0] | ("Grizzlies") | [:serve "JaVale McGee"->"Mavericks"@0] | | [:serve "Rajon Rondo"->"Kings"@0] | | [:serve "Paul Gasol"->"Bucks"@0] | - | | | [:serve "Boris Diaw"->"Hornets"@0] | ("Hawks") | [:serve "Shaquille O'Neal"->"Lakers"@0] | ("Heat") | [:serve "JaVale McGee"->"Nuggets"@0] | | [:serve "Rajon Rondo"->"Lakers"@0] | | [:serve "Paul Gasol"->"Bulls"@0] | - | | | [:serve "Boris Diaw"->"Jazz"@0] | ("Warriors") | [:serve "Shaquille O'Neal"->"Magic"@0] | ("Magic") | [:serve "JaVale McGee"->"Warriors"@0] | | [:serve "Rajon Rondo"->"Mavericks"@0] | | [:serve "Paul Gasol"->"Grizzlies"@0] | - | | | [:serve "Boris Diaw"->"Spurs"@0] | ("Suns") | [:serve "Shaquille O'Neal"->"Suns"@0] | ("Lakers") | [:serve "JaVale McGee"->"Wizards"@0] | | [:serve "Rajon Rondo"->"Pelicans"@0] | | | - | | | [:serve "Boris Diaw"->"Suns"@0] | ("Trail Blazers") | [:like "Yao Ming"->"Shaquille O'Neal"@0] | ("Clippers") | [:serve "Luka Doncic"->"Mavericks"@0] | | [:serve "Vince Carter"->"Grizzlies"@0] | | | - | | | [:serve "LaMarcus Aldridge"->"Spurs"@0] | ("Kings") | [:like "Shaquille O'Neal"->"JaVale McGee"@0] | ("Thunders") | [:like "Kristaps Porzingis"->"Luka Doncic"@0] | | [:serve "Vince Carter"->"Hawks"@0] | | | - | | | [:serve "LaMarcus Aldridge"->"Trail Blazers"@0] | ("Raptors") | [:serve "Tiago Splitter"->"76ers"@0] | ("Rockets") | [:like "Luka Doncic"->"Dirk Nowitzki"@0] | | [:serve "Vince Carter"->"Kings"@0] | | | - | | | [:teammate "Tim Duncan"->"LaMarcus Aldridge"@0] | ("76ers") | [:serve "Tiago Splitter"->"Hawks"@0] | | [:like "Luka Doncic"->"Kristaps Porzingis"@0] | | [:serve "Vince Carter"->"Magic"@0] | | | - | | | [:teammate "Tony Parker"->"LaMarcus Aldridge"@0] | | [:serve "Tiago Splitter"->"Spurs"@0] | | [:serve "Carmelo Anthony"->"Knicks"@0] | | [:serve "Vince Carter"->"Mavericks"@0] | | | - | | | [:like "Damian Lillard"->"LaMarcus Aldridge"@0] | | [:serve "Russell Westbrook"->"Thunders"@0] | | [:serve "Carmelo Anthony"->"Nuggets"@0] | | [:serve "Vince Carter"->"Nets"@0] | | | - | | | [:like "Rudy Gay"->"LaMarcus Aldridge"@0] | | [:like "James Harden"->"Russell Westbrook"@0] | | [:serve "Carmelo Anthony"->"Rockets"@0] | | [:serve "Vince Carter"->"Raptors"@0] | | | - | | | [:serve "Manu Ginobili"->"Spurs"@0] | | [:like "Paul George"->"Russell Westbrook"@0] | | [:serve "Carmelo Anthony"->"Thunders"@0] | | [:serve "Vince Carter"->"Suns"@0] | | | - | | | [:teammate "Tim Duncan"->"Manu Ginobili"@0] | | [:like "Russell Westbrook"->"James Harden"@0] | | [:like "Dwyane Wade"->"Carmelo Anthony"@0] | | [:like "Jason Kidd"->"Vince Carter"@0] | | | - | | | [:teammate "Tony Parker"->"Manu Ginobili"@0] | | [:like "Russell Westbrook"->"Paul George"@0] | | [:like "Carmelo Anthony"->"Dwyane Wade"@0] | | [:like "Vince Carter"->"Jason Kidd"@0] | | | - | | | [:like "Dejounte Murray"->"Manu Ginobili"@0] | | [:serve "Danny Green"->"Cavaliers"@0] | | [:serve "Tracy McGrady"->"Magic"@0] | | [:serve "Kobe Bryant"->"Lakers"@0] | | | - | | | [:like "Tiago Splitter"->"Manu Ginobili"@0] | | [:serve "Danny Green"->"Raptors"@0] | | [:serve "Tracy McGrady"->"Raptors"@0] | | [:like "Paul Gasol"->"Kobe Bryant"@0] | | | - | | | [:serve "Marco Belinelli"->"76ers"@0] | | [:serve "Danny Green"->"Spurs"@0] | | [:serve "Tracy McGrady"->"Rockets"@0] | | | | | - | | | [:serve "Marco Belinelli"->"Bulls"@0] | | [:teammate "Tim Duncan"->"Danny Green"@0] | | [:serve "Tracy McGrady"->"Spurs"@0] | | | | | - | | | [:serve "Marco Belinelli"->"Hawks"@0] | | [:like "Danny Green"->"LeBron James"@0] | | [:like "Grant Hill"->"Tracy McGrady"@0] | | | | | - | | | [:serve "Marco Belinelli"->"Hornets"@0] | | [:serve "Kyle Anderson"->"Grizzlies"@0] | | [:like "Vince Carter"->"Tracy McGrady"@0] | | | | | - | | | [:serve "Marco Belinelli"->"Kings"@0] | | [:serve "Kyle Anderson"->"Spurs"@0] | | [:like "Tracy McGrady"->"Grant Hill"@0] | | | | | - | | | [:serve "Marco Belinelli"->"Raptors"@0] | | [:teammate "Tony Parker"->"Kyle Anderson"@0] | | [:like "Tracy McGrady"->"Kobe Bryant"@0] | | | | | - | | | [:serve "Marco Belinelli"->"Spurs"@0] | | [:serve "James Harden"->"Rockets"@0] | | [:serve "Dwyane Wade"->"Bulls"@0] | | | | | - | | | [:serve "Marco Belinelli"->"Warriors"@0] | | [:serve "James Harden"->"Thunders"@0] | | [:serve "Dwyane Wade"->"Cavaliers"@0] | | | | | - | | | [:serve "Marco Belinelli"->"Hornets"@1] | | [:like "Luka Doncic"->"James Harden"@0] | | [:serve "Dwyane Wade"->"Heat"@0] | | | | | - | | | [:serve "Marco Belinelli"->"Spurs"@1] | | [:serve "LeBron James"->"Cavaliers"@0] | | [:serve "Dwyane Wade"->"Heat"@1] | | | | | - | | | [:like "Danny Green"->"Marco Belinelli"@0] | | [:serve "LeBron James"->"Heat"@0] | | [:like "Dirk Nowitzki"->"Dwyane Wade"@0] | | | | | - | | | [:like "Dejounte Murray"->"Marco Belinelli"@0] | | [:serve "LeBron James"->"Lakers"@0] | | [:serve "Kyrie Irving"->"Cavaliers"@0] | | | | | - | | | [:like "Marco Belinelli"->"Danny Green"@0] | | [:serve "LeBron James"->"Cavaliers"@1] | | [:serve "Kyrie Irving"->"Celtics"@0] | | | | | - | | | [:serve "Dejounte Murray"->"Spurs"@0] | | [:like "Carmelo Anthony"->"LeBron James"@0] | | | | | | | - | | | [:like "Dejounte Murray"->"Chris Paul"@0] | | [:like "Chris Paul"->"LeBron James"@0] | | | | | | | - | | | [:like "Dejounte Murray"->"Danny Green"@0] | | [:like "Dwyane Wade"->"LeBron James"@0] | | | | | | | - | | | [:like "Dejounte Murray"->"James Harden"@0] | | [:like "Kyrie Irving"->"LeBron James"@0] | | | | | | | - | | | [:like "Dejounte Murray"->"Kevin Durant"@0] | | [:like "LeBron James"->"Ray Allen"@0] | | | | | | | - | | | [:like "Dejounte Murray"->"Kyle Anderson"@0] | | [:serve "Chris Paul"->"Clippers"@0] | | | | | | | - | | | [:like "Dejounte Murray"->"LeBron James"@0] | | [:serve "Chris Paul"->"Hornets"@0] | | | | | | | - | | | [:like "Dejounte Murray"->"Russell Westbrook"@0] | | [:serve "Chris Paul"->"Rockets"@0] | | | | | | | - | | | | | [:like "Blake Griffin"->"Chris Paul"@0] | | | | | | | - | | | | | [:like "Carmelo Anthony"->"Chris Paul"@0] | | | | | | | - | | | | | [:like "Dwyane Wade"->"Chris Paul"@0] | | | | | | | - | | | | | [:like "Chris Paul"->"Carmelo Anthony"@0] | | | | | | | - | | | | | [:like "Chris Paul"->"Dwyane Wade"@0] | | | | | | | - Then the result should be, in any order, with relax comparison: - | _vertices | _edges | - | [("Tony Parker")] | <[edge1]> | - | <[vertex2]> | <[edge2]> | - | <[vertex3]> | <[edge3]> | - | <[vertex4]> | <[edge4]> | - | <[vertex5]> | <[edge5]> | - | <[vertex6]> | <[edge6]> | - When executing query: - """ - GET SUBGRAPH 4 steps from 'Tim Duncan' BOTH like - """ - Then define some list variables: - | edge1 | vertex2 | edge2 | vertex3 | edge3 | vertex4 | edge4 | vertex5 | - | [:like "Aron Baynes"->"Tim Duncan"@0] | ("LaMarcus Aldridge") | [:like "Damian Lillard"->"LaMarcus Aldridge"@0] | ("Kevin Durant") | [:like "Luka Doncic"->"James Harden"@0] | ("Tracy McGrady") | [:like "Grant Hill"->"Tracy McGrady"@0] | ("Kobe Bryant") | - | [:like "Boris Diaw"->"Tim Duncan"@0] | ("Boris Diaw") | [:like "Rudy Gay"->"LaMarcus Aldridge"@0] | ("James Harden") | [:like "Russell Westbrook"->"James Harden"@0] | ("Carmelo Anthony") | [:like "Vince Carter"->"Tracy McGrady"@0] | ("Dirk Nowitzki") | - | [:like "Danny Green"->"Tim Duncan"@0] | ("Dejounte Murray") | [:like "Tony Parker"->"LaMarcus Aldridge"@0] | ("Chris Paul") | [:like "James Harden"->"Russell Westbrook"@0] | ("Luka Doncic") | [:like "Tracy McGrady"->"Grant Hill"@0] | ("Grant Hill") | - | [:like "Dejounte Murray"->"Tim Duncan"@0] | ("Danny Green") | [:like "LaMarcus Aldridge"->"Tony Parker"@0] | ("Damian Lillard") | [:like "Blake Griffin"->"Chris Paul"@0] | ("Blake Griffin") | [:like "Tracy McGrady"->"Kobe Bryant"@0] | ("Vince Carter") | - | [:like "LaMarcus Aldridge"->"Tim Duncan"@0] | ("Marco Belinelli") | [:like "Boris Diaw"->"Tony Parker"@0] | ("Rudy Gay") | [:like "Carmelo Anthony"->"Chris Paul"@0] | ("Dwyane Wade") | [:like "Dwyane Wade"->"Carmelo Anthony"@0] | ("Rajon Rondo") | - | [:like "Manu Ginobili"->"Tim Duncan"@0] | ("Aron Baynes") | [:like "Dejounte Murray"->"Chris Paul"@0] | ("Kyle Anderson") | [:like "Dwyane Wade"->"Chris Paul"@0] | ("Kyrie Irving") | [:like "Carmelo Anthony"->"Dwyane Wade"@0] | ("Kristaps Porzingis") | - | [:like "Marco Belinelli"->"Tim Duncan"@0] | ("Manu Ginobili") | [:like "Dejounte Murray"->"Danny Green"@0] | ("LeBron James") | [:like "Chris Paul"->"Carmelo Anthony"@0] | ("Ray Allen") | [:like "Kristaps Porzingis"->"Luka Doncic"@0] | | - | [:like "Shaquille O'Neal"->"Tim Duncan"@0] | ("Tiago Splitter") | [:like "Dejounte Murray"->"James Harden"@0] | ("Russell Westbrook") | [:like "Chris Paul"->"Dwyane Wade"@0] | ("Paul George") | [:like "Luka Doncic"->"Dirk Nowitzki"@0] | | - | [:like "Tiago Splitter"->"Tim Duncan"@0] | ("Shaquille O'Neal") | [:like "Dejounte Murray"->"Kevin Durant"@0] | ("Yao Ming") | [:like "Chris Paul"->"LeBron James"@0] | | [:like "Luka Doncic"->"Kristaps Porzingis"@0] | | - | [:like "Tony Parker"->"Tim Duncan"@0] | ("Tony Parker") | [:like "Dejounte Murray"->"Kyle Anderson"@0] | ("JaVale McGee") | [:like "Tracy McGrady"->"Rudy Gay"@0] | | [:like "Dirk Nowitzki"->"Dwyane Wade"@0] | | - | [:like "Tim Duncan"->"Manu Ginobili"@0] | | [:like "Dejounte Murray"->"LeBron James"@0] | | [:like "Carmelo Anthony"->"LeBron James"@0] | | [:like "Rajon Rondo"->"Ray Allen"@0] | | - | [:like "Tim Duncan"->"Tony Parker"@0] | | [:like "Dejounte Murray"->"Manu Ginobili"@0] | | [:like "Dwyane Wade"->"LeBron James"@0] | | [:like "Ray Allen"->"Rajon Rondo"@0] | | - | | | [:like "Dejounte Murray"->"Marco Belinelli"@0] | | [:like "Kyrie Irving"->"LeBron James"@0] | | | | - | | | [:like "Dejounte Murray"->"Russell Westbrook"@0] | | [:like "LeBron James"->"Ray Allen"@0] | | | | - | | | [:like "Dejounte Murray"->"Tony Parker"@0] | | [:like "Paul George"->"Russell Westbrook"@0] | | | | - | | | [:like "Marco Belinelli"->"Danny Green"@0] | | [:like "Russell Westbrook"->"Paul George"@0] | | | | - | | | [:like "Danny Green"->"LeBron James"@0] | | [:like "Yao Ming"->"Tracy McGrady"@0] | | | | - | | | [:like "Danny Green"->"Marco Belinelli"@0] | | | | | | - | | | [:like "Marco Belinelli"->"Tony Parker"@0] | | | | | | - | | | [:like "Tiago Splitter"->"Manu Ginobili"@0] | | | | | | - | | | [:like "Tony Parker"->"Manu Ginobili"@0] | | | | | | - | | | [:like "Yao Ming"->"Shaquille O'Neal"@0] | | | | | | - | | | [:like "Shaquille O'Neal"->"JaVale McGee"@0] | | | | | | - Then the result should be, in any order, with relax comparison: - | _vertices | _edges | - | [("Tim Duncan")] | <[edge1]> | - | <[vertex2]> | <[edge2]> | - | <[vertex3]> | <[edge3]> | - | <[vertex4]> | <[edge4]> | - | <[vertex5]> | [] | - Scenario: Get subgraph in a space which doesn't have edge schema Given an empty graph And create a space with following options: @@ -1581,9 +1052,9 @@ Feature: subgraph Then the execution should be successful When executing query: """ - GET SUBGRAPH 1 STEPS FROM "Tom" + GET SUBGRAPH 1 STEPS FROM "Tom" YIELD vertices as nodes, edges as relationships """ Then the result should be, in any order, with relax comparison: - | _vertices | _edges | - | [("Tom")] | [] | - | [] | [] | + | nodes | relationships | + | [("Tom")] | [] | + | [] | [] |