[NO-ISSUE][GRAPHIX] Adding a pure-rewrite version of Graphix.

Details:
- Users can create and delete managed graphs w/ CREATE GRAPH and DROP
  GRAPH. These will raise an error if a user tries to drop one of their
  dependents (and vice-versa).
- Users can introduce a set of variable bindings before UNNEST and JOIN
  clauses using the MATCH clause, which will iterate over all "matched"
  graph patterns. The MATCH clause also includes a "LEFT" variant.
- Graph edge patterns can be formulated as path finding queries, where a
  user can specify the range of hops between the two vertices of the edge
  pattern.
- Labels and directions can be inferred using labels and directions of
  vertices within the same FROM-GRAPH-CLAUSE. A naive evaluation
  strategy is used here (until we reach a fixed point).
- The initial set of Graphix functions are included.

Change-Id: I50f032ea4acc5ba46b86ae1052590a3e945c2497
Reviewed-on: https://asterix-gerrit.ics.uci.edu/c/asterixdb-graph/+/16103
Tested-by: Jenkins <jenkins@fulliautomatix.ics.uci.edu>
Reviewed-by: Glenn Galvizo <ggalvizo@uci.edu>
diff --git a/asterix-graphix/src/test/resources/metadata/results/graphix/yelp-example/yelp-example.1.adm b/asterix-graphix/src/test/resources/metadata/results/graphix/yelp-example/yelp-example.1.adm
deleted file mode 100644
index 31c330c..0000000
--- a/asterix-graphix/src/test/resources/metadata/results/graphix/yelp-example/yelp-example.1.adm
+++ /dev/null
@@ -1,2 +0,0 @@
-{ "DataverseName": "Yelp", "GraphName": "YelpGraph_1", "Dependencies": [ [ [ "Yelp_A", "Reviews" ], [ "Yelp_B", "Users" ], [ "Yelp_B", "Friends" ] ], [ [ "Yelp_B", "Yelpers" ] ], [ [ "Yelp_A", "RelevantBusinesses", "0" ] ] ], "Vertices": [ { "Label": "User", "PrimaryKey": [ [ "user_id" ] ], "Definitions": [ "Yelp_B.Yelpers" ] }, { "Label": "Review", "PrimaryKey": [ [ "review_id" ] ], "Definitions": [ "( FROM    Yelp_A.Reviews R\n                       SELECT  VALUE R )" ] }, { "Label": "Business", "PrimaryKey": [ [ "business_id" ] ], "Definitions": [ "( FROM    Yelp_A.RelevantBusinesses() B\n                       SELECT  VALUE B )" ] } ], "Edges": [ { "Label": "FRIENDS_WITH", "DestinationLabel": "User", "SourceLabel": "User", "PrimaryKey": [ [ "user_id" ], [ "friend" ] ], "DestinationKey": [ [ "friend" ] ], "SourceKey": [ [ "user_id" ] ], "Definitions": [ "( FROM    Yelp_B.Users U\n                       UNNEST  U.friends F\n                       SELECT  U.user_id, F AS friend )", "Yelp_B.Friends" ] }, { "Label": "MADE_BY", "DestinationLabel": "User", "SourceLabel": "Review", "PrimaryKey": [ [ "review_id" ] ], "DestinationKey": [ [ "user_id" ] ], "SourceKey": [ [ "review_id" ] ], "Definitions": [ "" ] }, { "Label": "ABOUT", "DestinationLabel": "Business", "SourceLabel": "Review", "PrimaryKey": [ [ "review_id" ] ], "DestinationKey": [ [ "business_id" ] ], "SourceKey": [ [ "review_id" ] ], "Definitions": [ "" ] } ] }
-{ "DataverseName": "Yelp", "GraphName": "YelpGraph_2", "Dependencies": [ [ [ "Yelp_A", "Reviews" ] ], [  ], [ [ "Yelp_A", "RelevantBusinesses", "0" ] ] ], "Vertices": [ { "Label": "Review", "PrimaryKey": [ [ "review_id" ] ], "Definitions": [ "( FROM    Yelp_A.Reviews R\n                       SELECT  VALUE R )" ] }, { "Label": "Business", "PrimaryKey": [ [ "business_id" ] ], "Definitions": [ "( FROM    Yelp_A.RelevantBusinesses() B\n                       SELECT  VALUE B )" ] } ], "Edges": [ { "Label": "ABOUT", "DestinationLabel": "Business", "SourceLabel": "Review", "PrimaryKey": [ [ "review_id" ] ], "DestinationKey": [ [ "business_id" ] ], "SourceKey": [ [ "review_id" ] ], "Definitions": [ "" ] } ] }
\ No newline at end of file
diff --git a/asterix-graphix/src/test/resources/metadata/results/graphix/yelp-example/yelp-example.2.adm b/asterix-graphix/src/test/resources/metadata/results/graphix/yelp-example/yelp-example.2.adm
deleted file mode 100644
index a749b72..0000000
--- a/asterix-graphix/src/test/resources/metadata/results/graphix/yelp-example/yelp-example.2.adm
+++ /dev/null
@@ -1 +0,0 @@
-{ "DataverseName": "Yelp", "GraphName": "YelpGraph_2", "Dependencies": [ [ [ "Yelp_A", "Reviews" ] ], [  ], [ [ "Yelp_A", "RelevantBusinesses", "0" ] ] ], "Vertices": [ { "Label": "Review", "PrimaryKey": [ [ "review_id" ] ], "Definitions": [ "( FROM    Yelp_A.Reviews R\n                       SELECT  VALUE R )" ] }, { "Label": "Business", "PrimaryKey": [ [ "business_id" ] ], "Definitions": [ "( FROM    Yelp_A.RelevantBusinesses() B\n                       SELECT  VALUE B )" ] } ], "Edges": [ { "Label": "ABOUT", "DestinationLabel": "Business", "SourceLabel": "Review", "PrimaryKey": [ [ "review_id" ] ], "DestinationKey": [ [ "business_id" ] ], "SourceKey": [ [ "review_id" ] ], "Definitions": [ "" ] } ] }
diff --git a/asterix-graphix/src/test/resources/metadata/results/graphix/yelp-example/yelp-example.3.adm b/asterix-graphix/src/test/resources/metadata/results/graphix/yelp-example/yelp-example.3.adm
deleted file mode 100644
index 80af6cb..0000000
--- a/asterix-graphix/src/test/resources/metadata/results/graphix/yelp-example/yelp-example.3.adm
+++ /dev/null
@@ -1 +0,0 @@
-{ "DataverseName": "Yelp", "GraphName": "YelpGraph_2", "Dependencies": [ [ [ "Yelp_A", "Reviews" ], [ "Yelp_B", "Users" ], [ "Yelp_B", "Friends" ] ], [ [ "Yelp_B", "Yelpers" ] ], [ [ "Yelp_A", "RelevantBusinesses", "0" ] ] ], "Vertices": [ { "Label": "User", "PrimaryKey": [ [ "user_id" ] ], "Definitions": [ "Yelp_B.Yelpers" ] }, { "Label": "Review", "PrimaryKey": [ [ "review_id" ] ], "Definitions": [ "( FROM    Yelp_A.Reviews R\n                               SELECT  VALUE R )" ] }, { "Label": "Business", "PrimaryKey": [ [ "business_id" ] ], "Definitions": [ "( FROM    Yelp_A.RelevantBusinesses() B\n                               SELECT  VALUE B )" ] } ], "Edges": [ { "Label": "FRIENDS_WITH", "DestinationLabel": "User", "SourceLabel": "User", "PrimaryKey": [ [ "user_id" ], [ "friend" ] ], "DestinationKey": [ [ "friend" ] ], "SourceKey": [ [ "user_id" ] ], "Definitions": [ "( FROM    Yelp_B.Users U\n                               UNNEST  U.friends F\n                               SELECT  U.user_id, F AS friend )", "Yelp_B.Friends" ] }, { "Label": "MADE_BY", "DestinationLabel": "User", "SourceLabel": "Review", "PrimaryKey": [ [ "review_id" ] ], "DestinationKey": [ [ "user_id" ] ], "SourceKey": [ [ "review_id" ] ], "Definitions": [ "" ] }, { "Label": "ABOUT", "DestinationLabel": "Business", "SourceLabel": "Review", "PrimaryKey": [ [ "review_id" ] ], "DestinationKey": [ [ "business_id" ] ], "SourceKey": [ [ "review_id" ] ], "Definitions": [ "" ] } ] }
diff --git a/asterix-graphix/src/test/resources/metadata/results/graphix/yelp-example/yelp-example.4.adm b/asterix-graphix/src/test/resources/metadata/results/graphix/yelp-example/yelp-example.4.adm
deleted file mode 100644
index c1a0ea2..0000000
--- a/asterix-graphix/src/test/resources/metadata/results/graphix/yelp-example/yelp-example.4.adm
+++ /dev/null
@@ -1 +0,0 @@
-{ "count": 0 }
\ No newline at end of file
diff --git a/asterix-graphix/src/test/resources/metadata/queries/graphix/yelp-example/yelp-example.1.ddl.sqlpp b/asterix-graphix/src/test/resources/metadatats/queries/graphix/create-drop-graph/create-drop-graph.1.ddl.sqlpp
similarity index 78%
rename from asterix-graphix/src/test/resources/metadata/queries/graphix/yelp-example/yelp-example.1.ddl.sqlpp
rename to asterix-graphix/src/test/resources/metadatats/queries/graphix/create-drop-graph/create-drop-graph.1.ddl.sqlpp
index 0f4761d..db8589e 100644
--- a/asterix-graphix/src/test/resources/metadata/queries/graphix/yelp-example/yelp-example.1.ddl.sqlpp
+++ b/asterix-graphix/src/test/resources/metadatats/queries/graphix/create-drop-graph/create-drop-graph.1.ddl.sqlpp
@@ -40,9 +40,9 @@
 CREATE DATASET    Users (GenericType)
 PRIMARY KEY       _id AUTOGENERATED;
 CREATE FUNCTION   RelevantBusinesses()
-                  { FROM Businesses B
-                    WHERE B.stars > 3.5
-                    SELECT B.* };
+                  { FROM    Businesses B
+                    WHERE   B.stars > 3.5
+                    SELECT  B.* };
 
 USE               Yelp_B;
 CREATE TYPE       GenericType
@@ -75,21 +75,26 @@
                   AS ( FROM    Yelp_A.RelevantBusinesses() B
                        SELECT  VALUE B ),
 EDGE              (:User)-[:FRIENDS_WITH]->(:User)
-                  PRIMARY KEY (user_id, friend)
                   SOURCE KEY (user_id)
                   DESTINATION KEY (friend)
                   AS ( FROM    Yelp_B.Users U
                        UNNEST  U.friends F
                        SELECT  U.user_id, F AS friend ),
 EDGE              (:User)-[:FRIENDS_WITH]->(:User)
-                          PRIMARY KEY (user_id, friend)
-                          SOURCE KEY (user_id)
-                          DESTINATION KEY (friend)
-                          AS Yelp_B.Friends,
+                  SOURCE KEY (user_id)
+                  DESTINATION KEY (friend)
+                  AS ( FROM    Yelp_B.Friends F
+                       SELECT  F.* ),
 EDGE              (:Review)-[:MADE_BY]->(:User)
-                  DESTINATION KEY (user_id),
+                  SOURCE KEY (review_id)
+                  DESTINATION KEY (user_id)
+                  AS ( FROM    Yelp_A.Reviews R
+                       SELECT  R.review_id, R.user_id ),
 EDGE              (:Review)-[:ABOUT]->(:Business)
-                  DESTINATION KEY (business_id);
+                  SOURCE KEY (review_id)
+                  DESTINATION KEY (business_id)
+                  AS ( FROM    Yelp_A.Reviews R
+                       SELECT  R.review_id, R.business_id );
 
 CREATE GRAPH      YelpGraph_2 IF NOT EXISTS AS
 VERTEX            (:Review)
@@ -101,7 +106,10 @@
                   AS ( FROM    Yelp_A.RelevantBusinesses() B
                        SELECT  VALUE B ),
 EDGE              (:Review)-[:ABOUT]->(:Business)
-                  DESTINATION KEY (business_id);
+                  SOURCE KEY (review_id)
+                  DESTINATION KEY (business_id)
+                  AS ( FROM    Yelp_A.Reviews R
+                       SELECT  VALUE R );
 CREATE GRAPH      YelpGraph_2 IF NOT EXISTS AS
 VERTEX            (:Review)
                   PRIMARY KEY (review_id)
@@ -112,4 +120,7 @@
                   AS ( FROM    Yelp_A.RelevantBusinesses() B
                        SELECT  VALUE B ),
 EDGE              (:Review)-[:ABOUT]->(:Business)
-                  DESTINATION KEY (business_id);
+                  SOURCE KEY (review_id)
+                  DESTINATION KEY (business_id)
+                  AS ( FROM    Yelp_A.Reviews R
+                       SELECT  VALUE R );
\ No newline at end of file
diff --git a/asterix-graphix/src/test/resources/metadata/queries/graphix/yelp-example/yelp-example.2.query.sqlpp b/asterix-graphix/src/test/resources/metadatats/queries/graphix/create-drop-graph/create-drop-graph.2.query.sqlpp
similarity index 64%
copy from asterix-graphix/src/test/resources/metadata/queries/graphix/yelp-example/yelp-example.2.query.sqlpp
copy to asterix-graphix/src/test/resources/metadatats/queries/graphix/create-drop-graph/create-drop-graph.2.query.sqlpp
index b8151af..ca71c1e 100644
--- a/asterix-graphix/src/test/resources/metadata/queries/graphix/yelp-example/yelp-example.2.query.sqlpp
+++ b/asterix-graphix/src/test/resources/metadatats/queries/graphix/create-drop-graph/create-drop-graph.2.query.sqlpp
@@ -17,6 +17,14 @@
  * under the License.
  */
 
-FROM      `Metadata`.`Graph` G
-SELECT    G.DataverseName, G.GraphName, G.Dependencies, G.Vertices, G.Edges
-ORDER BY  G.DataverseName, G.GraphName;
+FROM      `Metadata`.`Graph` G,
+          `Metadata`.`GraphDependency` GD,
+          GD.Dependencies D
+WHERE     G.DataverseName = GD.DataverseName AND
+          G.GraphName = GD.EntityName AND
+          GD.Kind = "GRAPH"
+SELECT    G.DataverseName, G.GraphName, G.Vertices, G.Edges,
+          D.DataverseName AS DependentDataverse,
+          D.EntityName AS DependentName,
+          D.Kind AS DependentKind
+ORDER BY  G.DataverseName, G.GraphName, D;
\ No newline at end of file
diff --git a/asterix-graphix/src/test/resources/metadata/queries/graphix/yelp-example/yelp-example.3.ddl.sqlpp b/asterix-graphix/src/test/resources/metadatats/queries/graphix/create-drop-graph/create-drop-graph.3.ddl.sqlpp
similarity index 100%
rename from asterix-graphix/src/test/resources/metadata/queries/graphix/yelp-example/yelp-example.3.ddl.sqlpp
rename to asterix-graphix/src/test/resources/metadatats/queries/graphix/create-drop-graph/create-drop-graph.3.ddl.sqlpp
diff --git a/asterix-graphix/src/test/resources/metadata/queries/graphix/yelp-example/yelp-example.4.query.sqlpp b/asterix-graphix/src/test/resources/metadatats/queries/graphix/create-drop-graph/create-drop-graph.4.query.sqlpp
similarity index 64%
rename from asterix-graphix/src/test/resources/metadata/queries/graphix/yelp-example/yelp-example.4.query.sqlpp
rename to asterix-graphix/src/test/resources/metadatats/queries/graphix/create-drop-graph/create-drop-graph.4.query.sqlpp
index b8151af..ca71c1e 100644
--- a/asterix-graphix/src/test/resources/metadata/queries/graphix/yelp-example/yelp-example.4.query.sqlpp
+++ b/asterix-graphix/src/test/resources/metadatats/queries/graphix/create-drop-graph/create-drop-graph.4.query.sqlpp
@@ -17,6 +17,14 @@
  * under the License.
  */
 
-FROM      `Metadata`.`Graph` G
-SELECT    G.DataverseName, G.GraphName, G.Dependencies, G.Vertices, G.Edges
-ORDER BY  G.DataverseName, G.GraphName;
+FROM      `Metadata`.`Graph` G,
+          `Metadata`.`GraphDependency` GD,
+          GD.Dependencies D
+WHERE     G.DataverseName = GD.DataverseName AND
+          G.GraphName = GD.EntityName AND
+          GD.Kind = "GRAPH"
+SELECT    G.DataverseName, G.GraphName, G.Vertices, G.Edges,
+          D.DataverseName AS DependentDataverse,
+          D.EntityName AS DependentName,
+          D.Kind AS DependentKind
+ORDER BY  G.DataverseName, G.GraphName, D;
\ No newline at end of file
diff --git a/asterix-graphix/src/test/resources/metadata/queries/graphix/yelp-example/yelp-example.5.ddl.sqlpp b/asterix-graphix/src/test/resources/metadatats/queries/graphix/create-drop-graph/create-drop-graph.5.ddl.sqlpp
similarity index 74%
rename from asterix-graphix/src/test/resources/metadata/queries/graphix/yelp-example/yelp-example.5.ddl.sqlpp
rename to asterix-graphix/src/test/resources/metadatats/queries/graphix/create-drop-graph/create-drop-graph.5.ddl.sqlpp
index 586a718..0835454 100644
--- a/asterix-graphix/src/test/resources/metadata/queries/graphix/yelp-example/yelp-example.5.ddl.sqlpp
+++ b/asterix-graphix/src/test/resources/metadatats/queries/graphix/create-drop-graph/create-drop-graph.5.ddl.sqlpp
@@ -30,18 +30,23 @@
                           AS ( FROM    Yelp_A.RelevantBusinesses() B
                                SELECT  VALUE B ),
 EDGE                      (:User)-[:FRIENDS_WITH]->(:User)
-                          PRIMARY KEY (user_id, friend)
                           SOURCE KEY (user_id)
                           DESTINATION KEY (friend)
                           AS ( FROM    Yelp_B.Users U
                                UNNEST  U.friends F
                                SELECT  U.user_id, F AS friend ),
 EDGE                      (:User)-[:FRIENDS_WITH]->(:User)
-                                  PRIMARY KEY (user_id, friend)
-                                  SOURCE KEY (user_id)
-                                  DESTINATION KEY (friend)
-                                  AS Yelp_B.Friends,
+                          SOURCE KEY (user_id)
+                          DESTINATION KEY (friend)
+                          AS ( FROM    Yelp_B.Friends F
+                               SELECT  F.* ),
 EDGE                      (:Review)-[:MADE_BY]->(:User)
-                          DESTINATION KEY (user_id),
+                          SOURCE KEY (review_id)
+                          DESTINATION KEY (user_id)
+                          AS ( FROM    Yelp_A.Reviews R
+                               SELECT  VALUE R ),
 EDGE                      (:Review)-[:ABOUT]->(:Business)
-                          DESTINATION KEY (business_id);
+                          SOURCE KEY (review_id)
+                          DESTINATION KEY (business_id)
+                          AS ( FROM    Yelp_A.Reviews R
+                               SELECT  VALUE R );
diff --git a/asterix-graphix/src/test/resources/metadata/queries/graphix/yelp-example/yelp-example.6.query.sqlpp b/asterix-graphix/src/test/resources/metadatats/queries/graphix/create-drop-graph/create-drop-graph.6.query.sqlpp
similarity index 64%
rename from asterix-graphix/src/test/resources/metadata/queries/graphix/yelp-example/yelp-example.6.query.sqlpp
rename to asterix-graphix/src/test/resources/metadatats/queries/graphix/create-drop-graph/create-drop-graph.6.query.sqlpp
index b8151af..ca71c1e 100644
--- a/asterix-graphix/src/test/resources/metadata/queries/graphix/yelp-example/yelp-example.6.query.sqlpp
+++ b/asterix-graphix/src/test/resources/metadatats/queries/graphix/create-drop-graph/create-drop-graph.6.query.sqlpp
@@ -17,6 +17,14 @@
  * under the License.
  */
 
-FROM      `Metadata`.`Graph` G
-SELECT    G.DataverseName, G.GraphName, G.Dependencies, G.Vertices, G.Edges
-ORDER BY  G.DataverseName, G.GraphName;
+FROM      `Metadata`.`Graph` G,
+          `Metadata`.`GraphDependency` GD,
+          GD.Dependencies D
+WHERE     G.DataverseName = GD.DataverseName AND
+          G.GraphName = GD.EntityName AND
+          GD.Kind = "GRAPH"
+SELECT    G.DataverseName, G.GraphName, G.Vertices, G.Edges,
+          D.DataverseName AS DependentDataverse,
+          D.EntityName AS DependentName,
+          D.Kind AS DependentKind
+ORDER BY  G.DataverseName, G.GraphName, D;
\ No newline at end of file
diff --git a/asterix-graphix/src/test/resources/metadata/queries/graphix/yelp-example/yelp-example.7.ddl.sqlpp b/asterix-graphix/src/test/resources/metadatats/queries/graphix/create-drop-graph/create-drop-graph.7.ddl.sqlpp
similarity index 100%
rename from asterix-graphix/src/test/resources/metadata/queries/graphix/yelp-example/yelp-example.7.ddl.sqlpp
rename to asterix-graphix/src/test/resources/metadatats/queries/graphix/create-drop-graph/create-drop-graph.7.ddl.sqlpp
diff --git a/asterix-graphix/src/test/resources/metadata/queries/graphix/yelp-example/yelp-example.2.query.sqlpp b/asterix-graphix/src/test/resources/metadatats/queries/graphix/create-drop-graph/create-drop-graph.8.query.sqlpp
similarity index 68%
copy from asterix-graphix/src/test/resources/metadata/queries/graphix/yelp-example/yelp-example.2.query.sqlpp
copy to asterix-graphix/src/test/resources/metadatats/queries/graphix/create-drop-graph/create-drop-graph.8.query.sqlpp
index b8151af..c238c7c 100644
--- a/asterix-graphix/src/test/resources/metadata/queries/graphix/yelp-example/yelp-example.2.query.sqlpp
+++ b/asterix-graphix/src/test/resources/metadatats/queries/graphix/create-drop-graph/create-drop-graph.8.query.sqlpp
@@ -17,6 +17,15 @@
  * under the License.
  */
 
-FROM      `Metadata`.`Graph` G
-SELECT    G.DataverseName, G.GraphName, G.Dependencies, G.Vertices, G.Edges
-ORDER BY  G.DataverseName, G.GraphName;
+SELECT VALUE {
+    "graphCount": (
+        FROM    `Metadata`.`Graph` G
+        WHERE   G.DataverseName IN [ "Yelp", "Yelp_A", "Yelp_B" ]
+        SELECT  VALUE COUNT(*)
+    )[0],
+    "dependencyCount": (
+        FROM    `Metadata`.`GraphDependency` GD
+        WHERE   GD.DataverseName IN [ "Yelp", "Yelp_A", "Yelp_B" ]
+        SELECT  VALUE COUNT(*)
+    )[0]
+};
diff --git a/asterix-graphix/src/test/resources/metadatats/queries/graphix/on-graph-dependency/on-graph-dependency.1.ddl.sqlpp b/asterix-graphix/src/test/resources/metadatats/queries/graphix/on-graph-dependency/on-graph-dependency.1.ddl.sqlpp
new file mode 100644
index 0000000..127319a
--- /dev/null
+++ b/asterix-graphix/src/test/resources/metadatats/queries/graphix/on-graph-dependency/on-graph-dependency.1.ddl.sqlpp
@@ -0,0 +1,66 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
+ *
+ *   http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied.  See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+
+DROP DATAVERSE    Yelp IF EXISTS;
+CREATE DATAVERSE  Yelp;
+USE               Yelp;
+
+CREATE TYPE       GenericType
+AS                { _id: uuid };
+CREATE DATASET    Users (GenericType)
+PRIMARY KEY       _id AUTOGENERATED;
+CREATE DATASET    Reviews (GenericType)
+PRIMARY KEY       _id AUTOGENERATED;
+
+CREATE GRAPH      YelpGraph AS
+VERTEX            (:User)
+                  PRIMARY KEY (user_id)
+                  AS Users,
+VERTEX            (:Review)
+                  PRIMARY KEY (review_id)
+                  AS Reviews,
+EDGE              (:User)<-[:MADE_BY]-(:Review)
+                  SOURCE KEY (review_id)
+                  DESTINATION KEY (user_id)
+                  AS ( FROM    Yelp.Reviews R
+                       SELECT  R.review_id, R.user_id );
+
+// Create a function, view, and another graph that depend on the graph above.
+CREATE FUNCTION   YelpGraphFunction ()
+                  { FROM GRAPH  YelpGraph
+                    MATCH       (u)-[]->(r)
+                    SELECT      u, r
+                    LIMIT       1 };
+CREATE VIEW       YelpGraphView AS
+                  FROM GRAPH  YelpGraph
+                  MATCH       (u:User)<-[:MADE_BY]-(:Review)
+                  SELECT      u.user_id
+                  LIMIT       1;
+CREATE GRAPH      YelpGraphGraph AS
+VERTEX            (:UsersWithReviews)
+                  PRIMARY KEY (user_id)
+                  AS ( FROM GRAPH  YelpGraph
+                       MATCH       (u:User)<-[:MADE_BY]-(:Review)
+                       SELECT      u ),
+EDGE              (:UsersWithReviews)-[:FRIENDS_WITH]->(:UsersWithReviews)
+                  SOURCE KEY (user_id)
+                  DESTINATION KEY (best_friend)
+                  AS ( FROM GRAPH  YelpGraph
+                       MATCH       (u:User)<-[:MADE_BY]-(Review)
+                       SELECT      u.user_id, u.best_friend );
diff --git a/asterix-graphix/src/test/resources/metadatats/queries/graphix/on-graph-dependency/on-graph-dependency.2.query.sqlpp b/asterix-graphix/src/test/resources/metadatats/queries/graphix/on-graph-dependency/on-graph-dependency.2.query.sqlpp
new file mode 100644
index 0000000..cef0add
--- /dev/null
+++ b/asterix-graphix/src/test/resources/metadatats/queries/graphix/on-graph-dependency/on-graph-dependency.2.query.sqlpp
@@ -0,0 +1,65 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
+ *
+ *   http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied.  See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+
+SELECT    VALUE {
+    "graph": (
+        FROM      `Metadata`.`Graph` G,
+                  `Metadata`.`GraphDependency` GD,
+                  GD.Dependencies D
+        WHERE     G.DataverseName = GD.DataverseName AND
+                  G.GraphName = GD.EntityName AND
+                  GD.DataverseName = "Yelp" AND
+                  GD.Kind = "GRAPH"
+        SELECT    G.DataverseName, G.GraphName,
+                  D.DataverseName AS DependentDataverse,
+                  D.EntityName AS DependentName,
+                  D.Kind AS DependentKind
+        ORDER BY  G.DataverseName, G.GraphName, D
+    ),
+    "function": (
+        FROM      `Metadata`.`Function` F,
+                  `Metadata`.`GraphDependency` GD,
+                  GD.Dependencies D
+        WHERE     F.DataverseName = GD.DataverseName AND
+                  F.Name = GD.EntityName AND
+                  F.Arity = GD.EntityDetail AND
+                  GD.DataverseName = "Yelp" AND
+                  GD.Kind = "FUNCTION"
+        SELECT    F.DataverseName, F.Name, F.Arity,
+                  D.DataverseName AS DependentDataverse,
+                  D.EntityName AS DependentName,
+                  D.Kind AS DependentKind
+        ORDER BY  F.DataverseName, F.Name, D
+    ),
+    "view": (
+        FROM      `Metadata`.`Dataset` DD,
+                  `Metadata`.`GraphDependency` GD,
+                  GD.Dependencies D
+        WHERE     DD.DataverseName = GD.DataverseName AND
+                  DD.DatasetName = GD.EntityName AND
+                  DD.DatasetType = "VIEW" AND
+                  GD.DataverseName = "Yelp" AND
+                  GD.Kind = "VIEW"
+        SELECT    DD.DataverseName, DD.DatasetName,
+                  D.DataverseName AS DependentDataverse,
+                  D.EntityName AS DependentName,
+                  D.Kind AS DependentKind
+        ORDER BY  DD.DataverseName, DD.DatasetName, D
+    )
+};
diff --git a/asterix-graphix/src/test/resources/metadata/queries/graphix/yelp-example/yelp-example.8.query.sqlpp b/asterix-graphix/src/test/resources/metadatats/queries/graphix/on-graph-dependency/on-graph-dependency.3.ddl.sqlpp
similarity index 86%
rename from asterix-graphix/src/test/resources/metadata/queries/graphix/yelp-example/yelp-example.8.query.sqlpp
rename to asterix-graphix/src/test/resources/metadatats/queries/graphix/on-graph-dependency/on-graph-dependency.3.ddl.sqlpp
index 9667fd6..df554f4 100644
--- a/asterix-graphix/src/test/resources/metadata/queries/graphix/yelp-example/yelp-example.8.query.sqlpp
+++ b/asterix-graphix/src/test/resources/metadatats/queries/graphix/on-graph-dependency/on-graph-dependency.3.ddl.sqlpp
@@ -17,6 +17,4 @@
  * under the License.
  */
 
-FROM    `Metadata`.`Graph` G
-WHERE   G.DataverseName IN [ "Yelp", "Yelp_A", "Yelp_B" ]
-SELECT  VALUE { "count": COUNT(*) };
+DROP DATAVERSE Yelp;
diff --git a/asterix-graphix/src/test/resources/metadata/queries/graphix/yelp-example/yelp-example.8.query.sqlpp b/asterix-graphix/src/test/resources/metadatats/queries/graphix/on-graph-dependency/on-graph-dependency.4.query.sqlpp
similarity index 86%
copy from asterix-graphix/src/test/resources/metadata/queries/graphix/yelp-example/yelp-example.8.query.sqlpp
copy to asterix-graphix/src/test/resources/metadatats/queries/graphix/on-graph-dependency/on-graph-dependency.4.query.sqlpp
index 9667fd6..bbb0b64 100644
--- a/asterix-graphix/src/test/resources/metadata/queries/graphix/yelp-example/yelp-example.8.query.sqlpp
+++ b/asterix-graphix/src/test/resources/metadatats/queries/graphix/on-graph-dependency/on-graph-dependency.4.query.sqlpp
@@ -17,6 +17,6 @@
  * under the License.
  */
 
-FROM    `Metadata`.`Graph` G
-WHERE   G.DataverseName IN [ "Yelp", "Yelp_A", "Yelp_B" ]
-SELECT  VALUE { "count": COUNT(*) };
+FROM    `Metadata`.`GraphDependency` GD
+WHERE   GD.DataverseName = "Yelp"
+SELECT  VALUE COUNT(*);
diff --git a/asterix-graphix/src/test/resources/metadatats/results/graphix/create-drop-graph/create-drop-graph.2.adm b/asterix-graphix/src/test/resources/metadatats/results/graphix/create-drop-graph/create-drop-graph.2.adm
new file mode 100644
index 0000000..2e8cfe1
--- /dev/null
+++ b/asterix-graphix/src/test/resources/metadatats/results/graphix/create-drop-graph/create-drop-graph.2.adm
@@ -0,0 +1,7 @@
+{ "DataverseName": "Yelp", "GraphName": "YelpGraph_1", "Vertices": [ { "Label": "User", "Definitions": [ { "PrimaryKey": [ [ "user_id" ] ], "Body": "Yelp_B.Yelpers" } ] }, { "Label": "Review", "Definitions": [ { "PrimaryKey": [ [ "review_id" ] ], "Body": "FROM    Yelp_A.Reviews R\n                       SELECT  VALUE R" } ] }, { "Label": "Business", "Definitions": [ { "PrimaryKey": [ [ "business_id" ] ], "Body": "FROM    Yelp_A.RelevantBusinesses() B\n                       SELECT  VALUE B" } ] } ], "Edges": [ { "Label": "FRIENDS_WITH", "DestinationLabel": "User", "SourceLabel": "User", "Definitions": [ { "SourceKey": [ [ "user_id" ] ], "DestinationKey": [ [ "friend" ] ], "Body": "FROM    Yelp_B.Users U\n                       UNNEST  U.friends F\n                       SELECT  U.user_id, F AS friend" }, { "SourceKey": [ [ "user_id" ] ], "DestinationKey": [ [ "friend" ] ], "Body": "FROM    Yelp_B.Friends F\n                       SELECT  F.*" } ] }, { "Label": "MADE_BY", "DestinationLabel": "User", "SourceLabel": "Review", "Definitions": [ { "SourceKey": [ [ "review_id" ] ], "DestinationKey": [ [ "user_id" ] ], "Body": "FROM    Yelp_A.Reviews R\n                       SELECT  R.review_id, R.user_id" } ] }, { "Label": "ABOUT", "DestinationLabel": "Business", "SourceLabel": "Review", "Definitions": [ { "SourceKey": [ [ "review_id" ] ], "DestinationKey": [ [ "business_id" ] ], "Body": "FROM    Yelp_A.Reviews R\n                       SELECT  R.review_id, R.business_id" } ] } ], "DependentDataverse": "Yelp_A", "DependentName": "RelevantBusinesses", "DependentKind": "FUNCTION" }
+{ "DataverseName": "Yelp", "GraphName": "YelpGraph_1", "Vertices": [ { "Label": "User", "Definitions": [ { "PrimaryKey": [ [ "user_id" ] ], "Body": "Yelp_B.Yelpers" } ] }, { "Label": "Review", "Definitions": [ { "PrimaryKey": [ [ "review_id" ] ], "Body": "FROM    Yelp_A.Reviews R\n                       SELECT  VALUE R" } ] }, { "Label": "Business", "Definitions": [ { "PrimaryKey": [ [ "business_id" ] ], "Body": "FROM    Yelp_A.RelevantBusinesses() B\n                       SELECT  VALUE B" } ] } ], "Edges": [ { "Label": "FRIENDS_WITH", "DestinationLabel": "User", "SourceLabel": "User", "Definitions": [ { "SourceKey": [ [ "user_id" ] ], "DestinationKey": [ [ "friend" ] ], "Body": "FROM    Yelp_B.Users U\n                       UNNEST  U.friends F\n                       SELECT  U.user_id, F AS friend" }, { "SourceKey": [ [ "user_id" ] ], "DestinationKey": [ [ "friend" ] ], "Body": "FROM    Yelp_B.Friends F\n                       SELECT  F.*" } ] }, { "Label": "MADE_BY", "DestinationLabel": "User", "SourceLabel": "Review", "Definitions": [ { "SourceKey": [ [ "review_id" ] ], "DestinationKey": [ [ "user_id" ] ], "Body": "FROM    Yelp_A.Reviews R\n                       SELECT  R.review_id, R.user_id" } ] }, { "Label": "ABOUT", "DestinationLabel": "Business", "SourceLabel": "Review", "Definitions": [ { "SourceKey": [ [ "review_id" ] ], "DestinationKey": [ [ "business_id" ] ], "Body": "FROM    Yelp_A.Reviews R\n                       SELECT  R.review_id, R.business_id" } ] } ], "DependentDataverse": "Yelp_A", "DependentName": "Reviews", "DependentKind": "DATASET" }
+{ "DataverseName": "Yelp", "GraphName": "YelpGraph_1", "Vertices": [ { "Label": "User", "Definitions": [ { "PrimaryKey": [ [ "user_id" ] ], "Body": "Yelp_B.Yelpers" } ] }, { "Label": "Review", "Definitions": [ { "PrimaryKey": [ [ "review_id" ] ], "Body": "FROM    Yelp_A.Reviews R\n                       SELECT  VALUE R" } ] }, { "Label": "Business", "Definitions": [ { "PrimaryKey": [ [ "business_id" ] ], "Body": "FROM    Yelp_A.RelevantBusinesses() B\n                       SELECT  VALUE B" } ] } ], "Edges": [ { "Label": "FRIENDS_WITH", "DestinationLabel": "User", "SourceLabel": "User", "Definitions": [ { "SourceKey": [ [ "user_id" ] ], "DestinationKey": [ [ "friend" ] ], "Body": "FROM    Yelp_B.Users U\n                       UNNEST  U.friends F\n                       SELECT  U.user_id, F AS friend" }, { "SourceKey": [ [ "user_id" ] ], "DestinationKey": [ [ "friend" ] ], "Body": "FROM    Yelp_B.Friends F\n                       SELECT  F.*" } ] }, { "Label": "MADE_BY", "DestinationLabel": "User", "SourceLabel": "Review", "Definitions": [ { "SourceKey": [ [ "review_id" ] ], "DestinationKey": [ [ "user_id" ] ], "Body": "FROM    Yelp_A.Reviews R\n                       SELECT  R.review_id, R.user_id" } ] }, { "Label": "ABOUT", "DestinationLabel": "Business", "SourceLabel": "Review", "Definitions": [ { "SourceKey": [ [ "review_id" ] ], "DestinationKey": [ [ "business_id" ] ], "Body": "FROM    Yelp_A.Reviews R\n                       SELECT  R.review_id, R.business_id" } ] } ], "DependentDataverse": "Yelp_B", "DependentName": "Friends", "DependentKind": "DATASET" }
+{ "DataverseName": "Yelp", "GraphName": "YelpGraph_1", "Vertices": [ { "Label": "User", "Definitions": [ { "PrimaryKey": [ [ "user_id" ] ], "Body": "Yelp_B.Yelpers" } ] }, { "Label": "Review", "Definitions": [ { "PrimaryKey": [ [ "review_id" ] ], "Body": "FROM    Yelp_A.Reviews R\n                       SELECT  VALUE R" } ] }, { "Label": "Business", "Definitions": [ { "PrimaryKey": [ [ "business_id" ] ], "Body": "FROM    Yelp_A.RelevantBusinesses() B\n                       SELECT  VALUE B" } ] } ], "Edges": [ { "Label": "FRIENDS_WITH", "DestinationLabel": "User", "SourceLabel": "User", "Definitions": [ { "SourceKey": [ [ "user_id" ] ], "DestinationKey": [ [ "friend" ] ], "Body": "FROM    Yelp_B.Users U\n                       UNNEST  U.friends F\n                       SELECT  U.user_id, F AS friend" }, { "SourceKey": [ [ "user_id" ] ], "DestinationKey": [ [ "friend" ] ], "Body": "FROM    Yelp_B.Friends F\n                       SELECT  F.*" } ] }, { "Label": "MADE_BY", "DestinationLabel": "User", "SourceLabel": "Review", "Definitions": [ { "SourceKey": [ [ "review_id" ] ], "DestinationKey": [ [ "user_id" ] ], "Body": "FROM    Yelp_A.Reviews R\n                       SELECT  R.review_id, R.user_id" } ] }, { "Label": "ABOUT", "DestinationLabel": "Business", "SourceLabel": "Review", "Definitions": [ { "SourceKey": [ [ "review_id" ] ], "DestinationKey": [ [ "business_id" ] ], "Body": "FROM    Yelp_A.Reviews R\n                       SELECT  R.review_id, R.business_id" } ] } ], "DependentDataverse": "Yelp_B", "DependentName": "Users", "DependentKind": "DATASET" }
+{ "DataverseName": "Yelp", "GraphName": "YelpGraph_1", "Vertices": [ { "Label": "User", "Definitions": [ { "PrimaryKey": [ [ "user_id" ] ], "Body": "Yelp_B.Yelpers" } ] }, { "Label": "Review", "Definitions": [ { "PrimaryKey": [ [ "review_id" ] ], "Body": "FROM    Yelp_A.Reviews R\n                       SELECT  VALUE R" } ] }, { "Label": "Business", "Definitions": [ { "PrimaryKey": [ [ "business_id" ] ], "Body": "FROM    Yelp_A.RelevantBusinesses() B\n                       SELECT  VALUE B" } ] } ], "Edges": [ { "Label": "FRIENDS_WITH", "DestinationLabel": "User", "SourceLabel": "User", "Definitions": [ { "SourceKey": [ [ "user_id" ] ], "DestinationKey": [ [ "friend" ] ], "Body": "FROM    Yelp_B.Users U\n                       UNNEST  U.friends F\n                       SELECT  U.user_id, F AS friend" }, { "SourceKey": [ [ "user_id" ] ], "DestinationKey": [ [ "friend" ] ], "Body": "FROM    Yelp_B.Friends F\n                       SELECT  F.*" } ] }, { "Label": "MADE_BY", "DestinationLabel": "User", "SourceLabel": "Review", "Definitions": [ { "SourceKey": [ [ "review_id" ] ], "DestinationKey": [ [ "user_id" ] ], "Body": "FROM    Yelp_A.Reviews R\n                       SELECT  R.review_id, R.user_id" } ] }, { "Label": "ABOUT", "DestinationLabel": "Business", "SourceLabel": "Review", "Definitions": [ { "SourceKey": [ [ "review_id" ] ], "DestinationKey": [ [ "business_id" ] ], "Body": "FROM    Yelp_A.Reviews R\n                       SELECT  R.review_id, R.business_id" } ] } ], "DependentDataverse": "Yelp_B", "DependentName": "Yelpers", "DependentKind": "SYNONYM" }
+{ "DataverseName": "Yelp", "GraphName": "YelpGraph_2", "Vertices": [ { "Label": "Review", "Definitions": [ { "PrimaryKey": [ [ "review_id" ] ], "Body": "FROM    Yelp_A.Reviews R\n                       SELECT  VALUE R" } ] }, { "Label": "Business", "Definitions": [ { "PrimaryKey": [ [ "business_id" ] ], "Body": "FROM    Yelp_A.RelevantBusinesses() B\n                       SELECT  VALUE B" } ] } ], "Edges": [ { "Label": "ABOUT", "DestinationLabel": "Business", "SourceLabel": "Review", "Definitions": [ { "SourceKey": [ [ "review_id" ] ], "DestinationKey": [ [ "business_id" ] ], "Body": "FROM    Yelp_A.Reviews R\n                       SELECT  VALUE R" } ] } ], "DependentDataverse": "Yelp_A", "DependentName": "RelevantBusinesses", "DependentKind": "FUNCTION" }
+{ "DataverseName": "Yelp", "GraphName": "YelpGraph_2", "Vertices": [ { "Label": "Review", "Definitions": [ { "PrimaryKey": [ [ "review_id" ] ], "Body": "FROM    Yelp_A.Reviews R\n                       SELECT  VALUE R" } ] }, { "Label": "Business", "Definitions": [ { "PrimaryKey": [ [ "business_id" ] ], "Body": "FROM    Yelp_A.RelevantBusinesses() B\n                       SELECT  VALUE B" } ] } ], "Edges": [ { "Label": "ABOUT", "DestinationLabel": "Business", "SourceLabel": "Review", "Definitions": [ { "SourceKey": [ [ "review_id" ] ], "DestinationKey": [ [ "business_id" ] ], "Body": "FROM    Yelp_A.Reviews R\n                       SELECT  VALUE R" } ] } ], "DependentDataverse": "Yelp_A", "DependentName": "Reviews", "DependentKind": "DATASET" }
\ No newline at end of file
diff --git a/asterix-graphix/src/test/resources/metadatats/results/graphix/create-drop-graph/create-drop-graph.4.adm b/asterix-graphix/src/test/resources/metadatats/results/graphix/create-drop-graph/create-drop-graph.4.adm
new file mode 100644
index 0000000..2f07e94
--- /dev/null
+++ b/asterix-graphix/src/test/resources/metadatats/results/graphix/create-drop-graph/create-drop-graph.4.adm
@@ -0,0 +1,2 @@
+{ "DataverseName": "Yelp", "GraphName": "YelpGraph_2", "Vertices": [ { "Label": "Review", "Definitions": [ { "PrimaryKey": [ [ "review_id" ] ], "Body": "FROM    Yelp_A.Reviews R\n                       SELECT  VALUE R" } ] }, { "Label": "Business", "Definitions": [ { "PrimaryKey": [ [ "business_id" ] ], "Body": "FROM    Yelp_A.RelevantBusinesses() B\n                       SELECT  VALUE B" } ] } ], "Edges": [ { "Label": "ABOUT", "DestinationLabel": "Business", "SourceLabel": "Review", "Definitions": [ { "SourceKey": [ [ "review_id" ] ], "DestinationKey": [ [ "business_id" ] ], "Body": "FROM    Yelp_A.Reviews R\n                       SELECT  VALUE R" } ] } ], "DependentDataverse": "Yelp_A", "DependentName": "RelevantBusinesses", "DependentKind": "FUNCTION" }
+{ "DataverseName": "Yelp", "GraphName": "YelpGraph_2", "Vertices": [ { "Label": "Review", "Definitions": [ { "PrimaryKey": [ [ "review_id" ] ], "Body": "FROM    Yelp_A.Reviews R\n                       SELECT  VALUE R" } ] }, { "Label": "Business", "Definitions": [ { "PrimaryKey": [ [ "business_id" ] ], "Body": "FROM    Yelp_A.RelevantBusinesses() B\n                       SELECT  VALUE B" } ] } ], "Edges": [ { "Label": "ABOUT", "DestinationLabel": "Business", "SourceLabel": "Review", "Definitions": [ { "SourceKey": [ [ "review_id" ] ], "DestinationKey": [ [ "business_id" ] ], "Body": "FROM    Yelp_A.Reviews R\n                       SELECT  VALUE R" } ] } ], "DependentDataverse": "Yelp_A", "DependentName": "Reviews", "DependentKind": "DATASET" }
\ No newline at end of file
diff --git a/asterix-graphix/src/test/resources/metadatats/results/graphix/create-drop-graph/create-drop-graph.6.adm b/asterix-graphix/src/test/resources/metadatats/results/graphix/create-drop-graph/create-drop-graph.6.adm
new file mode 100644
index 0000000..f761b45
--- /dev/null
+++ b/asterix-graphix/src/test/resources/metadatats/results/graphix/create-drop-graph/create-drop-graph.6.adm
@@ -0,0 +1,5 @@
+{ "DataverseName": "Yelp", "GraphName": "YelpGraph_2", "Vertices": [ { "Label": "User", "Definitions": [ { "PrimaryKey": [ [ "user_id" ] ], "Body": "Yelp_B.Yelpers" } ] }, { "Label": "Review", "Definitions": [ { "PrimaryKey": [ [ "review_id" ] ], "Body": "FROM    Yelp_A.Reviews R\n                               SELECT  VALUE R" } ] }, { "Label": "Business", "Definitions": [ { "PrimaryKey": [ [ "business_id" ] ], "Body": "FROM    Yelp_A.RelevantBusinesses() B\n                               SELECT  VALUE B" } ] } ], "Edges": [ { "Label": "FRIENDS_WITH", "DestinationLabel": "User", "SourceLabel": "User", "Definitions": [ { "SourceKey": [ [ "user_id" ] ], "DestinationKey": [ [ "friend" ] ], "Body": "FROM    Yelp_B.Users U\n                               UNNEST  U.friends F\n                               SELECT  U.user_id, F AS friend" }, { "SourceKey": [ [ "user_id" ] ], "DestinationKey": [ [ "friend" ] ], "Body": "FROM    Yelp_B.Friends F\n                               SELECT  F.*" } ] }, { "Label": "MADE_BY", "DestinationLabel": "User", "SourceLabel": "Review", "Definitions": [ { "SourceKey": [ [ "review_id" ] ], "DestinationKey": [ [ "user_id" ] ], "Body": "FROM    Yelp_A.Reviews R\n                               SELECT  VALUE R" } ] }, { "Label": "ABOUT", "DestinationLabel": "Business", "SourceLabel": "Review", "Definitions": [ { "SourceKey": [ [ "review_id" ] ], "DestinationKey": [ [ "business_id" ] ], "Body": "FROM    Yelp_A.Reviews R\n                               SELECT  VALUE R" } ] } ], "DependentDataverse": "Yelp_A", "DependentName": "RelevantBusinesses", "DependentKind": "FUNCTION" }
+{ "DataverseName": "Yelp", "GraphName": "YelpGraph_2", "Vertices": [ { "Label": "User", "Definitions": [ { "PrimaryKey": [ [ "user_id" ] ], "Body": "Yelp_B.Yelpers" } ] }, { "Label": "Review", "Definitions": [ { "PrimaryKey": [ [ "review_id" ] ], "Body": "FROM    Yelp_A.Reviews R\n                               SELECT  VALUE R" } ] }, { "Label": "Business", "Definitions": [ { "PrimaryKey": [ [ "business_id" ] ], "Body": "FROM    Yelp_A.RelevantBusinesses() B\n                               SELECT  VALUE B" } ] } ], "Edges": [ { "Label": "FRIENDS_WITH", "DestinationLabel": "User", "SourceLabel": "User", "Definitions": [ { "SourceKey": [ [ "user_id" ] ], "DestinationKey": [ [ "friend" ] ], "Body": "FROM    Yelp_B.Users U\n                               UNNEST  U.friends F\n                               SELECT  U.user_id, F AS friend" }, { "SourceKey": [ [ "user_id" ] ], "DestinationKey": [ [ "friend" ] ], "Body": "FROM    Yelp_B.Friends F\n                               SELECT  F.*" } ] }, { "Label": "MADE_BY", "DestinationLabel": "User", "SourceLabel": "Review", "Definitions": [ { "SourceKey": [ [ "review_id" ] ], "DestinationKey": [ [ "user_id" ] ], "Body": "FROM    Yelp_A.Reviews R\n                               SELECT  VALUE R" } ] }, { "Label": "ABOUT", "DestinationLabel": "Business", "SourceLabel": "Review", "Definitions": [ { "SourceKey": [ [ "review_id" ] ], "DestinationKey": [ [ "business_id" ] ], "Body": "FROM    Yelp_A.Reviews R\n                               SELECT  VALUE R" } ] } ], "DependentDataverse": "Yelp_A", "DependentName": "Reviews", "DependentKind": "DATASET" }
+{ "DataverseName": "Yelp", "GraphName": "YelpGraph_2", "Vertices": [ { "Label": "User", "Definitions": [ { "PrimaryKey": [ [ "user_id" ] ], "Body": "Yelp_B.Yelpers" } ] }, { "Label": "Review", "Definitions": [ { "PrimaryKey": [ [ "review_id" ] ], "Body": "FROM    Yelp_A.Reviews R\n                               SELECT  VALUE R" } ] }, { "Label": "Business", "Definitions": [ { "PrimaryKey": [ [ "business_id" ] ], "Body": "FROM    Yelp_A.RelevantBusinesses() B\n                               SELECT  VALUE B" } ] } ], "Edges": [ { "Label": "FRIENDS_WITH", "DestinationLabel": "User", "SourceLabel": "User", "Definitions": [ { "SourceKey": [ [ "user_id" ] ], "DestinationKey": [ [ "friend" ] ], "Body": "FROM    Yelp_B.Users U\n                               UNNEST  U.friends F\n                               SELECT  U.user_id, F AS friend" }, { "SourceKey": [ [ "user_id" ] ], "DestinationKey": [ [ "friend" ] ], "Body": "FROM    Yelp_B.Friends F\n                               SELECT  F.*" } ] }, { "Label": "MADE_BY", "DestinationLabel": "User", "SourceLabel": "Review", "Definitions": [ { "SourceKey": [ [ "review_id" ] ], "DestinationKey": [ [ "user_id" ] ], "Body": "FROM    Yelp_A.Reviews R\n                               SELECT  VALUE R" } ] }, { "Label": "ABOUT", "DestinationLabel": "Business", "SourceLabel": "Review", "Definitions": [ { "SourceKey": [ [ "review_id" ] ], "DestinationKey": [ [ "business_id" ] ], "Body": "FROM    Yelp_A.Reviews R\n                               SELECT  VALUE R" } ] } ], "DependentDataverse": "Yelp_B", "DependentName": "Friends", "DependentKind": "DATASET" }
+{ "DataverseName": "Yelp", "GraphName": "YelpGraph_2", "Vertices": [ { "Label": "User", "Definitions": [ { "PrimaryKey": [ [ "user_id" ] ], "Body": "Yelp_B.Yelpers" } ] }, { "Label": "Review", "Definitions": [ { "PrimaryKey": [ [ "review_id" ] ], "Body": "FROM    Yelp_A.Reviews R\n                               SELECT  VALUE R" } ] }, { "Label": "Business", "Definitions": [ { "PrimaryKey": [ [ "business_id" ] ], "Body": "FROM    Yelp_A.RelevantBusinesses() B\n                               SELECT  VALUE B" } ] } ], "Edges": [ { "Label": "FRIENDS_WITH", "DestinationLabel": "User", "SourceLabel": "User", "Definitions": [ { "SourceKey": [ [ "user_id" ] ], "DestinationKey": [ [ "friend" ] ], "Body": "FROM    Yelp_B.Users U\n                               UNNEST  U.friends F\n                               SELECT  U.user_id, F AS friend" }, { "SourceKey": [ [ "user_id" ] ], "DestinationKey": [ [ "friend" ] ], "Body": "FROM    Yelp_B.Friends F\n                               SELECT  F.*" } ] }, { "Label": "MADE_BY", "DestinationLabel": "User", "SourceLabel": "Review", "Definitions": [ { "SourceKey": [ [ "review_id" ] ], "DestinationKey": [ [ "user_id" ] ], "Body": "FROM    Yelp_A.Reviews R\n                               SELECT  VALUE R" } ] }, { "Label": "ABOUT", "DestinationLabel": "Business", "SourceLabel": "Review", "Definitions": [ { "SourceKey": [ [ "review_id" ] ], "DestinationKey": [ [ "business_id" ] ], "Body": "FROM    Yelp_A.Reviews R\n                               SELECT  VALUE R" } ] } ], "DependentDataverse": "Yelp_B", "DependentName": "Users", "DependentKind": "DATASET" }
+{ "DataverseName": "Yelp", "GraphName": "YelpGraph_2", "Vertices": [ { "Label": "User", "Definitions": [ { "PrimaryKey": [ [ "user_id" ] ], "Body": "Yelp_B.Yelpers" } ] }, { "Label": "Review", "Definitions": [ { "PrimaryKey": [ [ "review_id" ] ], "Body": "FROM    Yelp_A.Reviews R\n                               SELECT  VALUE R" } ] }, { "Label": "Business", "Definitions": [ { "PrimaryKey": [ [ "business_id" ] ], "Body": "FROM    Yelp_A.RelevantBusinesses() B\n                               SELECT  VALUE B" } ] } ], "Edges": [ { "Label": "FRIENDS_WITH", "DestinationLabel": "User", "SourceLabel": "User", "Definitions": [ { "SourceKey": [ [ "user_id" ] ], "DestinationKey": [ [ "friend" ] ], "Body": "FROM    Yelp_B.Users U\n                               UNNEST  U.friends F\n                               SELECT  U.user_id, F AS friend" }, { "SourceKey": [ [ "user_id" ] ], "DestinationKey": [ [ "friend" ] ], "Body": "FROM    Yelp_B.Friends F\n                               SELECT  F.*" } ] }, { "Label": "MADE_BY", "DestinationLabel": "User", "SourceLabel": "Review", "Definitions": [ { "SourceKey": [ [ "review_id" ] ], "DestinationKey": [ [ "user_id" ] ], "Body": "FROM    Yelp_A.Reviews R\n                               SELECT  VALUE R" } ] }, { "Label": "ABOUT", "DestinationLabel": "Business", "SourceLabel": "Review", "Definitions": [ { "SourceKey": [ [ "review_id" ] ], "DestinationKey": [ [ "business_id" ] ], "Body": "FROM    Yelp_A.Reviews R\n                               SELECT  VALUE R" } ] } ], "DependentDataverse": "Yelp_B", "DependentName": "Yelpers", "DependentKind": "SYNONYM" }
\ No newline at end of file
diff --git a/asterix-graphix/src/test/resources/metadatats/results/graphix/create-drop-graph/create-drop-graph.8.adm b/asterix-graphix/src/test/resources/metadatats/results/graphix/create-drop-graph/create-drop-graph.8.adm
new file mode 100644
index 0000000..fa28578
--- /dev/null
+++ b/asterix-graphix/src/test/resources/metadatats/results/graphix/create-drop-graph/create-drop-graph.8.adm
@@ -0,0 +1 @@
+{ "graphCount": 0, "dependencyCount": 0 }
\ No newline at end of file
diff --git a/asterix-graphix/src/test/resources/metadatats/results/graphix/on-graph-dependency/on-graph-dependency.2.adm b/asterix-graphix/src/test/resources/metadatats/results/graphix/on-graph-dependency/on-graph-dependency.2.adm
new file mode 100644
index 0000000..b5547c5
--- /dev/null
+++ b/asterix-graphix/src/test/resources/metadatats/results/graphix/on-graph-dependency/on-graph-dependency.2.adm
@@ -0,0 +1 @@
+{ "graph": [ { "DataverseName": "Yelp", "GraphName": "YelpGraph", "DependentDataverse": "Yelp", "DependentName": "Reviews", "DependentKind": "DATASET" }, { "DataverseName": "Yelp", "GraphName": "YelpGraph", "DependentDataverse": "Yelp", "DependentName": "Users", "DependentKind": "DATASET" }, { "DataverseName": "Yelp", "GraphName": "YelpGraphGraph", "DependentDataverse": "Yelp", "DependentName": "Reviews", "DependentKind": "DATASET" }, { "DataverseName": "Yelp", "GraphName": "YelpGraphGraph", "DependentDataverse": "Yelp", "DependentName": "Users", "DependentKind": "DATASET" }, { "DataverseName": "Yelp", "GraphName": "YelpGraphGraph", "DependentDataverse": "Yelp", "DependentName": "YelpGraph", "DependentKind": "GRAPH" } ], "function": [ { "DataverseName": "Yelp", "Name": "YelpGraphFunction", "Arity": "0", "DependentDataverse": "Yelp", "DependentName": "YelpGraph", "DependentKind": "GRAPH" } ], "view": [ { "DataverseName": "Yelp", "DatasetName": "YelpGraphView", "DependentDataverse": "Yelp", "DependentName": "YelpGraph", "DependentKind": "GRAPH" } ] }
\ No newline at end of file
diff --git a/asterix-graphix/src/test/resources/metadatats/results/graphix/on-graph-dependency/on-graph-dependency.4.adm b/asterix-graphix/src/test/resources/metadatats/results/graphix/on-graph-dependency/on-graph-dependency.4.adm
new file mode 100644
index 0000000..c227083
--- /dev/null
+++ b/asterix-graphix/src/test/resources/metadatats/results/graphix/on-graph-dependency/on-graph-dependency.4.adm
@@ -0,0 +1 @@
+0
\ No newline at end of file
diff --git a/asterix-graphix/src/test/resources/metadata/testsuite.xml b/asterix-graphix/src/test/resources/metadatats/testsuite.xml
similarity index 72%
rename from asterix-graphix/src/test/resources/metadata/testsuite.xml
rename to asterix-graphix/src/test/resources/metadatats/testsuite.xml
index 2f45b91..9861530 100644
--- a/asterix-graphix/src/test/resources/metadata/testsuite.xml
+++ b/asterix-graphix/src/test/resources/metadatats/testsuite.xml
@@ -18,10 +18,17 @@
             ResultOffsetPath="results"
             QueryOffsetPath="queries"
             QueryFileExtension=".sqlpp">
-  <test-group name="yelp-example">
+  <test-group name="create-drop-graph">
     <test-case FilePath="graphix">
-      <compilation-unit name="yelp-example">
-        <output-dir compare="Text">yelp-example</output-dir>
+      <compilation-unit name="create-drop-graph">
+        <output-dir compare="Text">create-drop-graph</output-dir>
+      </compilation-unit>
+    </test-case>
+  </test-group>
+  <test-group name="on-graph-dependency">
+    <test-case FilePath="graphix">
+      <compilation-unit name="on-graph-dependency">
+        <output-dir compare="Text">on-graph-dependency</output-dir>
       </compilation-unit>
     </test-case>
   </test-group>
diff --git a/asterix-graphix/src/test/resources/runtimets/queries/graphix/error-handling/error-handling.1.ddl.sqlpp b/asterix-graphix/src/test/resources/runtimets/queries/graphix/create-drop-error/create-drop-error.1.ddl.sqlpp
similarity index 88%
rename from asterix-graphix/src/test/resources/runtimets/queries/graphix/error-handling/error-handling.1.ddl.sqlpp
rename to asterix-graphix/src/test/resources/runtimets/queries/graphix/create-drop-error/create-drop-error.1.ddl.sqlpp
index ff47a77..d74de05 100644
--- a/asterix-graphix/src/test/resources/runtimets/queries/graphix/error-handling/error-handling.1.ddl.sqlpp
+++ b/asterix-graphix/src/test/resources/runtimets/queries/graphix/create-drop-error/create-drop-error.1.ddl.sqlpp
@@ -37,6 +37,9 @@
                   PRIMARY KEY (_id)
                   AS GenericDataset,
 EDGE              (:Vertex1)-[:EDGE_1]->(:Vertex2)
-                  DESTINATION KEY (_foreign_id);
+                  SOURCE KEY (_id)
+                  DESTINATION KEY (_foreign_id)
+                  AS ( FROM   GenericDataset GD
+                       SELECT GD._id, GD._foreign_id );
 
 DROP DATASET      GenericDataset;
diff --git a/asterix-graphix/src/test/resources/runtimets/queries/graphix/error-handling/error-handling.10.ddl.sqlpp b/asterix-graphix/src/test/resources/runtimets/queries/graphix/create-drop-error/create-drop-error.10.ddl.sqlpp
similarity index 85%
rename from asterix-graphix/src/test/resources/runtimets/queries/graphix/error-handling/error-handling.10.ddl.sqlpp
rename to asterix-graphix/src/test/resources/runtimets/queries/graphix/create-drop-error/create-drop-error.10.ddl.sqlpp
index fe00035..26b75b2 100644
--- a/asterix-graphix/src/test/resources/runtimets/queries/graphix/error-handling/error-handling.10.ddl.sqlpp
+++ b/asterix-graphix/src/test/resources/runtimets/queries/graphix/create-drop-error/create-drop-error.10.ddl.sqlpp
@@ -39,7 +39,10 @@
                   PRIMARY KEY (_id)
                   AS GenericDataset,
 EDGE              (:Vertex1)-[:EDGE_1]->(:Vertex2)
-                  DESTINATION KEY (_foreign_id);
+                  SOURCE KEY (_id)
+                  DESTINATION KEY (_foreign_id)
+                  AS ( FROM   GenericDataset GD
+                       SELECT GD._id, GD._foreign_id );
 
 USE               TestDataverse2;
 CREATE TYPE       GenericType
@@ -56,7 +59,10 @@
                   PRIMARY KEY (_id)
                   AS GenericDataset,
 EDGE              (:Vertex1)-[:EDGE_1]->(:Vertex2)
-                  DESTINATION KEY (_foreign_id);
+                  SOURCE KEY (_id)
+                  DESTINATION KEY (_foreign_id)
+                  AS ( FROM   GenericDataset GD
+                       SELECT GD._id, GD._foreign_id );
 
 USE               TestDataverse1;
 CREATE GRAPH      TestGraph IF NOT EXISTS AS
diff --git a/asterix-graphix/src/test/resources/runtimets/queries/graphix/error-handling/error-handling.11.ddl.sqlpp b/asterix-graphix/src/test/resources/runtimets/queries/graphix/create-drop-error/create-drop-error.11.ddl.sqlpp
similarity index 88%
rename from asterix-graphix/src/test/resources/runtimets/queries/graphix/error-handling/error-handling.11.ddl.sqlpp
rename to asterix-graphix/src/test/resources/runtimets/queries/graphix/create-drop-error/create-drop-error.11.ddl.sqlpp
index ff0f01e..77706fa 100644
--- a/asterix-graphix/src/test/resources/runtimets/queries/graphix/error-handling/error-handling.11.ddl.sqlpp
+++ b/asterix-graphix/src/test/resources/runtimets/queries/graphix/create-drop-error/create-drop-error.11.ddl.sqlpp
@@ -37,7 +37,10 @@
                   PRIMARY KEY (_id)
                   AS GenericDataset,
 EDGE              (:Vertex1)-[:EDGE_1]->(:Vertex2)
-                  DESTINATION KEY (_foreign_id);
+                  SOURCE KEY (_id)
+                  DESTINATION KEY (_foreign_id)
+                  AS ( FROM   GenericDataset GD
+                       SELECT GD._id, GD._foreign_id );
 
 DROP GRAPH        GraphThatDoesntExist1 IF EXISTS;
 DROP GRAPH        GraphThatDoesntExist2;
diff --git a/asterix-graphix/src/test/resources/runtimets/queries/graphix/error-handling/error-handling.7.ddl.sqlpp b/asterix-graphix/src/test/resources/runtimets/queries/graphix/create-drop-error/create-drop-error.12.ddl.sqlpp
similarity index 80%
copy from asterix-graphix/src/test/resources/runtimets/queries/graphix/error-handling/error-handling.7.ddl.sqlpp
copy to asterix-graphix/src/test/resources/runtimets/queries/graphix/create-drop-error/create-drop-error.12.ddl.sqlpp
index 5191339..2ec83fd 100644
--- a/asterix-graphix/src/test/resources/runtimets/queries/graphix/error-handling/error-handling.7.ddl.sqlpp
+++ b/asterix-graphix/src/test/resources/runtimets/queries/graphix/create-drop-error/create-drop-error.12.ddl.sqlpp
@@ -17,7 +17,7 @@
  * under the License.
  */
 
-// Verify that a subquery as an element definition is a valid query.
+// Verify that we cannot drop a graph that a view is dependent on.
 
 DROP DATAVERSE    TestDataverse IF EXISTS;
 CREATE DATAVERSE  TestDataverse;
@@ -25,7 +25,6 @@
 
 CREATE TYPE       GenericType
 AS                { _id: uuid };
-
 CREATE DATASET    GenericDataset (GenericType)
 PRIMARY KEY       _id AUTOGENERATED;
 
@@ -37,9 +36,14 @@
                   PRIMARY KEY (_id)
                   AS GenericDataset,
 EDGE              (:Vertex1)-[:EDGE_1]->(:Vertex2)
-                  PRIMARY KEY (_id, _foreign_id)
                   SOURCE KEY (_id)
                   DESTINATION KEY (_foreign_id)
-                  AS ( FROM GenericDataset G,
-                            GenericDataset G2
-                       SELECT V );
+                  AS ( FROM   GenericDataset GD
+                       SELECT GD._id, GD._foreign_id );
+
+CREATE VIEW       TestView AS
+                  FROM GRAPH  TestGraph
+                  MATCH       (n)
+                  SELECT      n;
+
+DROP GRAPH        TestGraph;
\ No newline at end of file
diff --git a/asterix-graphix/src/test/resources/runtimets/queries/graphix/error-handling/error-handling.7.ddl.sqlpp b/asterix-graphix/src/test/resources/runtimets/queries/graphix/create-drop-error/create-drop-error.13.ddl.sqlpp
similarity index 78%
copy from asterix-graphix/src/test/resources/runtimets/queries/graphix/error-handling/error-handling.7.ddl.sqlpp
copy to asterix-graphix/src/test/resources/runtimets/queries/graphix/create-drop-error/create-drop-error.13.ddl.sqlpp
index 5191339..a38fd4b 100644
--- a/asterix-graphix/src/test/resources/runtimets/queries/graphix/error-handling/error-handling.7.ddl.sqlpp
+++ b/asterix-graphix/src/test/resources/runtimets/queries/graphix/create-drop-error/create-drop-error.13.ddl.sqlpp
@@ -17,7 +17,7 @@
  * under the License.
  */
 
-// Verify that a subquery as an element definition is a valid query.
+// Verify that we cannot drop a graph that a function is dependent on.
 
 DROP DATAVERSE    TestDataverse IF EXISTS;
 CREATE DATAVERSE  TestDataverse;
@@ -25,7 +25,6 @@
 
 CREATE TYPE       GenericType
 AS                { _id: uuid };
-
 CREATE DATASET    GenericDataset (GenericType)
 PRIMARY KEY       _id AUTOGENERATED;
 
@@ -37,9 +36,15 @@
                   PRIMARY KEY (_id)
                   AS GenericDataset,
 EDGE              (:Vertex1)-[:EDGE_1]->(:Vertex2)
-                  PRIMARY KEY (_id, _foreign_id)
                   SOURCE KEY (_id)
                   DESTINATION KEY (_foreign_id)
-                  AS ( FROM GenericDataset G,
-                            GenericDataset G2
-                       SELECT V );
+                  AS ( FROM   GenericDataset GD
+                       SELECT GD._id, GD._foreign_id );
+
+CREATE FUNCTION   TestFunction() {
+                      FROM GRAPH  TestGraph
+                      MATCH       (n)
+                      SELECT      n
+                  };
+
+DROP GRAPH        TestGraph;
\ No newline at end of file
diff --git a/asterix-graphix/src/test/resources/runtimets/queries/graphix/error-handling/error-handling.7.ddl.sqlpp b/asterix-graphix/src/test/resources/runtimets/queries/graphix/create-drop-error/create-drop-error.14.ddl.sqlpp
similarity index 64%
copy from asterix-graphix/src/test/resources/runtimets/queries/graphix/error-handling/error-handling.7.ddl.sqlpp
copy to asterix-graphix/src/test/resources/runtimets/queries/graphix/create-drop-error/create-drop-error.14.ddl.sqlpp
index 5191339..ac9b1f6 100644
--- a/asterix-graphix/src/test/resources/runtimets/queries/graphix/error-handling/error-handling.7.ddl.sqlpp
+++ b/asterix-graphix/src/test/resources/runtimets/queries/graphix/create-drop-error/create-drop-error.14.ddl.sqlpp
@@ -17,7 +17,7 @@
  * under the License.
  */
 
-// Verify that a subquery as an element definition is a valid query.
+// Verify that we cannot drop a graph that another graph is dependent on.
 
 DROP DATAVERSE    TestDataverse IF EXISTS;
 CREATE DATAVERSE  TestDataverse;
@@ -25,7 +25,6 @@
 
 CREATE TYPE       GenericType
 AS                { _id: uuid };
-
 CREATE DATASET    GenericDataset (GenericType)
 PRIMARY KEY       _id AUTOGENERATED;
 
@@ -37,9 +36,24 @@
                   PRIMARY KEY (_id)
                   AS GenericDataset,
 EDGE              (:Vertex1)-[:EDGE_1]->(:Vertex2)
-                  PRIMARY KEY (_id, _foreign_id)
                   SOURCE KEY (_id)
                   DESTINATION KEY (_foreign_id)
-                  AS ( FROM GenericDataset G,
-                            GenericDataset G2
-                       SELECT V );
+                  AS ( FROM   GenericDataset GD
+                       SELECT GD._id, GD._foreign_id );
+
+CREATE GRAPH      TestGraph2 AS
+VERTEX            (:Vertex1)
+                  PRIMARY KEY (_id)
+                  AS GenericDataset,
+VERTEX            (:Vertex2)
+                  PRIMARY KEY (_id)
+                  AS ( FROM GRAPH  TestGraph
+                       MATCH       (n)
+                       SELECT      n ),
+EDGE              (:Vertex1)-[:EDGE_1]->(:Vertex2)
+                  SOURCE KEY (_id)
+                  DESTINATION KEY (_foreign_id)
+                  AS ( FROM   GenericDataset GD
+                       SELECT GD._id, GD._foreign_id );
+
+DROP GRAPH        TestGraph;
\ No newline at end of file
diff --git a/asterix-graphix/src/test/resources/runtimets/queries/graphix/error-handling/error-handling.2.ddl.sqlpp b/asterix-graphix/src/test/resources/runtimets/queries/graphix/create-drop-error/create-drop-error.2.ddl.sqlpp
similarity index 97%
rename from asterix-graphix/src/test/resources/runtimets/queries/graphix/error-handling/error-handling.2.ddl.sqlpp
rename to asterix-graphix/src/test/resources/runtimets/queries/graphix/create-drop-error/create-drop-error.2.ddl.sqlpp
index 09693af..c51981c 100644
--- a/asterix-graphix/src/test/resources/runtimets/queries/graphix/error-handling/error-handling.2.ddl.sqlpp
+++ b/asterix-graphix/src/test/resources/runtimets/queries/graphix/create-drop-error/create-drop-error.2.ddl.sqlpp
@@ -39,7 +39,6 @@
                   PRIMARY KEY (_id)
                   AS GenericDataset,
 EDGE              (:Vertex1)-[:EDGE_1]->(:Vertex2)
-                  PRIMARY KEY (a, b)
                   SOURCE KEY (a)
                   DESTINATION KEY (b)
                   AS ( FROM TestFunction() T
diff --git a/asterix-graphix/src/test/resources/runtimets/queries/graphix/error-handling/error-handling.3.ddl.sqlpp b/asterix-graphix/src/test/resources/runtimets/queries/graphix/create-drop-error/create-drop-error.3.ddl.sqlpp
similarity index 97%
rename from asterix-graphix/src/test/resources/runtimets/queries/graphix/error-handling/error-handling.3.ddl.sqlpp
rename to asterix-graphix/src/test/resources/runtimets/queries/graphix/create-drop-error/create-drop-error.3.ddl.sqlpp
index a812ea1..533adfd 100644
--- a/asterix-graphix/src/test/resources/runtimets/queries/graphix/error-handling/error-handling.3.ddl.sqlpp
+++ b/asterix-graphix/src/test/resources/runtimets/queries/graphix/create-drop-error/create-drop-error.3.ddl.sqlpp
@@ -39,7 +39,6 @@
                   PRIMARY KEY (_id)
                   AS GenericDataset,
 EDGE              (:Vertex1)-[:EDGE_1]->(:Vertex2)
-                  PRIMARY KEY (a, b)
                   SOURCE KEY (a)
                   DESTINATION KEY (b)
                   AS ( FROM TestView T
diff --git a/asterix-graphix/src/test/resources/runtimets/queries/graphix/error-handling/error-handling.4.ddl.sqlpp b/asterix-graphix/src/test/resources/runtimets/queries/graphix/create-drop-error/create-drop-error.4.ddl.sqlpp
similarity index 88%
rename from asterix-graphix/src/test/resources/runtimets/queries/graphix/error-handling/error-handling.4.ddl.sqlpp
rename to asterix-graphix/src/test/resources/runtimets/queries/graphix/create-drop-error/create-drop-error.4.ddl.sqlpp
index 0cdec73..2360211 100644
--- a/asterix-graphix/src/test/resources/runtimets/queries/graphix/error-handling/error-handling.4.ddl.sqlpp
+++ b/asterix-graphix/src/test/resources/runtimets/queries/graphix/create-drop-error/create-drop-error.4.ddl.sqlpp
@@ -39,6 +39,9 @@
                   PRIMARY KEY (_id)
                   AS DatasetSynonym,
 EDGE              (:Vertex1)-[:EDGE_1]->(:Vertex2)
-                  DESTINATION KEY (_foreign_id);
+                  SOURCE KEY (_id)
+                  DESTINATION KEY (_foreign_id)
+                  AS ( FROM   GenericDataset GD
+                       SELECT GD._id, GD._foreign_id );
 
 DROP SYNONYM      DatasetSynonym;
diff --git a/asterix-graphix/src/test/resources/runtimets/queries/graphix/error-handling/error-handling.5.ddl.sqlpp b/asterix-graphix/src/test/resources/runtimets/queries/graphix/create-drop-error/create-drop-error.5.ddl.sqlpp
similarity index 90%
rename from asterix-graphix/src/test/resources/runtimets/queries/graphix/error-handling/error-handling.5.ddl.sqlpp
rename to asterix-graphix/src/test/resources/runtimets/queries/graphix/create-drop-error/create-drop-error.5.ddl.sqlpp
index 844389f..bcd6df1 100644
--- a/asterix-graphix/src/test/resources/runtimets/queries/graphix/error-handling/error-handling.5.ddl.sqlpp
+++ b/asterix-graphix/src/test/resources/runtimets/queries/graphix/create-drop-error/create-drop-error.5.ddl.sqlpp
@@ -49,6 +49,9 @@
                   PRIMARY KEY (_id)
                   AS TestDataverse2.GenericDataset,
 EDGE              (:Vertex1)-[:EDGE_1]->(:Vertex2)
-                  DESTINATION KEY (_foreign_id);
+                  SOURCE KEY (_id)
+                  DESTINATION KEY (_foreign_id)
+                  AS ( FROM   GenericDataset GD
+                       SELECT GD._id, GD._foreign_id );
 
 DROP DATAVERSE    TestDataverse2;
diff --git a/asterix-graphix/src/test/resources/runtimets/queries/graphix/error-handling/error-handling.6.ddl.sqlpp b/asterix-graphix/src/test/resources/runtimets/queries/graphix/create-drop-error/create-drop-error.6.ddl.sqlpp
similarity index 88%
rename from asterix-graphix/src/test/resources/runtimets/queries/graphix/error-handling/error-handling.6.ddl.sqlpp
rename to asterix-graphix/src/test/resources/runtimets/queries/graphix/create-drop-error/create-drop-error.6.ddl.sqlpp
index f6173aa..2f29d61 100644
--- a/asterix-graphix/src/test/resources/runtimets/queries/graphix/error-handling/error-handling.6.ddl.sqlpp
+++ b/asterix-graphix/src/test/resources/runtimets/queries/graphix/create-drop-error/create-drop-error.6.ddl.sqlpp
@@ -37,4 +37,7 @@
                   PRIMARY KEY (_id)
                   AS GenericDataset,
 EDGE              (:Vertex1)-[:EDGE_1]->(:Vertex2)
-                  DESTINATION KEY (_foreign_id);
+                  SOURCE KEY (_id)
+                  DESTINATION KEY (_foreign_id)
+                  AS ( FROM   GenericDataset GD
+                       SELECT GD._id, GD._foreign_id );
diff --git a/asterix-graphix/src/test/resources/runtimets/queries/graphix/error-handling/error-handling.7.ddl.sqlpp b/asterix-graphix/src/test/resources/runtimets/queries/graphix/create-drop-error/create-drop-error.7.ddl.sqlpp
similarity index 96%
rename from asterix-graphix/src/test/resources/runtimets/queries/graphix/error-handling/error-handling.7.ddl.sqlpp
rename to asterix-graphix/src/test/resources/runtimets/queries/graphix/create-drop-error/create-drop-error.7.ddl.sqlpp
index 5191339..3dce9df 100644
--- a/asterix-graphix/src/test/resources/runtimets/queries/graphix/error-handling/error-handling.7.ddl.sqlpp
+++ b/asterix-graphix/src/test/resources/runtimets/queries/graphix/create-drop-error/create-drop-error.7.ddl.sqlpp
@@ -37,7 +37,6 @@
                   PRIMARY KEY (_id)
                   AS GenericDataset,
 EDGE              (:Vertex1)-[:EDGE_1]->(:Vertex2)
-                  PRIMARY KEY (_id, _foreign_id)
                   SOURCE KEY (_id)
                   DESTINATION KEY (_foreign_id)
                   AS ( FROM GenericDataset G,
diff --git a/asterix-graphix/src/test/resources/runtimets/queries/graphix/error-handling/error-handling.8.ddl.sqlpp b/asterix-graphix/src/test/resources/runtimets/queries/graphix/create-drop-error/create-drop-error.8.ddl.sqlpp
similarity index 100%
rename from asterix-graphix/src/test/resources/runtimets/queries/graphix/error-handling/error-handling.8.ddl.sqlpp
rename to asterix-graphix/src/test/resources/runtimets/queries/graphix/create-drop-error/create-drop-error.8.ddl.sqlpp
diff --git a/asterix-graphix/src/test/resources/runtimets/queries/graphix/error-handling/error-handling.9.ddl.sqlpp b/asterix-graphix/src/test/resources/runtimets/queries/graphix/create-drop-error/create-drop-error.9.ddl.sqlpp
similarity index 87%
rename from asterix-graphix/src/test/resources/runtimets/queries/graphix/error-handling/error-handling.9.ddl.sqlpp
rename to asterix-graphix/src/test/resources/runtimets/queries/graphix/create-drop-error/create-drop-error.9.ddl.sqlpp
index 7c5269e..204900f 100644
--- a/asterix-graphix/src/test/resources/runtimets/queries/graphix/error-handling/error-handling.9.ddl.sqlpp
+++ b/asterix-graphix/src/test/resources/runtimets/queries/graphix/create-drop-error/create-drop-error.9.ddl.sqlpp
@@ -37,4 +37,7 @@
                   PRIMARY KEY (_id)
                   AS GenericDataset,
 EDGE              (:Vertex1)-[:EDGE_1]->(:Vertex3)
-                  DESTINATION KEY (_foreign_id);
+                  SOURCE KEY (_id)
+                  DESTINATION KEY (_foreign_id)
+                  AS ( FROM   GenericDataset GD
+                       SELECT GD._id, GD._foreign_id );
diff --git a/asterix-graphix/src/test/resources/runtimets/queries/graphix/dangling-vertices/dangling-vertices.1.ddl.sqlpp b/asterix-graphix/src/test/resources/runtimets/queries/graphix/dangling-vertices/dangling-vertices.1.ddl.sqlpp
new file mode 100644
index 0000000..492a7aa
--- /dev/null
+++ b/asterix-graphix/src/test/resources/runtimets/queries/graphix/dangling-vertices/dangling-vertices.1.ddl.sqlpp
@@ -0,0 +1,49 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
+ *
+ *   http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied.  See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+
+DROP DATAVERSE    Yelp IF EXISTS;
+CREATE DATAVERSE  Yelp;
+USE               Yelp;
+
+CREATE TYPE       GenericType
+AS                { _id: uuid };
+CREATE DATASET    Reviews (GenericType)
+PRIMARY KEY       _id AUTOGENERATED;
+CREATE DATASET    Users (GenericType)
+PRIMARY KEY       _id AUTOGENERATED;
+
+CREATE GRAPH      YelpGraph AS
+VERTEX            (:User)
+                  PRIMARY KEY (user_id)
+                  AS Users,
+VERTEX            (:Review)
+                  PRIMARY KEY (review_id)
+                  AS Reviews,
+EDGE              (:User)-[:FRIENDS_WITH]->(:User)
+                  SOURCE KEY (user_id)
+                  DESTINATION KEY (friend)
+                  AS ( FROM    Users U
+                       UNNEST  U.friends F
+                       SELECT  U.user_id AS user_id,
+                               F AS friend ),
+EDGE              (:Review)-[:MADE_BY]->(:User)
+                  SOURCE KEY (review_id)
+                  DESTINATION KEY (user_id)
+                  AS ( FROM    Reviews R
+                       SELECT  R.review_id, R.user_id );
\ No newline at end of file
diff --git a/asterix-graphix/src/test/resources/metadata/queries/graphix/yelp-example/yelp-example.2.query.sqlpp b/asterix-graphix/src/test/resources/runtimets/queries/graphix/dangling-vertices/dangling-vertices.2.update.sqlpp
similarity index 62%
copy from asterix-graphix/src/test/resources/metadata/queries/graphix/yelp-example/yelp-example.2.query.sqlpp
copy to asterix-graphix/src/test/resources/runtimets/queries/graphix/dangling-vertices/dangling-vertices.2.update.sqlpp
index b8151af..fa0d18d 100644
--- a/asterix-graphix/src/test/resources/metadata/queries/graphix/yelp-example/yelp-example.2.query.sqlpp
+++ b/asterix-graphix/src/test/resources/runtimets/queries/graphix/dangling-vertices/dangling-vertices.2.update.sqlpp
@@ -17,6 +17,20 @@
  * under the License.
  */
 
-FROM      `Metadata`.`Graph` G
-SELECT    G.DataverseName, G.GraphName, G.Dependencies, G.Vertices, G.Edges
-ORDER BY  G.DataverseName, G.GraphName;
+USE               Yelp;
+
+INSERT INTO       Users [
+  { "user_id": 1, "friends": [2, 3], "best_friend": 2 },
+  { "user_id": 2, "friends": [1] },
+  { "user_id": 3, "friends": [1], "best_friend": 1 },
+  { "user_id": 4 }
+];
+
+INSERT INTO       Reviews [
+  { "review_id": "A", "user_id": 1 },
+  { "review_id": "B", "user_id": 1 },
+  { "review_id": "C", "user_id": 2 },
+  { "review_id": "D", "user_id": 3 },
+  { "review_id": "E", "user_id": 4 },
+  { "review_id": "F", "user_id": 5 }
+];
diff --git a/asterix-graphix/src/test/resources/metadata/queries/graphix/yelp-example/yelp-example.2.query.sqlpp b/asterix-graphix/src/test/resources/runtimets/queries/graphix/dangling-vertices/dangling-vertices.3.query.sqlpp
similarity index 84%
rename from asterix-graphix/src/test/resources/metadata/queries/graphix/yelp-example/yelp-example.2.query.sqlpp
rename to asterix-graphix/src/test/resources/runtimets/queries/graphix/dangling-vertices/dangling-vertices.3.query.sqlpp
index b8151af..2e67ca8 100644
--- a/asterix-graphix/src/test/resources/metadata/queries/graphix/yelp-example/yelp-example.2.query.sqlpp
+++ b/asterix-graphix/src/test/resources/runtimets/queries/graphix/dangling-vertices/dangling-vertices.3.query.sqlpp
@@ -17,6 +17,8 @@
  * under the License.
  */
 
-FROM      `Metadata`.`Graph` G
-SELECT    G.DataverseName, G.GraphName, G.Dependencies, G.Vertices, G.Edges
-ORDER BY  G.DataverseName, G.GraphName;
+// There is one dangling vertex, and zero edges.
+FROM GRAPH  Yelp.YelpGraph
+MATCH       (u:User)
+SELECT      u.user_id
+ORDER BY    u.user_id;
diff --git a/asterix-graphix/src/test/resources/metadata/queries/graphix/yelp-example/yelp-example.2.query.sqlpp b/asterix-graphix/src/test/resources/runtimets/queries/graphix/dangling-vertices/dangling-vertices.4.query.sqlpp
similarity index 75%
copy from asterix-graphix/src/test/resources/metadata/queries/graphix/yelp-example/yelp-example.2.query.sqlpp
copy to asterix-graphix/src/test/resources/runtimets/queries/graphix/dangling-vertices/dangling-vertices.4.query.sqlpp
index b8151af..fc8e61c 100644
--- a/asterix-graphix/src/test/resources/metadata/queries/graphix/yelp-example/yelp-example.2.query.sqlpp
+++ b/asterix-graphix/src/test/resources/runtimets/queries/graphix/dangling-vertices/dangling-vertices.4.query.sqlpp
@@ -17,6 +17,10 @@
  * under the License.
  */
 
-FROM      `Metadata`.`Graph` G
-SELECT    G.DataverseName, G.GraphName, G.Dependencies, G.Vertices, G.Edges
-ORDER BY  G.DataverseName, G.GraphName;
+// There are two dangling vertices of the same label, and zero edges.
+FROM GRAPH  Yelp.YelpGraph
+MATCH       (u1:User), (u2:User)
+SELECT      u1.user_id AS u1_user_id,
+            u2.user_id AS u2_user_id
+ORDER BY    u1_user_id,
+            u2_user_id;
diff --git a/asterix-graphix/src/test/resources/metadata/queries/graphix/yelp-example/yelp-example.2.query.sqlpp b/asterix-graphix/src/test/resources/runtimets/queries/graphix/dangling-vertices/dangling-vertices.5.query.sqlpp
similarity index 77%
copy from asterix-graphix/src/test/resources/metadata/queries/graphix/yelp-example/yelp-example.2.query.sqlpp
copy to asterix-graphix/src/test/resources/runtimets/queries/graphix/dangling-vertices/dangling-vertices.5.query.sqlpp
index b8151af..b37cb34 100644
--- a/asterix-graphix/src/test/resources/metadata/queries/graphix/yelp-example/yelp-example.2.query.sqlpp
+++ b/asterix-graphix/src/test/resources/runtimets/queries/graphix/dangling-vertices/dangling-vertices.5.query.sqlpp
@@ -17,6 +17,10 @@
  * under the License.
  */
 
-FROM      `Metadata`.`Graph` G
-SELECT    G.DataverseName, G.GraphName, G.Dependencies, G.Vertices, G.Edges
-ORDER BY  G.DataverseName, G.GraphName;
+// There are two dangling vertices of different labels, and zero edges.
+FROM GRAPH  Yelp.YelpGraph
+MATCH       (u:User), (r:Review)
+SELECT      u.user_id,
+            r.review_id
+ORDER BY    u.user_id,
+            r.review_id;
diff --git a/asterix-graphix/src/test/resources/metadata/queries/graphix/yelp-example/yelp-example.2.query.sqlpp b/asterix-graphix/src/test/resources/runtimets/queries/graphix/dangling-vertices/dangling-vertices.6.query.sqlpp
similarity index 75%
copy from asterix-graphix/src/test/resources/metadata/queries/graphix/yelp-example/yelp-example.2.query.sqlpp
copy to asterix-graphix/src/test/resources/runtimets/queries/graphix/dangling-vertices/dangling-vertices.6.query.sqlpp
index b8151af..f41dcdf 100644
--- a/asterix-graphix/src/test/resources/metadata/queries/graphix/yelp-example/yelp-example.2.query.sqlpp
+++ b/asterix-graphix/src/test/resources/runtimets/queries/graphix/dangling-vertices/dangling-vertices.6.query.sqlpp
@@ -17,6 +17,10 @@
  * under the License.
  */
 
-FROM      `Metadata`.`Graph` G
-SELECT    G.DataverseName, G.GraphName, G.Dependencies, G.Vertices, G.Edges
-ORDER BY  G.DataverseName, G.GraphName;
+// There are two dangling vertices, but each vertex is logically connected to an edge.
+FROM GRAPH  Yelp.YelpGraph
+MATCH       (u:User)<-[:MADE_BY]-(r:Review), (u), (r)
+SELECT      u.user_id,
+            r.review_id
+ORDER BY    u.user_id,
+            r.review_id;
diff --git a/asterix-graphix/src/test/resources/metadata/queries/graphix/yelp-example/yelp-example.2.query.sqlpp b/asterix-graphix/src/test/resources/runtimets/queries/graphix/fixed-sub-path/fixed-sub-path.1.ddl.sqlpp
similarity index 72%
copy from asterix-graphix/src/test/resources/metadata/queries/graphix/yelp-example/yelp-example.2.query.sqlpp
copy to asterix-graphix/src/test/resources/runtimets/queries/graphix/fixed-sub-path/fixed-sub-path.1.ddl.sqlpp
index b8151af..ad55e77 100644
--- a/asterix-graphix/src/test/resources/metadata/queries/graphix/yelp-example/yelp-example.2.query.sqlpp
+++ b/asterix-graphix/src/test/resources/runtimets/queries/graphix/fixed-sub-path/fixed-sub-path.1.ddl.sqlpp
@@ -17,6 +17,13 @@
  * under the License.
  */
 
-FROM      `Metadata`.`Graph` G
-SELECT    G.DataverseName, G.GraphName, G.Dependencies, G.Vertices, G.Edges
-ORDER BY  G.DataverseName, G.GraphName;
+DROP DATAVERSE    Yelp IF EXISTS;
+CREATE DATAVERSE  Yelp;
+USE               Yelp;
+
+CREATE TYPE       GenericType
+AS                { _id: uuid };
+CREATE DATASET    Friends (GenericType)
+PRIMARY KEY       _id AUTOGENERATED;
+CREATE DATASET    Users (GenericType)
+PRIMARY KEY       _id AUTOGENERATED;
diff --git a/asterix-graphix/src/test/resources/metadata/queries/graphix/yelp-example/yelp-example.2.query.sqlpp b/asterix-graphix/src/test/resources/runtimets/queries/graphix/fixed-sub-path/fixed-sub-path.2.update.sqlpp
similarity index 68%
copy from asterix-graphix/src/test/resources/metadata/queries/graphix/yelp-example/yelp-example.2.query.sqlpp
copy to asterix-graphix/src/test/resources/runtimets/queries/graphix/fixed-sub-path/fixed-sub-path.2.update.sqlpp
index b8151af..5780dc6 100644
--- a/asterix-graphix/src/test/resources/metadata/queries/graphix/yelp-example/yelp-example.2.query.sqlpp
+++ b/asterix-graphix/src/test/resources/runtimets/queries/graphix/fixed-sub-path/fixed-sub-path.2.update.sqlpp
@@ -17,6 +17,21 @@
  * under the License.
  */
 
-FROM      `Metadata`.`Graph` G
-SELECT    G.DataverseName, G.GraphName, G.Dependencies, G.Vertices, G.Edges
-ORDER BY  G.DataverseName, G.GraphName;
+USE               Yelp;
+
+INSERT INTO       Users [
+  { "user_id": 1 },
+  { "user_id": 2 },
+  { "user_id": 3 },
+  { "user_id": 4 },
+  { "user_id": 5 },
+  { "user_id": 6 }
+];
+
+INSERT INTO       Friends [
+  { "user_id": 1, "friend": 2 },
+  { "user_id": 2, "friend": 3 },
+  { "user_id": 3, "friend": 4 },
+  { "user_id": 4, "friend": 5 },
+  { "user_id": 5, "friend": 6 }
+];
\ No newline at end of file
diff --git a/asterix-graphix/src/test/resources/runtimets/queries/graphix/fixed-sub-path/fixed-sub-path.3.query.sqlpp b/asterix-graphix/src/test/resources/runtimets/queries/graphix/fixed-sub-path/fixed-sub-path.3.query.sqlpp
new file mode 100644
index 0000000..ee62ea8
--- /dev/null
+++ b/asterix-graphix/src/test/resources/runtimets/queries/graphix/fixed-sub-path/fixed-sub-path.3.query.sqlpp
@@ -0,0 +1,37 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
+ *
+ *   http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied.  See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+
+// One directed edge definition of exactly two hops.
+FROM GRAPH  VERTEX (:User)
+                   PRIMARY KEY (user_id)
+                   AS Yelp.Users,
+            EDGE   (:User)-[:FRIENDS_WITH]->(:User)
+                   SOURCE KEY (user_id)
+                   DESTINATION KEY (friend)
+                   AS ( FROM    Yelp.Friends F
+                        SELECT  F.user_id AS user_id,
+                                F.friend AS friend )
+MATCH       (u2:User)<-[fw:FRIENDS_WITH{2,2}]-(u1:User)
+UNNEST      fw AS fwEdgeRecord
+LET         fw_left_vertex = VERTEX_KEY(fwEdgeRecord.LeftVertex)
+SELECT      u1.user_id AS u1_user_id,
+            fw_left_vertex,
+            u2.user_id AS u2_user_id,
+            HOP_COUNT(fw) AS fw_hops
+ORDER BY    u1, fw_left_vertex, u2;
\ No newline at end of file
diff --git a/asterix-graphix/src/test/resources/runtimets/queries/graphix/fixed-sub-path/fixed-sub-path.4.query.sqlpp b/asterix-graphix/src/test/resources/runtimets/queries/graphix/fixed-sub-path/fixed-sub-path.4.query.sqlpp
new file mode 100644
index 0000000..bfef02f
--- /dev/null
+++ b/asterix-graphix/src/test/resources/runtimets/queries/graphix/fixed-sub-path/fixed-sub-path.4.query.sqlpp
@@ -0,0 +1,37 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
+ *
+ *   http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied.  See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+
+// One directed edge definition of exactly three hops.
+FROM GRAPH  VERTEX (:User)
+                   PRIMARY KEY (user_id)
+                   AS Yelp.Users,
+            EDGE   (:User)-[:FRIENDS_WITH]->(:User)
+                   SOURCE KEY (user_id)
+                   DESTINATION KEY (friend)
+                   AS ( FROM    Yelp.Friends F
+                        SELECT  F.user_id AS user_id,
+                                F.friend AS friend )
+MATCH       (u2:User)<-[fw:FRIENDS_WITH{3,3}]-(u1:User)
+UNNEST      fw AS fwEdgeRecord
+LET         fw_left_vertex = VERTEX_KEY(fwEdgeRecord.LeftVertex)
+SELECT      u1.user_id AS u1_user_id,
+            fw_left_vertex,
+            u2.user_id AS u2_user_id,
+            HOP_COUNT(fw) AS fw_hops
+ORDER BY    u1, fw_left_vertex, u2;
\ No newline at end of file
diff --git a/asterix-graphix/src/test/resources/runtimets/queries/graphix/fixed-sub-path/fixed-sub-path.5.query.sqlpp b/asterix-graphix/src/test/resources/runtimets/queries/graphix/fixed-sub-path/fixed-sub-path.5.query.sqlpp
new file mode 100644
index 0000000..e12bf13
--- /dev/null
+++ b/asterix-graphix/src/test/resources/runtimets/queries/graphix/fixed-sub-path/fixed-sub-path.5.query.sqlpp
@@ -0,0 +1,43 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
+ *
+ *   http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied.  See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+
+// Two directed edge definitions of exactly two hops.
+FROM GRAPH  VERTEX (:User)
+                   PRIMARY KEY (user_id)
+                   AS Yelp.Users,
+            EDGE   (:User)-[:FRIENDS_WITH]->(:User)
+                   SOURCE KEY (user_id)
+                   DESTINATION KEY (friend)
+                   AS ( FROM    Yelp.Friends F
+                        SELECT  F.user_id AS user_id,
+                                F.friend AS friend )
+MATCH       (u2:User)<-[fw1:FRIENDS_WITH{2,2}]-(u1:User),
+            (u3:User)<-[fw2:FRIENDS_WITH{2,2}]-(u2)
+UNNEST      fw1 AS fw1EdgeRecord
+UNNEST      fw2 AS fw2EdgeRecord
+LET         fw1_left_vertex = VERTEX_KEY(fw1EdgeRecord.LeftVertex),
+            fw2_left_vertex = VERTEX_KEY(fw2EdgeRecord.LeftVertex)
+SELECT      u1.user_id AS u1_user_id,
+            fw1_left_vertex,
+            u2.user_id AS u2_user_id,
+            fw2_left_vertex,
+            u3.user_id AS u3_user_id,
+            HOP_COUNT(fw1) AS fw1_hops,
+            HOP_COUNT(fw2) AS fw2_hops
+ORDER BY    u1, fw1_left_vertex, u2, fw2_left_vertex, u3;
\ No newline at end of file
diff --git a/asterix-graphix/src/test/resources/runtimets/queries/graphix/fixed-sub-path/fixed-sub-path.6.query.sqlpp b/asterix-graphix/src/test/resources/runtimets/queries/graphix/fixed-sub-path/fixed-sub-path.6.query.sqlpp
new file mode 100644
index 0000000..ec08830
--- /dev/null
+++ b/asterix-graphix/src/test/resources/runtimets/queries/graphix/fixed-sub-path/fixed-sub-path.6.query.sqlpp
@@ -0,0 +1,37 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
+ *
+ *   http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied.  See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+
+// One directed edge definition of exactly one hop (this should be expanded as well).
+FROM GRAPH  VERTEX (:User)
+                   PRIMARY KEY (user_id)
+                   AS Yelp.Users,
+            EDGE   (:User)-[:FRIENDS_WITH]->(:User)
+                   SOURCE KEY (user_id)
+                   DESTINATION KEY (friend)
+                   AS ( FROM    Yelp.Friends F
+                        SELECT  F.user_id AS user_id,
+                                F.friend AS friend )
+MATCH       (u2:User)<-[fw:FRIENDS_WITH{1,1}]-(u1:User)
+UNNEST      fw AS fwEdgeRecord
+LET         fw_left_vertex = VERTEX_KEY(fwEdgeRecord.LeftVertex)
+SELECT      u1.user_id AS u1_user_id,
+            fw_left_vertex,
+            u2.user_id AS u2_user_id,
+            HOP_COUNT(fw) AS fw_hops
+ORDER BY    u1, fw_left_vertex, u2;
\ No newline at end of file
diff --git a/asterix-graphix/src/test/resources/metadata/queries/graphix/yelp-example/yelp-example.8.query.sqlpp b/asterix-graphix/src/test/resources/runtimets/queries/graphix/fixed-sub-path/fixed-sub-path.7.update.sqlpp
similarity index 85%
copy from asterix-graphix/src/test/resources/metadata/queries/graphix/yelp-example/yelp-example.8.query.sqlpp
copy to asterix-graphix/src/test/resources/runtimets/queries/graphix/fixed-sub-path/fixed-sub-path.7.update.sqlpp
index 9667fd6..44e6529 100644
--- a/asterix-graphix/src/test/resources/metadata/queries/graphix/yelp-example/yelp-example.8.query.sqlpp
+++ b/asterix-graphix/src/test/resources/runtimets/queries/graphix/fixed-sub-path/fixed-sub-path.7.update.sqlpp
@@ -17,6 +17,9 @@
  * under the License.
  */
 
-FROM    `Metadata`.`Graph` G
-WHERE   G.DataverseName IN [ "Yelp", "Yelp_A", "Yelp_B" ]
-SELECT  VALUE { "count": COUNT(*) };
+USE               Yelp;
+
+// We insert a backwards-edge here as well.
+INSERT INTO       Friends [
+  { "user_id": 2, "friend": 1 }
+];
\ No newline at end of file
diff --git a/asterix-graphix/src/test/resources/runtimets/queries/graphix/fixed-sub-path/fixed-sub-path.8.query.sqlpp b/asterix-graphix/src/test/resources/runtimets/queries/graphix/fixed-sub-path/fixed-sub-path.8.query.sqlpp
new file mode 100644
index 0000000..fcedada
--- /dev/null
+++ b/asterix-graphix/src/test/resources/runtimets/queries/graphix/fixed-sub-path/fixed-sub-path.8.query.sqlpp
@@ -0,0 +1,37 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
+ *
+ *   http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied.  See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+
+// One undirected edge definition of exactly two hops.
+FROM GRAPH  VERTEX (:User)
+                   PRIMARY KEY (user_id)
+                   AS Yelp.Users,
+            EDGE   (:User)-[:FRIENDS_WITH]->(:User)
+                   SOURCE KEY (user_id)
+                   DESTINATION KEY (friend)
+                   AS ( FROM    Yelp.Friends F
+                        SELECT  F.user_id AS user_id,
+                                F.friend AS friend )
+MATCH       (u2:User)-[fw:FRIENDS_WITH{2,2}]-(u1:User)
+UNNEST      fw AS fwEdgeRecord
+LET         fw_left_vertex = VERTEX_KEY(fwEdgeRecord.LeftVertex)
+SELECT      u1.user_id AS u1_user_id,
+            fw_left_vertex,
+            u2.user_id AS u2_user_id,
+            HOP_COUNT(fw) AS fw_hops
+ORDER BY    u1, fw_left_vertex, u2;
\ No newline at end of file
diff --git a/asterix-graphix/src/test/resources/metadata/queries/graphix/yelp-example/yelp-example.2.query.sqlpp b/asterix-graphix/src/test/resources/runtimets/queries/graphix/graph-isomorphism/graph-isomorphism.1.ddl.sqlpp
similarity index 72%
copy from asterix-graphix/src/test/resources/metadata/queries/graphix/yelp-example/yelp-example.2.query.sqlpp
copy to asterix-graphix/src/test/resources/runtimets/queries/graphix/graph-isomorphism/graph-isomorphism.1.ddl.sqlpp
index b8151af..1932ddc 100644
--- a/asterix-graphix/src/test/resources/metadata/queries/graphix/yelp-example/yelp-example.2.query.sqlpp
+++ b/asterix-graphix/src/test/resources/runtimets/queries/graphix/graph-isomorphism/graph-isomorphism.1.ddl.sqlpp
@@ -17,6 +17,13 @@
  * under the License.
  */
 
-FROM      `Metadata`.`Graph` G
-SELECT    G.DataverseName, G.GraphName, G.Dependencies, G.Vertices, G.Edges
-ORDER BY  G.DataverseName, G.GraphName;
+DROP DATAVERSE    Yelp IF EXISTS;
+CREATE DATAVERSE  Yelp;
+USE               Yelp;
+
+CREATE TYPE       GenericType
+AS                { _id: uuid };
+CREATE DATASET    Friends (GenericType)
+PRIMARY KEY       _id AUTOGENERATED;
+CREATE DATASET    Users (GenericType)
+PRIMARY KEY       _id AUTOGENERATED;
\ No newline at end of file
diff --git a/asterix-graphix/src/test/resources/metadata/queries/graphix/yelp-example/yelp-example.2.query.sqlpp b/asterix-graphix/src/test/resources/runtimets/queries/graphix/graph-isomorphism/graph-isomorphism.2.update.sqlpp
similarity index 74%
copy from asterix-graphix/src/test/resources/metadata/queries/graphix/yelp-example/yelp-example.2.query.sqlpp
copy to asterix-graphix/src/test/resources/runtimets/queries/graphix/graph-isomorphism/graph-isomorphism.2.update.sqlpp
index b8151af..864e842 100644
--- a/asterix-graphix/src/test/resources/metadata/queries/graphix/yelp-example/yelp-example.2.query.sqlpp
+++ b/asterix-graphix/src/test/resources/runtimets/queries/graphix/graph-isomorphism/graph-isomorphism.2.update.sqlpp
@@ -17,6 +17,17 @@
  * under the License.
  */
 
-FROM      `Metadata`.`Graph` G
-SELECT    G.DataverseName, G.GraphName, G.Dependencies, G.Vertices, G.Edges
-ORDER BY  G.DataverseName, G.GraphName;
+USE               Yelp;
+
+INSERT INTO       Users [
+  { "user_id": 1 },
+  { "user_id": 2 },
+  { "user_id": 3 },
+  { "user_id": 4 }
+];
+
+INSERT INTO       Friends [
+  { "user_id": 1, "friend": 2 },
+  { "user_id": 2, "friend": 3 },
+  { "user_id": 2, "friend": 1 }
+];
\ No newline at end of file
diff --git a/asterix-graphix/src/test/resources/metadata/queries/graphix/yelp-example/yelp-example.2.query.sqlpp b/asterix-graphix/src/test/resources/runtimets/queries/graphix/graph-isomorphism/graph-isomorphism.3.query.sqlpp
similarity index 76%
copy from asterix-graphix/src/test/resources/metadata/queries/graphix/yelp-example/yelp-example.2.query.sqlpp
copy to asterix-graphix/src/test/resources/runtimets/queries/graphix/graph-isomorphism/graph-isomorphism.3.query.sqlpp
index b8151af..ea3090e 100644
--- a/asterix-graphix/src/test/resources/metadata/queries/graphix/yelp-example/yelp-example.2.query.sqlpp
+++ b/asterix-graphix/src/test/resources/runtimets/queries/graphix/graph-isomorphism/graph-isomorphism.3.query.sqlpp
@@ -17,6 +17,11 @@
  * under the License.
  */
 
-FROM      `Metadata`.`Graph` G
-SELECT    G.DataverseName, G.GraphName, G.Dependencies, G.Vertices, G.Edges
-ORDER BY  G.DataverseName, G.GraphName;
+// (u) should never be equal to (v).
+FROM GRAPH  VERTEX (:User)
+                   PRIMARY KEY (user_id)
+                   AS Yelp.Users
+MATCH       (u), (v)
+SELECT      u.user_id AS u_user_id,
+            v.user_id AS v_user_id
+ORDER BY    u, v;
\ No newline at end of file
diff --git a/asterix-graphix/src/test/resources/metadata/queries/graphix/yelp-example/yelp-example.2.query.sqlpp b/asterix-graphix/src/test/resources/runtimets/queries/graphix/graph-isomorphism/graph-isomorphism.4.query.sqlpp
similarity index 72%
copy from asterix-graphix/src/test/resources/metadata/queries/graphix/yelp-example/yelp-example.2.query.sqlpp
copy to asterix-graphix/src/test/resources/runtimets/queries/graphix/graph-isomorphism/graph-isomorphism.4.query.sqlpp
index b8151af..b3ee92f 100644
--- a/asterix-graphix/src/test/resources/metadata/queries/graphix/yelp-example/yelp-example.2.query.sqlpp
+++ b/asterix-graphix/src/test/resources/runtimets/queries/graphix/graph-isomorphism/graph-isomorphism.4.query.sqlpp
@@ -17,6 +17,12 @@
  * under the License.
  */
 
-FROM      `Metadata`.`Graph` G
-SELECT    G.DataverseName, G.GraphName, G.Dependencies, G.Vertices, G.Edges
-ORDER BY  G.DataverseName, G.GraphName;
+// (u), (v), and (w) should never be equal.
+FROM GRAPH  VERTEX (:User)
+                   PRIMARY KEY (user_id)
+                   AS Yelp.Users
+MATCH       (u), (v), (w)
+SELECT      u.user_id AS u_user_id,
+            v.user_id AS v_user_id,
+            w.user_id AS w_user_id
+ORDER BY    u, v, w;
\ No newline at end of file
diff --git a/asterix-graphix/src/test/resources/metadata/queries/graphix/yelp-example/yelp-example.2.query.sqlpp b/asterix-graphix/src/test/resources/runtimets/queries/graphix/graph-isomorphism/graph-isomorphism.5.query.sqlpp
similarity index 60%
copy from asterix-graphix/src/test/resources/metadata/queries/graphix/yelp-example/yelp-example.2.query.sqlpp
copy to asterix-graphix/src/test/resources/runtimets/queries/graphix/graph-isomorphism/graph-isomorphism.5.query.sqlpp
index b8151af..974fd77 100644
--- a/asterix-graphix/src/test/resources/metadata/queries/graphix/yelp-example/yelp-example.2.query.sqlpp
+++ b/asterix-graphix/src/test/resources/runtimets/queries/graphix/graph-isomorphism/graph-isomorphism.5.query.sqlpp
@@ -17,6 +17,17 @@
  * under the License.
  */
 
-FROM      `Metadata`.`Graph` G
-SELECT    G.DataverseName, G.GraphName, G.Dependencies, G.Vertices, G.Edges
-ORDER BY  G.DataverseName, G.GraphName;
+// (u), (v), and (w) should never be equal.
+FROM GRAPH  VERTEX (:User)
+                   PRIMARY KEY (user_id)
+                   AS Yelp.Users,
+            EDGE   (:User)-[:FRIENDS_WITH]->(:User)
+                   SOURCE KEY (user_id)
+                   DESTINATION KEY (friend)
+                   AS ( FROM Yelp.Friends F
+                        SELECT F.user_id, F.friend )
+MATCH       (u)->(v)->(w)
+SELECT      u.user_id AS u_user_id,
+            v.user_id AS v_user_id,
+            w.user_id AS w_user_id
+ORDER BY    u, v, w;
\ No newline at end of file
diff --git a/asterix-graphix/src/test/resources/metadata/queries/graphix/yelp-example/yelp-example.2.query.sqlpp b/asterix-graphix/src/test/resources/runtimets/queries/graphix/graph-isomorphism/graph-isomorphism.6.query.sqlpp
similarity index 72%
copy from asterix-graphix/src/test/resources/metadata/queries/graphix/yelp-example/yelp-example.2.query.sqlpp
copy to asterix-graphix/src/test/resources/runtimets/queries/graphix/graph-isomorphism/graph-isomorphism.6.query.sqlpp
index b8151af..e3f1e7c 100644
--- a/asterix-graphix/src/test/resources/metadata/queries/graphix/yelp-example/yelp-example.2.query.sqlpp
+++ b/asterix-graphix/src/test/resources/runtimets/queries/graphix/graph-isomorphism/graph-isomorphism.6.query.sqlpp
@@ -17,6 +17,12 @@
  * under the License.
  */
 
-FROM      `Metadata`.`Graph` G
-SELECT    G.DataverseName, G.GraphName, G.Dependencies, G.Vertices, G.Edges
-ORDER BY  G.DataverseName, G.GraphName;
+// There should be results where (u) = (v).
+SET  `graphix.match-evaluation` "homomorphism";
+FROM GRAPH  VERTEX (:User)
+                   PRIMARY KEY (user_id)
+                   AS Yelp.Users
+MATCH       (u), (v)
+SELECT      u.user_id AS u_user_id,
+            v.user_id AS v_user_id
+ORDER BY    u, v;
\ No newline at end of file
diff --git a/asterix-graphix/src/test/resources/runtimets/queries/graphix/graph-isomorphism/graph-isomorphism.7.query.sqlpp b/asterix-graphix/src/test/resources/runtimets/queries/graphix/graph-isomorphism/graph-isomorphism.7.query.sqlpp
new file mode 100644
index 0000000..0e2cbc9
--- /dev/null
+++ b/asterix-graphix/src/test/resources/runtimets/queries/graphix/graph-isomorphism/graph-isomorphism.7.query.sqlpp
@@ -0,0 +1,34 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
+ *
+ *   http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied.  See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+
+// There should be results where (u) = (w) (i.e. only edge adjacency should be preserved).
+SET  `graphix.match-evaluation` "homomorphism";
+FROM GRAPH  VERTEX (:User)
+                   PRIMARY KEY (user_id)
+                   AS Yelp.Users,
+            EDGE   (:User)-[:FRIENDS_WITH]->(:User)
+                   SOURCE KEY (user_id)
+                   DESTINATION KEY (friend)
+                   AS ( FROM Yelp.Friends F
+                        SELECT F.user_id, F.friend )
+MATCH       (u)->(v), (v)->(w)
+SELECT      u.user_id AS u_user_id,
+            v.user_id AS v_user_id,
+            w.user_id AS w_user_id
+ORDER BY    u, v, w;
\ No newline at end of file
diff --git a/asterix-graphix/src/test/resources/metadata/queries/graphix/yelp-example/yelp-example.2.query.sqlpp b/asterix-graphix/src/test/resources/runtimets/queries/graphix/graphix-functions/graphix-functions.1.ddl.sqlpp
similarity index 60%
copy from asterix-graphix/src/test/resources/metadata/queries/graphix/yelp-example/yelp-example.2.query.sqlpp
copy to asterix-graphix/src/test/resources/runtimets/queries/graphix/graphix-functions/graphix-functions.1.ddl.sqlpp
index b8151af..b5525dc 100644
--- a/asterix-graphix/src/test/resources/metadata/queries/graphix/yelp-example/yelp-example.2.query.sqlpp
+++ b/asterix-graphix/src/test/resources/runtimets/queries/graphix/graphix-functions/graphix-functions.1.ddl.sqlpp
@@ -17,6 +17,21 @@
  * under the License.
  */
 
-FROM      `Metadata`.`Graph` G
-SELECT    G.DataverseName, G.GraphName, G.Dependencies, G.Vertices, G.Edges
-ORDER BY  G.DataverseName, G.GraphName;
+DROP DATAVERSE    Yelp IF EXISTS;
+CREATE DATAVERSE  Yelp;
+USE               Yelp;
+
+CREATE TYPE       UsersType
+AS                { user_id: bigint };
+CREATE DATASET    Users (UsersType)
+PRIMARY KEY       user_id;
+
+CREATE TYPE       FriendsType
+AS                { user_id: bigint, friend: bigint };
+CREATE DATASET    Friends (FriendsType)
+PRIMARY KEY       user_id, friend;
+
+CREATE TYPE       ReviewsType
+AS                { review_id: string };
+CREATE DATASET    Reviews (ReviewsType)
+PRIMARY KEY       review_id;
\ No newline at end of file
diff --git a/asterix-graphix/src/test/resources/metadata/queries/graphix/yelp-example/yelp-example.2.query.sqlpp b/asterix-graphix/src/test/resources/runtimets/queries/graphix/graphix-functions/graphix-functions.2.update.sqlpp
similarity index 62%
copy from asterix-graphix/src/test/resources/metadata/queries/graphix/yelp-example/yelp-example.2.query.sqlpp
copy to asterix-graphix/src/test/resources/runtimets/queries/graphix/graphix-functions/graphix-functions.2.update.sqlpp
index b8151af..b36158c 100644
--- a/asterix-graphix/src/test/resources/metadata/queries/graphix/yelp-example/yelp-example.2.query.sqlpp
+++ b/asterix-graphix/src/test/resources/runtimets/queries/graphix/graphix-functions/graphix-functions.2.update.sqlpp
@@ -17,6 +17,26 @@
  * under the License.
  */
 
-FROM      `Metadata`.`Graph` G
-SELECT    G.DataverseName, G.GraphName, G.Dependencies, G.Vertices, G.Edges
-ORDER BY  G.DataverseName, G.GraphName;
+USE               Yelp;
+
+INSERT INTO       Users [
+  { "user_id": 1 },
+  { "user_id": 2 },
+  { "user_id": 3 },
+  { "user_id": 4 },
+  { "user_id": 5 },
+  { "user_id": 6 }
+];
+
+INSERT INTO       Reviews [
+  { "review_id": "A", "user_id": 1 },
+  { "review_id": "B", "user_id": 2 }
+];
+
+INSERT INTO       Friends [
+  { "user_id": 1, "friend": 2 },
+  { "user_id": 2, "friend": 3 },
+  { "user_id": 3, "friend": 4 },
+  { "user_id": 4, "friend": 5 },
+  { "user_id": 5, "friend": 6 }
+];
\ No newline at end of file
diff --git a/asterix-graphix/src/test/resources/runtimets/queries/graphix/graphix-functions/graphix-functions.3.query.sqlpp b/asterix-graphix/src/test/resources/runtimets/queries/graphix/graphix-functions/graphix-functions.3.query.sqlpp
new file mode 100644
index 0000000..35463a2
--- /dev/null
+++ b/asterix-graphix/src/test/resources/runtimets/queries/graphix/graphix-functions/graphix-functions.3.query.sqlpp
@@ -0,0 +1,38 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
+ *
+ *   http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied.  See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+
+// Test each simple vertex function (label, key, properties, and detail).
+FROM GRAPH  VERTEX (:User)
+                   PRIMARY KEY (user_id)
+                   AS Yelp.Users,
+            VERTEX (:Review)
+                   PRIMARY KEY (review_id)
+                   AS Yelp.Reviews,
+            EDGE   (:User)<-[:MADE_BY]-(:Review)
+                   SOURCE KEY (review_id)
+                   DESTINATION KEY (user_id)
+                   AS ( FROM    Yelp.Reviews R
+                        SELECT  R.review_id,
+                                R.user_id )
+MATCH       (n)
+SELECT      VERTEX_KEY(n) AS vertexKey,
+            LABEL(n) AS vertexLabel,
+            VERTEX_PROPERTIES(n) AS vertexProperties,
+            VERTEX_DETAIL(n) AS vertexDetail
+ORDER BY    n;
\ No newline at end of file
diff --git a/asterix-graphix/src/test/resources/runtimets/queries/graphix/graphix-functions/graphix-functions.4.query.sqlpp b/asterix-graphix/src/test/resources/runtimets/queries/graphix/graphix-functions/graphix-functions.4.query.sqlpp
new file mode 100644
index 0000000..975b3f8
--- /dev/null
+++ b/asterix-graphix/src/test/resources/runtimets/queries/graphix/graphix-functions/graphix-functions.4.query.sqlpp
@@ -0,0 +1,50 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
+ *
+ *   http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied.  See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+
+// Test each simple edge function (direction, label, keys, detail, properties).
+FROM GRAPH  VERTEX (:User)
+                   PRIMARY KEY (user_id)
+                   AS Yelp.Users,
+            VERTEX (:Review)
+                   PRIMARY KEY (review_id)
+                   AS Yelp.Reviews,
+            EDGE   (:User)-[:FRIENDS_WITH]->(:User)
+                   SOURCE KEY (user_id)
+                   DESTINATION KEY (friend)
+                   AS ( FROM    Yelp.Friends F
+                        SELECT  F.user_id AS user_id,
+                                F.friend AS friend ),
+            EDGE   (:User)<-[:MADE_BY]-(:Review)
+                   SOURCE KEY (review_id)
+                   DESTINATION KEY (user_id)
+                   AS ( FROM    Yelp.Reviews R
+                        SELECT  R.review_id,
+                                R.user_id )
+MATCH       (n1)-[e]-(n2)
+SELECT      DIRECTION(e) AS direction,
+            SOURCE_KEY(e) AS sourceKeyValue,
+            DEST_KEY(e) AS destKeyValue,
+            SOURCE_VERTEX(e, n1, n2) AS sourceVertex,
+            DEST_VERTEX(e, n1, n2) AS destVertex,
+            EDGE_DETAIL(e) AS edgeDetail,
+            EDGE_PROPERTIES(e) AS edgeProperties,
+            LABEL(e) AS edgeLabel,
+            LABEL(n1) AS n1Label,
+            LABEL(n2) AS n2Label
+ORDER BY    n1, e, n2;
\ No newline at end of file
diff --git a/asterix-graphix/src/test/resources/runtimets/queries/graphix/graphix-functions/graphix-functions.5.query.sqlpp b/asterix-graphix/src/test/resources/runtimets/queries/graphix/graphix-functions/graphix-functions.5.query.sqlpp
new file mode 100644
index 0000000..3595efb
--- /dev/null
+++ b/asterix-graphix/src/test/resources/runtimets/queries/graphix/graphix-functions/graphix-functions.5.query.sqlpp
@@ -0,0 +1,53 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
+ *
+ *   http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied.  See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+
+// Test each path function (edges, hop-count, labels, vertices).
+FROM GRAPH  VERTEX (:User)
+                   PRIMARY KEY (user_id)
+                   AS ( FROM      Yelp.Users U
+                        SELECT    VALUE U
+                        ORDER BY  U.user_id
+                        LIMIT     2 ),
+            VERTEX (:Review)
+                   PRIMARY KEY (review_id)
+                   AS ( FROM      Yelp.Reviews R
+                        SELECT    VALUE R
+                        ORDER BY  R.review_id
+                        LIMIT     2 ),
+            EDGE   (:User)-[:FRIENDS_WITH]->(:User)
+                   SOURCE KEY (user_id)
+                   DESTINATION KEY (friend)
+                   AS ( FROM    Yelp.Friends F
+                        SELECT  F.user_id AS user_id,
+                                F.friend AS friend ),
+            EDGE   (:User)<-[:MADE_BY]-(:Review)
+                   SOURCE KEY (review_id)
+                   DESTINATION KEY (user_id)
+                   AS ( FROM    Yelp.Reviews R
+                        SELECT  R.review_id,
+                                R.user_id )
+MATCH       (n1)-[e:{1,1}]-(n2)-(n3) AS p
+SELECT      EDGES(p) AS pEdges,
+            EDGES(e) AS eEdges,
+            HOP_COUNT(p) AS pHopCount,
+            LABELS(p) AS pLabels,
+            LABELS(e) AS eLabels,
+            VERTICES(p) AS pVertices,
+            VERTICES(e) AS eVertices
+ORDER BY    n1, e, n2, n3;
\ No newline at end of file
diff --git a/asterix-graphix/src/test/resources/metadata/queries/graphix/yelp-example/yelp-example.2.query.sqlpp b/asterix-graphix/src/test/resources/runtimets/queries/graphix/inference-resolution/inference-resolution.1.ddl.sqlpp
similarity index 67%
copy from asterix-graphix/src/test/resources/metadata/queries/graphix/yelp-example/yelp-example.2.query.sqlpp
copy to asterix-graphix/src/test/resources/runtimets/queries/graphix/inference-resolution/inference-resolution.1.ddl.sqlpp
index b8151af..96ec87c 100644
--- a/asterix-graphix/src/test/resources/metadata/queries/graphix/yelp-example/yelp-example.2.query.sqlpp
+++ b/asterix-graphix/src/test/resources/runtimets/queries/graphix/inference-resolution/inference-resolution.1.ddl.sqlpp
@@ -17,6 +17,15 @@
  * under the License.
  */
 
-FROM      `Metadata`.`Graph` G
-SELECT    G.DataverseName, G.GraphName, G.Dependencies, G.Vertices, G.Edges
-ORDER BY  G.DataverseName, G.GraphName;
+DROP DATAVERSE    Yelp IF EXISTS;
+CREATE DATAVERSE  Yelp;
+USE               Yelp;
+
+CREATE TYPE       GenericType
+AS                { _id: uuid };
+CREATE DATASET    Friends (GenericType)
+PRIMARY KEY       _id AUTOGENERATED;
+CREATE DATASET    Reviews (GenericType)
+PRIMARY KEY       _id AUTOGENERATED;
+CREATE DATASET    Users (GenericType)
+PRIMARY KEY       _id AUTOGENERATED;
\ No newline at end of file
diff --git a/asterix-graphix/src/test/resources/runtimets/queries/graphix/inference-resolution/inference-resolution.2.update.sqlpp b/asterix-graphix/src/test/resources/runtimets/queries/graphix/inference-resolution/inference-resolution.2.update.sqlpp
new file mode 100644
index 0000000..0b7d8c5
--- /dev/null
+++ b/asterix-graphix/src/test/resources/runtimets/queries/graphix/inference-resolution/inference-resolution.2.update.sqlpp
@@ -0,0 +1,43 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
+ *
+ *   http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied.  See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+
+USE               Yelp;
+
+INSERT INTO       Users [
+  { "user_id": 1 },
+  { "user_id": 2 },
+  { "user_id": 3 },
+  { "user_id": 4 }
+];
+
+INSERT INTO       Friends [
+  { "user_id": 1, "friend": 2 },
+  { "user_id": 2, "friend": 3 },
+  { "user_id": 4, "friend": 2 },
+  { "user_id": 3, "friend": 2 }
+];
+
+INSERT INTO       Reviews [
+  { "review_id": "A", "user_id": 1 },
+  { "review_id": "B", "user_id": 1 },
+  { "review_id": "C", "user_id": 2 },
+  { "review_id": "D", "user_id": 3 },
+  { "review_id": "E", "user_id": 4 },
+  { "review_id": "F", "user_id": 5 }
+];
diff --git a/asterix-graphix/src/test/resources/runtimets/queries/graphix/inference-resolution/inference-resolution.3.query.sqlpp b/asterix-graphix/src/test/resources/runtimets/queries/graphix/inference-resolution/inference-resolution.3.query.sqlpp
new file mode 100644
index 0000000..700fe8f
--- /dev/null
+++ b/asterix-graphix/src/test/resources/runtimets/queries/graphix/inference-resolution/inference-resolution.3.query.sqlpp
@@ -0,0 +1,44 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
+ *
+ *   http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied.  See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+
+-- param max-warnings:string=1
+
+// We should be able to resolve both e and n, using the edge direction.
+SET         `graphix.resolver` "inference-based";
+FROM GRAPH  VERTEX (:User)
+                   PRIMARY KEY (user_id)
+                   AS ( FROM    Yelp.Users U
+                        SELECT  U.user_id ),
+            VERTEX (:Review)
+                   PRIMARY KEY (review_id)
+                   AS ( FROM    Yelp.Reviews R
+                        SELECT  R.review_id ),
+            EDGE   (:User)-[:FRIENDS_WITH]->(:User)
+                   SOURCE KEY (user_id)
+                   DESTINATION KEY (friend)
+                   AS ( FROM    Yelp.Friends F
+                        SELECT  F.user_id, F.friend ),
+            EDGE   (:Review)-[:MADE_BY]->(:User)
+                   SOURCE KEY (review_id)
+                   DESTINATION KEY (user_id)
+                   AS ( FROM    Yelp.Reviews R
+                        SELECT  R.review_id, R.user_id )
+MATCH       (u:User)-[e]->(n)
+SELECT      DISTINCT LABEL(e) AS e_label,
+                     LABEL(n) AS n_label;
diff --git a/asterix-graphix/src/test/resources/runtimets/queries/graphix/inference-resolution/inference-resolution.4.query.sqlpp b/asterix-graphix/src/test/resources/runtimets/queries/graphix/inference-resolution/inference-resolution.4.query.sqlpp
new file mode 100644
index 0000000..5533ede
--- /dev/null
+++ b/asterix-graphix/src/test/resources/runtimets/queries/graphix/inference-resolution/inference-resolution.4.query.sqlpp
@@ -0,0 +1,46 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
+ *
+ *   http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied.  See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+
+-- param max-warnings:string=1
+
+// We should be able to resolve all elements (e, n, f, m), using the edge direction of the last edge in our pattern.
+SET         `graphix.resolver` "inference-based";
+FROM GRAPH  VERTEX (:User)
+                   PRIMARY KEY (user_id)
+                   AS ( FROM    Yelp.Users U
+                        SELECT  U.user_id ),
+            VERTEX (:Review)
+                   PRIMARY KEY (review_id)
+                   AS ( FROM    Yelp.Reviews R
+                        SELECT  R.review_id ),
+            EDGE   (:User)-[:FRIENDS_WITH]->(:User)
+                   SOURCE KEY (user_id)
+                   DESTINATION KEY (friend)
+                   AS ( FROM    Yelp.Friends F
+                        SELECT  F.user_id, F.friend ),
+            EDGE   (:Review)-[:MADE_BY]->(:User)
+                   SOURCE KEY (review_id)
+                   DESTINATION KEY (user_id)
+                   AS ( FROM    Yelp.Reviews R
+                        SELECT  R.review_id, R.user_id )
+MATCH       (m)-[f]->(n)-[e]->(u:User)
+SELECT      DISTINCT LABEL(e) AS e_label,
+                     LABEL(n) AS n_label,
+                     LABEL(f) AS f_label,
+                     LABEL(m) AS m_label;
diff --git a/asterix-graphix/src/test/resources/runtimets/queries/graphix/inference-resolution/inference-resolution.5.query.sqlpp b/asterix-graphix/src/test/resources/runtimets/queries/graphix/inference-resolution/inference-resolution.5.query.sqlpp
new file mode 100644
index 0000000..df7e676
--- /dev/null
+++ b/asterix-graphix/src/test/resources/runtimets/queries/graphix/inference-resolution/inference-resolution.5.query.sqlpp
@@ -0,0 +1,47 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
+ *
+ *   http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied.  See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+
+-- param max-warnings:string=1
+
+// We should be able to resolve all elements (e, n, f, last direction), using the edge direction of the first pattern.
+SET         `graphix.resolver` "inference-based";
+FROM GRAPH  VERTEX (:User)
+                   PRIMARY KEY (user_id)
+                   AS ( FROM    Yelp.Users U
+                        SELECT  U.user_id ),
+            VERTEX (:Review)
+                   PRIMARY KEY (review_id)
+                   AS ( FROM    Yelp.Reviews R
+                        SELECT  R.review_id ),
+            EDGE   (:User)-[:FRIENDS_WITH]->(:User)
+                   SOURCE KEY (user_id)
+                   DESTINATION KEY (friend)
+                   AS ( FROM    Yelp.Friends F
+                        SELECT  F.user_id, F.friend ),
+            EDGE   (:Review)-[:MADE_BY]->(:User)
+                   SOURCE KEY (review_id)
+                   DESTINATION KEY (user_id)
+                   AS ( FROM    Yelp.Reviews R
+                        SELECT  R.review_id, R.user_id )
+MATCH       (u:User)-[e]->(n),
+            (n)-[f]-(r:Review)
+SELECT      DISTINCT LABEL(e) AS e_label,
+                     LABEL(n) AS n_label,
+                     LABEL(f) AS f_label,
+                     DIRECTION(f) AS f_direction;
diff --git a/asterix-graphix/src/test/resources/runtimets/queries/graphix/inference-resolution/inference-resolution.6.query.sqlpp b/asterix-graphix/src/test/resources/runtimets/queries/graphix/inference-resolution/inference-resolution.6.query.sqlpp
new file mode 100644
index 0000000..3d6e9a9
--- /dev/null
+++ b/asterix-graphix/src/test/resources/runtimets/queries/graphix/inference-resolution/inference-resolution.6.query.sqlpp
@@ -0,0 +1,47 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
+ *
+ *   http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied.  See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+
+-- param max-warnings:string=1
+
+// We should be able to resolve all elements (e, n, f, last direction), using the edge direction of the first pattern.
+SET         `graphix.resolver` "inference-based";
+FROM GRAPH  VERTEX (:User)
+                   PRIMARY KEY (user_id)
+                   AS ( FROM    Yelp.Users U
+                        SELECT  U.user_id ),
+            VERTEX (:Review)
+                   PRIMARY KEY (review_id)
+                   AS ( FROM    Yelp.Reviews R
+                        SELECT  R.review_id ),
+            EDGE   (:User)-[:FRIENDS_WITH]->(:User)
+                   SOURCE KEY (user_id)
+                   DESTINATION KEY (friend)
+                   AS ( FROM    Yelp.Friends F
+                        SELECT  F.user_id, F.friend ),
+            EDGE   (:Review)-[:MADE_BY]->(:User)
+                   SOURCE KEY (review_id)
+                   DESTINATION KEY (user_id)
+                   AS ( FROM    Yelp.Reviews R
+                        SELECT  R.review_id, R.user_id )
+MATCH       (u:User)-[e:{2,2}]->(n) // (u:User)-[]->()-[]->(n)
+UNNEST      e AS edgeRecord
+LET         ee = edgeRecord.`Edge`
+SELECT      DISTINCT LABEL(ee) AS e_label,
+                     LABEL(n) AS n_label,
+                     LEN(e) AS e_length;
diff --git a/asterix-graphix/src/test/resources/metadata/queries/graphix/yelp-example/yelp-example.2.query.sqlpp b/asterix-graphix/src/test/resources/runtimets/queries/graphix/left-match/left-match.1.ddl.sqlpp
similarity index 67%
copy from asterix-graphix/src/test/resources/metadata/queries/graphix/yelp-example/yelp-example.2.query.sqlpp
copy to asterix-graphix/src/test/resources/runtimets/queries/graphix/left-match/left-match.1.ddl.sqlpp
index b8151af..96ec87c 100644
--- a/asterix-graphix/src/test/resources/metadata/queries/graphix/yelp-example/yelp-example.2.query.sqlpp
+++ b/asterix-graphix/src/test/resources/runtimets/queries/graphix/left-match/left-match.1.ddl.sqlpp
@@ -17,6 +17,15 @@
  * under the License.
  */
 
-FROM      `Metadata`.`Graph` G
-SELECT    G.DataverseName, G.GraphName, G.Dependencies, G.Vertices, G.Edges
-ORDER BY  G.DataverseName, G.GraphName;
+DROP DATAVERSE    Yelp IF EXISTS;
+CREATE DATAVERSE  Yelp;
+USE               Yelp;
+
+CREATE TYPE       GenericType
+AS                { _id: uuid };
+CREATE DATASET    Friends (GenericType)
+PRIMARY KEY       _id AUTOGENERATED;
+CREATE DATASET    Reviews (GenericType)
+PRIMARY KEY       _id AUTOGENERATED;
+CREATE DATASET    Users (GenericType)
+PRIMARY KEY       _id AUTOGENERATED;
\ No newline at end of file
diff --git a/asterix-graphix/src/test/resources/runtimets/queries/graphix/left-match/left-match.2.update.sqlpp b/asterix-graphix/src/test/resources/runtimets/queries/graphix/left-match/left-match.2.update.sqlpp
new file mode 100644
index 0000000..e85ca82
--- /dev/null
+++ b/asterix-graphix/src/test/resources/runtimets/queries/graphix/left-match/left-match.2.update.sqlpp
@@ -0,0 +1,85 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
+ *
+ *   http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied.  See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+
+USE               Yelp;
+
+INSERT INTO       Users [
+  { "user_id": 1, "group_id": 3 },
+  { "user_id": 2, "group_id": 3 },
+  { "user_id": 3, "group_id": 3 }
+];
+INSERT INTO       Reviews [
+  { "review_id": "A", "user_id": 1, "group_id": 3 },
+  { "review_id": "B", "user_id": 2, "group_id": 3 },
+  { "review_id": "C", "user_id": 1, "group_id": 3 }
+];
+INSERT INTO       Friends [
+  { "user_id": 2, "friend": 3, "group_id": 3 },
+  { "user_id": 2, "friend": null, "group_id": 3 }
+];
+
+INSERT INTO       Users [
+  { "user_id": 1, "group_id": 4 },
+  { "user_id": 2, "group_id": 4 },
+  { "user_id": 3, "group_id": 4 }
+];
+INSERT INTO       Friends [
+  { "user_id": 1, "friend": 2, "group_id": 4 },
+  { "user_id": 2, "friend": 3, "group_id": 4 }
+];
+INSERT INTO       Reviews [
+  { "review_id": "A", "user_id": 2, "group_id": 4 }
+];
+
+INSERT INTO       Users [
+  { "user_id": 1, "group_id": 5 },
+  { "user_id": 2, "group_id": 5 },
+  { "user_id": 3, "group_id": 5 },
+  { "user_id": 4, "group_id": 5 },
+  { "user_id": 5, "group_id": 5 }
+];
+INSERT INTO       Friends [
+  { "user_id": 1, "friend": 2, "group_id": 5 },
+  { "user_id": 3, "friend": 1, "group_id": 5 },
+  { "user_id": 4, "friend": 1, "group_id": 5 },
+  { "user_id": 1, "friend": 4, "group_id": 5 }
+];
+INSERT INTO       Reviews [
+  { "review_id": "A", "user_id": 3, "group_id": 5 },
+  { "review_id": "B", "user_id": 4, "group_id": 5 },
+  { "review_id": "C", "user_id": 5, "group_id": 5 }
+];
+
+INSERT INTO       Users [
+  { "user_id": 1, "group_id": 6 },
+  { "user_id": 2, "group_id": 6 },
+  { "user_id": 3, "group_id": 6 },
+  { "user_id": 4, "group_id": 6 },
+  { "user_id": 5, "group_id": 6 }
+];
+INSERT INTO       Friends [
+  { "user_id": 1, "friend": 2, "group_id": 6 },
+  { "user_id": 1, "friend": 3, "group_id": 6 },
+  { "user_id": 3, "friend": 4, "group_id": 6 },
+  { "user_id": 3, "friend": 5, "group_id": 6 }
+];
+INSERT INTO       Reviews [
+  { "review_id": "A", "user_id": 2, "group_id": 6 },
+  { "review_id": "B", "user_id": 3, "group_id": 6 }
+];
diff --git a/asterix-graphix/src/test/resources/runtimets/queries/graphix/left-match/left-match.3.query.sqlpp b/asterix-graphix/src/test/resources/runtimets/queries/graphix/left-match/left-match.3.query.sqlpp
new file mode 100644
index 0000000..69e3592
--- /dev/null
+++ b/asterix-graphix/src/test/resources/runtimets/queries/graphix/left-match/left-match.3.query.sqlpp
@@ -0,0 +1,52 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
+ *
+ *   http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied.  See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+
+-- LEFT-MATCH query, with source of the LEFT-MATCH edge acting as connecting vertex.
+FROM GRAPH  VERTEX (:User)
+                   PRIMARY KEY (user_id)
+                   AS ( FROM    Yelp.Users U
+                        WHERE   U.group_id = 3
+                        SELECT  U.user_id ),
+            VERTEX (:Review)
+                   PRIMARY KEY (review_id)
+                   AS ( FROM    Yelp.Reviews R
+                        WHERE   R.group_id = 3
+                        SELECT  R.review_id ),
+            EDGE   (:Review)-[:MADE_BY]->(:User)
+                   SOURCE KEY (review_id)
+                   DESTINATION KEY (user_id)
+                   AS ( FROM    Yelp.Reviews R
+                        WHERE   R.group_id = 3
+                        SELECT  R.review_id, R.user_id ),
+            EDGE   (:User)-[:FRIENDS_WITH]->(:User)
+                   SOURCE KEY (user_id)
+                   DESTINATION KEY (friend)
+                   AS ( FROM    Yelp.Friends F
+                        WHERE   F.group_id = 3
+                        SELECT  F.user_id, F.friend )
+MATCH       (u1:User)<-[mb:MADE_BY]-(r:Review)
+LEFT MATCH  (u2:User)<-[fw:FRIENDS_WITH]-(u1)
+SELECT      u1.user_id AS u1_user_id,
+            fw.user_id AS fw_user_id,
+            fw.friend AS fw_friend,
+            u2.user_id AS u2_user_id,
+            mb.user_id AS mb_user_id,
+            mb.review_id AS mb_review_id,
+            r.review_id AS r_review_id
+ORDER BY    u1_user_id, u2_user_id, r_review_id;
\ No newline at end of file
diff --git a/asterix-graphix/src/test/resources/runtimets/queries/graphix/left-match/left-match.4.query.sqlpp b/asterix-graphix/src/test/resources/runtimets/queries/graphix/left-match/left-match.4.query.sqlpp
new file mode 100644
index 0000000..f4fe1cc
--- /dev/null
+++ b/asterix-graphix/src/test/resources/runtimets/queries/graphix/left-match/left-match.4.query.sqlpp
@@ -0,0 +1,52 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
+ *
+ *   http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied.  See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+
+-- LEFT-MATCH query, with destination of the LEFT-MATCH edge acting as connecting vertex.
+FROM GRAPH  VERTEX (:User)
+                   PRIMARY KEY (user_id)
+                   AS ( FROM    Yelp.Users U
+                        WHERE   U.group_id = 4
+                        SELECT  U.user_id ),
+            VERTEX (:Review)
+                   PRIMARY KEY (review_id)
+                   AS ( FROM    Yelp.Reviews R
+                        WHERE   R.group_id = 4
+                        SELECT  R.review_id ),
+            EDGE   (:Review)-[:MADE_BY]->(:User)
+                   SOURCE KEY (review_id)
+                   DESTINATION KEY (user_id)
+                   AS ( FROM    Yelp.Reviews R
+                        WHERE   R.group_id = 4
+                        SELECT  R.review_id, R.user_id ),
+            EDGE   (:User)-[:FRIENDS_WITH]->(:User)
+                   SOURCE KEY (user_id)
+                   DESTINATION KEY (friend)
+                   AS ( FROM    Yelp.Friends F
+                        WHERE   F.group_id = 4
+                        SELECT  F.user_id, F.friend )
+MATCH       (u2:User)<-[fw:FRIENDS_WITH]-(u1:User)
+LEFT MATCH  (u1)<-[mb:MADE_BY]-(r:Review)
+SELECT      u1.user_id AS u1_user_id,
+            fw.user_id AS fw_user_id,
+            fw.friend AS fw_friend,
+            u2.user_id AS u2_user_id,
+            mb.user_id AS mb_user_id,
+            mb.review_id AS mb_review_id,
+            r.review_id AS r_review_id
+ORDER BY    u1_user_id, u2_user_id, r_review_id;
\ No newline at end of file
diff --git a/asterix-graphix/src/test/resources/runtimets/queries/graphix/left-match/left-match.5.query.sqlpp b/asterix-graphix/src/test/resources/runtimets/queries/graphix/left-match/left-match.5.query.sqlpp
new file mode 100644
index 0000000..3f00813
--- /dev/null
+++ b/asterix-graphix/src/test/resources/runtimets/queries/graphix/left-match/left-match.5.query.sqlpp
@@ -0,0 +1,56 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
+ *
+ *   http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied.  See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+
+-- LEFT-MATCH query, with destination of the second LEFT-MATCH edge acting as connecting vertex.
+FROM GRAPH  VERTEX (:User)
+                   PRIMARY KEY (user_id)
+                   AS ( FROM    Yelp.Users U
+                        WHERE   U.group_id = 5
+                        SELECT  U.user_id ),
+            VERTEX (:Review)
+                   PRIMARY KEY (review_id)
+                   AS ( FROM    Yelp.Reviews R
+                        WHERE   R.group_id = 5
+                        SELECT  R.review_id ),
+            EDGE   (:Review)-[:MADE_BY]->(:User)
+                   SOURCE KEY (review_id)
+                   DESTINATION KEY (user_id)
+                   AS ( FROM    Yelp.Reviews R
+                        WHERE   R.group_id = 5
+                        SELECT  R.review_id, R.user_id ),
+            EDGE   (:User)-[:FRIENDS_WITH]->(:User)
+                   SOURCE KEY (user_id)
+                   DESTINATION KEY (friend)
+                   AS ( FROM    Yelp.Friends F
+                        WHERE   F.group_id = 5
+                        SELECT  F.user_id, F.friend )
+MATCH       (u2:User)<-[fw1:FRIENDS_WITH]-(u1:User)
+LEFT MATCH  (u3:User)<-[mb:MADE_BY]-(r:Review),
+            (u1)<-[fw2:FRIENDS_WITH]-(u3)
+SELECT      u1.user_id AS u1_user_id,
+            fw1.user_id AS fw1_user_id,
+            fw1.friend AS fw1_friend,
+            u2.user_id AS u2_user_id,
+            u3.user_id AS u3_user_id,
+            mb.user_id AS mb_user_id,
+            mb.review_id AS mb_review_id,
+            r.review_id AS r_review_id,
+            fw2.user_id AS fw2_user_id,
+            fw2.friend AS fw2_friend
+ORDER BY    u1_user_id, u2_user_id, u3_user_id, r_review_id;
\ No newline at end of file
diff --git a/asterix-graphix/src/test/resources/runtimets/queries/graphix/left-match/left-match.6.query.sqlpp b/asterix-graphix/src/test/resources/runtimets/queries/graphix/left-match/left-match.6.query.sqlpp
new file mode 100644
index 0000000..810e5fe
--- /dev/null
+++ b/asterix-graphix/src/test/resources/runtimets/queries/graphix/left-match/left-match.6.query.sqlpp
@@ -0,0 +1,56 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
+ *
+ *   http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied.  See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+
+-- Double LEFT-MATCH query.
+FROM GRAPH  VERTEX (:User)
+                   PRIMARY KEY (user_id)
+                   AS ( FROM    Yelp.Users U
+                        WHERE   U.group_id = 6
+                        SELECT  U.user_id ),
+            VERTEX (:Review)
+                   PRIMARY KEY (review_id)
+                   AS ( FROM    Yelp.Reviews R
+                        WHERE   R.group_id = 6
+                        SELECT  R.review_id ),
+            EDGE   (:Review)-[:MADE_BY]->(:User)
+                   SOURCE KEY (review_id)
+                   DESTINATION KEY (user_id)
+                   AS ( FROM    Yelp.Reviews R
+                        WHERE   R.group_id = 6
+                        SELECT  R.review_id, R.user_id ),
+            EDGE   (:User)-[:FRIENDS_WITH]->(:User)
+                   SOURCE KEY (user_id)
+                   DESTINATION KEY (friend)
+                   AS ( FROM    Yelp.Friends F
+                        WHERE   F.group_id = 6
+                        SELECT  F.user_id, F.friend )
+MATCH       (u2:User)<-[fw1:FRIENDS_WITH]-(u1:User)
+LEFT MATCH  (u2)<-[mb:MADE_BY]-(r:Review)
+LEFT MATCH  (u2)-[fw2:FRIENDS_WITH]->(u3:User)
+SELECT      u1.user_id AS u1_user_id,
+            fw1.user_id AS fw1_user_id,
+            fw1.friend AS fw1_friend,
+            u2.user_id AS u2_user_id,
+            mb.user_id AS mb_user_id,
+            mb.review_id AS mb_review_id,
+            r.review_id AS r_review_id,
+            fw2.user_id AS fw2_user_id,
+            fw2.friend AS fw2_friend,
+            u3.user_id AS u3_user_id
+ORDER BY    u1_user_id, u2_user_id, u3_user_id, r_review_id;
\ No newline at end of file
diff --git a/asterix-graphix/src/test/resources/metadata/queries/graphix/yelp-example/yelp-example.2.query.sqlpp b/asterix-graphix/src/test/resources/runtimets/queries/graphix/minimal-resolution/minimal-resolution.1.ddl.sqlpp
similarity index 67%
copy from asterix-graphix/src/test/resources/metadata/queries/graphix/yelp-example/yelp-example.2.query.sqlpp
copy to asterix-graphix/src/test/resources/runtimets/queries/graphix/minimal-resolution/minimal-resolution.1.ddl.sqlpp
index b8151af..96ec87c 100644
--- a/asterix-graphix/src/test/resources/metadata/queries/graphix/yelp-example/yelp-example.2.query.sqlpp
+++ b/asterix-graphix/src/test/resources/runtimets/queries/graphix/minimal-resolution/minimal-resolution.1.ddl.sqlpp
@@ -17,6 +17,15 @@
  * under the License.
  */
 
-FROM      `Metadata`.`Graph` G
-SELECT    G.DataverseName, G.GraphName, G.Dependencies, G.Vertices, G.Edges
-ORDER BY  G.DataverseName, G.GraphName;
+DROP DATAVERSE    Yelp IF EXISTS;
+CREATE DATAVERSE  Yelp;
+USE               Yelp;
+
+CREATE TYPE       GenericType
+AS                { _id: uuid };
+CREATE DATASET    Friends (GenericType)
+PRIMARY KEY       _id AUTOGENERATED;
+CREATE DATASET    Reviews (GenericType)
+PRIMARY KEY       _id AUTOGENERATED;
+CREATE DATASET    Users (GenericType)
+PRIMARY KEY       _id AUTOGENERATED;
\ No newline at end of file
diff --git a/asterix-graphix/src/test/resources/metadata/queries/graphix/yelp-example/yelp-example.2.query.sqlpp b/asterix-graphix/src/test/resources/runtimets/queries/graphix/minimal-resolution/minimal-resolution.2.update.sqlpp
similarity index 60%
copy from asterix-graphix/src/test/resources/metadata/queries/graphix/yelp-example/yelp-example.2.query.sqlpp
copy to asterix-graphix/src/test/resources/runtimets/queries/graphix/minimal-resolution/minimal-resolution.2.update.sqlpp
index b8151af..24fdd88 100644
--- a/asterix-graphix/src/test/resources/metadata/queries/graphix/yelp-example/yelp-example.2.query.sqlpp
+++ b/asterix-graphix/src/test/resources/runtimets/queries/graphix/minimal-resolution/minimal-resolution.2.update.sqlpp
@@ -17,6 +17,26 @@
  * under the License.
  */
 
-FROM      `Metadata`.`Graph` G
-SELECT    G.DataverseName, G.GraphName, G.Dependencies, G.Vertices, G.Edges
-ORDER BY  G.DataverseName, G.GraphName;
+USE               Yelp;
+
+INSERT INTO       Users [
+  { "user_id": 1 },
+  { "user_id": 2 },
+  { "user_id": 3 },
+  { "user_id": 4 }
+];
+
+INSERT INTO       Friends [
+  { "user_id": 1, "friend": 2 },
+  { "user_id": 4, "friend": 2 },
+  { "user_id": 3, "friend": 2 }
+];
+
+INSERT INTO       Reviews [
+  { "review_id": "A", "user_id": 1 },
+  { "review_id": "B", "user_id": 1 },
+  { "review_id": "C", "user_id": 2 },
+  { "review_id": "D", "user_id": 3 },
+  { "review_id": "E", "user_id": 4 },
+  { "review_id": "F", "user_id": 5 }
+];
diff --git a/asterix-graphix/src/test/resources/metadata/queries/graphix/yelp-example/yelp-example.2.query.sqlpp b/asterix-graphix/src/test/resources/runtimets/queries/graphix/minimal-resolution/minimal-resolution.3.query.sqlpp
similarity index 72%
copy from asterix-graphix/src/test/resources/metadata/queries/graphix/yelp-example/yelp-example.2.query.sqlpp
copy to asterix-graphix/src/test/resources/runtimets/queries/graphix/minimal-resolution/minimal-resolution.3.query.sqlpp
index b8151af..6b394d6 100644
--- a/asterix-graphix/src/test/resources/metadata/queries/graphix/yelp-example/yelp-example.2.query.sqlpp
+++ b/asterix-graphix/src/test/resources/runtimets/queries/graphix/minimal-resolution/minimal-resolution.3.query.sqlpp
@@ -17,6 +17,13 @@
  * under the License.
  */
 
-FROM      `Metadata`.`Graph` G
-SELECT    G.DataverseName, G.GraphName, G.Dependencies, G.Vertices, G.Edges
-ORDER BY  G.DataverseName, G.GraphName;
+-- param max-warnings:string=1
+
+// We should be able to determine that (u) is of label User.
+SET         `graphix.resolver` "no-resolution";
+FROM GRAPH  VERTEX (:User)
+                   PRIMARY KEY (user_id)
+                   AS Yelp.Users
+MATCH       (u)
+SELECT      u.user_id
+ORDER BY    u.user_id;
\ No newline at end of file
diff --git a/asterix-graphix/src/test/resources/metadata/queries/graphix/yelp-example/yelp-example.2.query.sqlpp b/asterix-graphix/src/test/resources/runtimets/queries/graphix/minimal-resolution/minimal-resolution.4.query.sqlpp
similarity index 63%
copy from asterix-graphix/src/test/resources/metadata/queries/graphix/yelp-example/yelp-example.2.query.sqlpp
copy to asterix-graphix/src/test/resources/runtimets/queries/graphix/minimal-resolution/minimal-resolution.4.query.sqlpp
index b8151af..e78aa4b 100644
--- a/asterix-graphix/src/test/resources/metadata/queries/graphix/yelp-example/yelp-example.2.query.sqlpp
+++ b/asterix-graphix/src/test/resources/runtimets/queries/graphix/minimal-resolution/minimal-resolution.4.query.sqlpp
@@ -17,6 +17,18 @@
  * under the License.
  */
 
-FROM      `Metadata`.`Graph` G
-SELECT    G.DataverseName, G.GraphName, G.Dependencies, G.Vertices, G.Edges
-ORDER BY  G.DataverseName, G.GraphName;
+-- param max-warnings:string=3
+
+// The (n) vertex should assume all defined vertex labels.
+SET         `graphix.resolver` "no-resolution";
+FROM GRAPH  VERTEX (:User)
+                   PRIMARY KEY (user_id)
+                   AS Yelp.Users,
+            VERTEX (:Review)
+                   PRIMARY KEY (review_id)
+                   AS Yelp.Reviews
+MATCH       (n)
+SELECT      n.user_id,
+            n.review_id
+ORDER BY    n.user_id,
+            n.review_id;
diff --git a/asterix-graphix/src/test/resources/runtimets/queries/graphix/minimal-resolution/minimal-resolution.5.query.sqlpp b/asterix-graphix/src/test/resources/runtimets/queries/graphix/minimal-resolution/minimal-resolution.5.query.sqlpp
new file mode 100644
index 0000000..1d4b4c2
--- /dev/null
+++ b/asterix-graphix/src/test/resources/runtimets/queries/graphix/minimal-resolution/minimal-resolution.5.query.sqlpp
@@ -0,0 +1,49 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
+ *
+ *   http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied.  See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+
+-- param max-warnings:string=3
+
+// The (n) and (m) vertices should assume all defined vertex labels, and (e) should assume all edge labels.
+SET         `graphix.resolver` "no-resolution";
+FROM GRAPH  VERTEX (:User)
+                   PRIMARY KEY (user_id)
+                   AS ( FROM    Yelp.Users U
+                        SELECT  U.user_id ),
+            VERTEX (:Review)
+                   PRIMARY KEY (review_id)
+                   AS ( FROM    Yelp.Reviews R
+                        SELECT  R.review_id ),
+            EDGE   (:Review)-[:MADE_BY]->(:User)
+                   SOURCE KEY (review_id)
+                   DESTINATION KEY (user_id)
+                   AS ( FROM    Yelp.Reviews R
+                        SELECT  R.review_id, R.user_id )
+MATCH       (m)-[e]-(n)
+SELECT      m.user_id AS left_user_id,
+            m.review_id AS left_review_id,
+            n.user_id AS right_user_id,
+            n.review_id AS right_review_id,
+            e.user_id AS e_user_id,
+            e.review_id AS e_review_id
+ORDER BY    left_user_id,
+            left_review_id,
+            right_user_id,
+            right_review_id,
+            e_user_id,
+            e_review_id;
\ No newline at end of file
diff --git a/asterix-graphix/src/test/resources/metadata/queries/graphix/yelp-example/yelp-example.2.query.sqlpp b/asterix-graphix/src/test/resources/runtimets/queries/graphix/on-query-error/on-query-error.1.ddl.sqlpp
similarity index 75%
copy from asterix-graphix/src/test/resources/metadata/queries/graphix/yelp-example/yelp-example.2.query.sqlpp
copy to asterix-graphix/src/test/resources/runtimets/queries/graphix/on-query-error/on-query-error.1.ddl.sqlpp
index b8151af..91a6fd9 100644
--- a/asterix-graphix/src/test/resources/metadata/queries/graphix/yelp-example/yelp-example.2.query.sqlpp
+++ b/asterix-graphix/src/test/resources/runtimets/queries/graphix/on-query-error/on-query-error.1.ddl.sqlpp
@@ -17,6 +17,12 @@
  * under the License.
  */
 
-FROM      `Metadata`.`Graph` G
-SELECT    G.DataverseName, G.GraphName, G.Dependencies, G.Vertices, G.Edges
-ORDER BY  G.DataverseName, G.GraphName;
+DROP DATAVERSE    TestDataverse IF EXISTS;
+CREATE DATAVERSE  TestDataverse;
+USE               TestDataverse;
+
+CREATE TYPE       GenericType
+AS                { _id: uuid };
+
+CREATE DATASET    GenericDataset (GenericType)
+PRIMARY KEY       _id AUTOGENERATED;
diff --git a/asterix-graphix/src/test/resources/metadata/queries/graphix/yelp-example/yelp-example.2.query.sqlpp b/asterix-graphix/src/test/resources/runtimets/queries/graphix/on-query-error/on-query-error.10.query.sqlpp
similarity index 60%
copy from asterix-graphix/src/test/resources/metadata/queries/graphix/yelp-example/yelp-example.2.query.sqlpp
copy to asterix-graphix/src/test/resources/runtimets/queries/graphix/on-query-error/on-query-error.10.query.sqlpp
index b8151af..bb550a0 100644
--- a/asterix-graphix/src/test/resources/metadata/queries/graphix/yelp-example/yelp-example.2.query.sqlpp
+++ b/asterix-graphix/src/test/resources/runtimets/queries/graphix/on-query-error/on-query-error.10.query.sqlpp
@@ -17,6 +17,15 @@
  * under the License.
  */
 
-FROM      `Metadata`.`Graph` G
-SELECT    G.DataverseName, G.GraphName, G.Dependencies, G.Vertices, G.Edges
-ORDER BY  G.DataverseName, G.GraphName;
+// Verify that scoping errors are recognized (in SELECT-CLAUSE).
+USE         TestDataverse;
+FROM GRAPH  VERTEX  (:Vertex1)
+                    PRIMARY KEY (_id)
+                    AS GenericDataset,
+            EDGE    (:Vertex1)-[:EDGE_1]->(:Vertex1)
+                    SOURCE KEY (_id)
+                    DESTINATION KEY (_to_id)
+                    AS ( FROM    GenericDataset GD
+                         SELECT  GD._id, GD._to_id )
+MATCH       (v1:Vertex1)-[:EDGE_1]-(v2:Vertex1)
+SELECT      v1, v2, invalidVariable;
diff --git a/asterix-graphix/src/test/resources/runtimets/queries/graphix/on-query-error/on-query-error.11.query.sqlpp b/asterix-graphix/src/test/resources/runtimets/queries/graphix/on-query-error/on-query-error.11.query.sqlpp
new file mode 100644
index 0000000..7ecaf84
--- /dev/null
+++ b/asterix-graphix/src/test/resources/runtimets/queries/graphix/on-query-error/on-query-error.11.query.sqlpp
@@ -0,0 +1,32 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
+ *
+ *   http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied.  See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+
+// Verify that scoping errors are recognized (in LET-CLAUSE).
+USE         TestDataverse;
+FROM GRAPH  VERTEX  (:Vertex1)
+                    PRIMARY KEY (_id)
+                    AS GenericDataset,
+            EDGE    (:Vertex1)-[:EDGE_1]->(:Vertex1)
+                    SOURCE KEY (_id)
+                    DESTINATION KEY (_to_id)
+                    AS ( FROM    GenericDataset GD
+                         SELECT  GD._id, GD._to_id )
+MATCH       (v1:Vertex1)-[:EDGE_1]-(v2:Vertex1)
+LET         myValue = invalidVariable
+SELECT      v1, v2, myValue;
diff --git a/asterix-graphix/src/test/resources/runtimets/queries/graphix/on-query-error/on-query-error.12.query.sqlpp b/asterix-graphix/src/test/resources/runtimets/queries/graphix/on-query-error/on-query-error.12.query.sqlpp
new file mode 100644
index 0000000..a1db50d
--- /dev/null
+++ b/asterix-graphix/src/test/resources/runtimets/queries/graphix/on-query-error/on-query-error.12.query.sqlpp
@@ -0,0 +1,34 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
+ *
+ *   http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied.  See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+
+// Verify that scoping errors are recognized (in JOIN-CLAUSE).
+USE         TestDataverse;
+FROM GRAPH  VERTEX  (:Vertex1)
+                    PRIMARY KEY (_id)
+                    AS GenericDataset,
+            EDGE    (:Vertex1)-[:EDGE_1]->(:Vertex1)
+                    SOURCE KEY (_id)
+                    DESTINATION KEY (_to_id)
+                    AS ( FROM    GenericDataset GD
+                         SELECT  GD._id, GD._to_id )
+MATCH       (v1:Vertex1)-[:EDGE_1]-(v2:Vertex1)
+JOIN        ( FROM GenericDataset GD
+              SELECT GD._id ) GD
+ON          GD._id = v1._id AND invalidVariable = 3
+SELECT      v1, v2, GD;
diff --git a/asterix-graphix/src/test/resources/metadata/queries/graphix/yelp-example/yelp-example.2.query.sqlpp b/asterix-graphix/src/test/resources/runtimets/queries/graphix/on-query-error/on-query-error.2.query.sqlpp
similarity index 60%
copy from asterix-graphix/src/test/resources/metadata/queries/graphix/yelp-example/yelp-example.2.query.sqlpp
copy to asterix-graphix/src/test/resources/runtimets/queries/graphix/on-query-error/on-query-error.2.query.sqlpp
index b8151af..95a4bb5 100644
--- a/asterix-graphix/src/test/resources/metadata/queries/graphix/yelp-example/yelp-example.2.query.sqlpp
+++ b/asterix-graphix/src/test/resources/runtimets/queries/graphix/on-query-error/on-query-error.2.query.sqlpp
@@ -17,6 +17,16 @@
  * under the License.
  */
 
-FROM      `Metadata`.`Graph` G
-SELECT    G.DataverseName, G.GraphName, G.Dependencies, G.Vertices, G.Edges
-ORDER BY  G.DataverseName, G.GraphName;
+// Verify that a vertex cannot be defined with a label more than once.
+USE         TestDataverse;
+FROM GRAPH  VERTEX  (:Vertex1)
+                    PRIMARY KEY (_id)
+                    AS GenericDataset,
+            EDGE    (:Vertex1)-[:EDGE_1]->(:Vertex1)
+                    SOURCE KEY (_id)
+                    DESTINATION KEY (_to_id)
+                    AS ( FROM    GenericDataset GD
+                         SELECT  GD._id, GD._to_id )
+MATCH       (v:Vertex1)-[]-(),
+            (v:Vertex1)-[]-()
+SELECT      v;
diff --git a/asterix-graphix/src/test/resources/metadata/queries/graphix/yelp-example/yelp-example.2.query.sqlpp b/asterix-graphix/src/test/resources/runtimets/queries/graphix/on-query-error/on-query-error.3.query.sqlpp
similarity index 60%
copy from asterix-graphix/src/test/resources/metadata/queries/graphix/yelp-example/yelp-example.2.query.sqlpp
copy to asterix-graphix/src/test/resources/runtimets/queries/graphix/on-query-error/on-query-error.3.query.sqlpp
index b8151af..3f397af 100644
--- a/asterix-graphix/src/test/resources/metadata/queries/graphix/yelp-example/yelp-example.2.query.sqlpp
+++ b/asterix-graphix/src/test/resources/runtimets/queries/graphix/on-query-error/on-query-error.3.query.sqlpp
@@ -17,6 +17,16 @@
  * under the License.
  */
 
-FROM      `Metadata`.`Graph` G
-SELECT    G.DataverseName, G.GraphName, G.Dependencies, G.Vertices, G.Edges
-ORDER BY  G.DataverseName, G.GraphName;
+// Verify that an edge cannot be defined more than once.
+USE         TestDataverse;
+FROM GRAPH  VERTEX  (:Vertex1)
+                    PRIMARY KEY (_id)
+                    AS GenericDataset,
+            EDGE    (:Vertex1)-[:EDGE_1]->(:Vertex1)
+                    SOURCE KEY (_id)
+                    DESTINATION KEY (_to_id)
+                    AS ( FROM    GenericDataset GD
+                         SELECT  GD._id, GD._to_id )
+MATCH       (v1)-[e]-(v3),
+            (v2)-[e]-(v4)
+SELECT      v1, v2, v3, v4, e;
diff --git a/asterix-graphix/src/test/resources/runtimets/queries/graphix/on-query-error/on-query-error.4.query.sqlpp b/asterix-graphix/src/test/resources/runtimets/queries/graphix/on-query-error/on-query-error.4.query.sqlpp
new file mode 100644
index 0000000..3ca72bb
--- /dev/null
+++ b/asterix-graphix/src/test/resources/runtimets/queries/graphix/on-query-error/on-query-error.4.query.sqlpp
@@ -0,0 +1,32 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
+ *
+ *   http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied.  See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+
+// Verify that the vertex label used in a query exists in the graph schema.
+USE         TestDataverse;
+FROM GRAPH  VERTEX  (:Vertex1)
+                    PRIMARY KEY (_id)
+                    AS GenericDataset,
+            EDGE    (:Vertex1)-[:EDGE_1]->(:Vertex1)
+                    SOURCE KEY (_id)
+                    DESTINATION KEY (_to_id)
+                    AS ( FROM    GenericDataset GD
+                         SELECT  GD._id, GD._to_id )
+MATCH       (v1:NonExistentLabel)-[e1]-(v3),
+            (v2)-[e2]-(v4)
+SELECT      v1, v2, v3, v4, e1, e2;
diff --git a/asterix-graphix/src/test/resources/runtimets/queries/graphix/on-query-error/on-query-error.5.query.sqlpp b/asterix-graphix/src/test/resources/runtimets/queries/graphix/on-query-error/on-query-error.5.query.sqlpp
new file mode 100644
index 0000000..d3207d1
--- /dev/null
+++ b/asterix-graphix/src/test/resources/runtimets/queries/graphix/on-query-error/on-query-error.5.query.sqlpp
@@ -0,0 +1,32 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
+ *
+ *   http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied.  See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+
+// Verify that the edge label used in a query exists in the graph schema.
+USE         TestDataverse;
+FROM GRAPH  VERTEX  (:Vertex1)
+                    PRIMARY KEY (_id)
+                    AS GenericDataset,
+            EDGE    (:Vertex1)-[:EDGE_1]->(:Vertex1)
+                    SOURCE KEY (_id)
+                    DESTINATION KEY (_to_id)
+                    AS ( FROM    GenericDataset GD
+                         SELECT  GD._id, GD._to_id )
+MATCH       (v1:Vertex1)-[e1:NON_EXISTENT_EDGE]-(v3),
+            (v2)-[e2]-(v4)
+SELECT      v1, v2, v3, v4, e1, e2;
diff --git a/asterix-graphix/src/test/resources/metadata/queries/graphix/yelp-example/yelp-example.2.query.sqlpp b/asterix-graphix/src/test/resources/runtimets/queries/graphix/on-query-error/on-query-error.6.query.sqlpp
similarity index 75%
copy from asterix-graphix/src/test/resources/metadata/queries/graphix/yelp-example/yelp-example.2.query.sqlpp
copy to asterix-graphix/src/test/resources/runtimets/queries/graphix/on-query-error/on-query-error.6.query.sqlpp
index b8151af..5b5cdf7 100644
--- a/asterix-graphix/src/test/resources/metadata/queries/graphix/yelp-example/yelp-example.2.query.sqlpp
+++ b/asterix-graphix/src/test/resources/runtimets/queries/graphix/on-query-error/on-query-error.6.query.sqlpp
@@ -17,6 +17,10 @@
  * under the License.
  */
 
-FROM      `Metadata`.`Graph` G
-SELECT    G.DataverseName, G.GraphName, G.Dependencies, G.Vertices, G.Edges
-ORDER BY  G.DataverseName, G.GraphName;
+// Verify that a schema constructor exists when a query edge exists.
+USE         TestDataverse;
+FROM GRAPH  VERTEX  (:Vertex1)
+                    PRIMARY KEY (_id)
+                    AS GenericDataset
+MATCH       (v1:Vertex1)-[]-(v3)
+SELECT      v1, v3;
diff --git a/asterix-graphix/src/test/resources/metadata/queries/graphix/yelp-example/yelp-example.2.query.sqlpp b/asterix-graphix/src/test/resources/runtimets/queries/graphix/on-query-error/on-query-error.7.query.sqlpp
similarity index 61%
copy from asterix-graphix/src/test/resources/metadata/queries/graphix/yelp-example/yelp-example.2.query.sqlpp
copy to asterix-graphix/src/test/resources/runtimets/queries/graphix/on-query-error/on-query-error.7.query.sqlpp
index b8151af..abb140e 100644
--- a/asterix-graphix/src/test/resources/metadata/queries/graphix/yelp-example/yelp-example.2.query.sqlpp
+++ b/asterix-graphix/src/test/resources/runtimets/queries/graphix/on-query-error/on-query-error.7.query.sqlpp
@@ -17,6 +17,15 @@
  * under the License.
  */
 
-FROM      `Metadata`.`Graph` G
-SELECT    G.DataverseName, G.GraphName, G.Dependencies, G.Vertices, G.Edges
-ORDER BY  G.DataverseName, G.GraphName;
+// Verify that the maximum number hops for an edge is not zero.
+USE         TestDataverse;
+FROM GRAPH  VERTEX  (:Vertex1)
+                    PRIMARY KEY (_id)
+                    AS GenericDataset,
+            EDGE    (:Vertex1)-[:EDGE_1]->(:Vertex1)
+                    SOURCE KEY (_id)
+                    DESTINATION KEY (_to_id)
+                    AS ( FROM    GenericDataset GD
+                         SELECT  GD._id, GD._to_id )
+MATCH       (v1:Vertex1)-[:EDGE_1{,0}]-(v2:Vertex1)
+SELECT      v1, v2;
diff --git a/asterix-graphix/src/test/resources/metadata/queries/graphix/yelp-example/yelp-example.2.query.sqlpp b/asterix-graphix/src/test/resources/runtimets/queries/graphix/on-query-error/on-query-error.8.query.sqlpp
similarity index 60%
copy from asterix-graphix/src/test/resources/metadata/queries/graphix/yelp-example/yelp-example.2.query.sqlpp
copy to asterix-graphix/src/test/resources/runtimets/queries/graphix/on-query-error/on-query-error.8.query.sqlpp
index b8151af..bb6f2b0 100644
--- a/asterix-graphix/src/test/resources/metadata/queries/graphix/yelp-example/yelp-example.2.query.sqlpp
+++ b/asterix-graphix/src/test/resources/runtimets/queries/graphix/on-query-error/on-query-error.8.query.sqlpp
@@ -17,6 +17,15 @@
  * under the License.
  */
 
-FROM      `Metadata`.`Graph` G
-SELECT    G.DataverseName, G.GraphName, G.Dependencies, G.Vertices, G.Edges
-ORDER BY  G.DataverseName, G.GraphName;
+// Verify that the maximum number of hops is never less than the minimum.
+USE         TestDataverse;
+FROM GRAPH  VERTEX  (:Vertex1)
+                    PRIMARY KEY (_id)
+                    AS GenericDataset,
+            EDGE    (:Vertex1)-[:EDGE_1]->(:Vertex1)
+                    SOURCE KEY (_id)
+                    DESTINATION KEY (_to_id)
+                    AS ( FROM    GenericDataset GD
+                         SELECT  GD._id, GD._to_id )
+MATCH       (v1:Vertex1)-[:EDGE_1{4,2}]-(v2:Vertex1)
+SELECT      v1, v2;
diff --git a/asterix-graphix/src/test/resources/runtimets/queries/graphix/on-query-error/on-query-error.9.query.sqlpp b/asterix-graphix/src/test/resources/runtimets/queries/graphix/on-query-error/on-query-error.9.query.sqlpp
new file mode 100644
index 0000000..ea9aeb8
--- /dev/null
+++ b/asterix-graphix/src/test/resources/runtimets/queries/graphix/on-query-error/on-query-error.9.query.sqlpp
@@ -0,0 +1,34 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
+ *
+ *   http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied.  See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+
+// Verify that our graph schema is valid for anonymous graphs.
+USE         TestDataverse;
+FROM GRAPH  VERTEX  (:Vertex1)
+                    PRIMARY KEY (_id)
+                    AS GenericDataset,
+            VERTEX  (:Vertex1)
+                    PRIMARY KEY (_other_id)
+                    AS GenericDataset,
+            EDGE    (:Vertex1)-[:EDGE_1]->(:Vertex1)
+                    SOURCE KEY (_id)
+                    DESTINATION KEY (_to_id)
+                    AS ( FROM    GenericDataset GD
+                         SELECT  GD._id, GD._to_id )
+MATCH       (v1:Vertex1)-[:EDGE_1]-(v2:Vertex1)
+SELECT      v1, v2;
diff --git a/asterix-graphix/src/test/resources/metadata/queries/graphix/yelp-example/yelp-example.2.query.sqlpp b/asterix-graphix/src/test/resources/runtimets/queries/graphix/path-variable/path-variable.1.ddl.sqlpp
similarity index 60%
copy from asterix-graphix/src/test/resources/metadata/queries/graphix/yelp-example/yelp-example.2.query.sqlpp
copy to asterix-graphix/src/test/resources/runtimets/queries/graphix/path-variable/path-variable.1.ddl.sqlpp
index b8151af..4dca0dc 100644
--- a/asterix-graphix/src/test/resources/metadata/queries/graphix/yelp-example/yelp-example.2.query.sqlpp
+++ b/asterix-graphix/src/test/resources/runtimets/queries/graphix/path-variable/path-variable.1.ddl.sqlpp
@@ -17,6 +17,21 @@
  * under the License.
  */
 
-FROM      `Metadata`.`Graph` G
-SELECT    G.DataverseName, G.GraphName, G.Dependencies, G.Vertices, G.Edges
-ORDER BY  G.DataverseName, G.GraphName;
+DROP DATAVERSE    Yelp IF EXISTS;
+CREATE DATAVERSE  Yelp;
+USE               Yelp;
+
+CREATE TYPE       UsersType
+AS                { user_id: bigint };
+CREATE DATASET    Users (UsersType)
+PRIMARY KEY       user_id;
+
+CREATE TYPE       FriendsType
+AS                { user_id: bigint, friend: bigint };
+CREATE DATASET    Friends (FriendsType)
+PRIMARY KEY       user_id, friend;
+
+CREATE TYPE       ReviewsType
+AS                { review_id: string };
+CREATE DATASET    Reviews (ReviewsType)
+PRIMARY KEY       review_id;
diff --git a/asterix-graphix/src/test/resources/runtimets/queries/graphix/path-variable/path-variable.2.update.sqlpp b/asterix-graphix/src/test/resources/runtimets/queries/graphix/path-variable/path-variable.2.update.sqlpp
new file mode 100644
index 0000000..96a4ef6
--- /dev/null
+++ b/asterix-graphix/src/test/resources/runtimets/queries/graphix/path-variable/path-variable.2.update.sqlpp
@@ -0,0 +1,42 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
+ *
+ *   http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied.  See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+
+USE               Yelp;
+
+INSERT INTO       Users [
+  { "user_id": 1, "best_friend": 2 },
+  { "user_id": 2, "best_friend": 3 },
+  { "user_id": 3 },
+  { "user_id": 4 }
+];
+
+INSERT INTO       Friends [
+  { "user_id": 1, "friend": 2, "friend_group": "A" },
+  { "user_id": 2, "friend": 3, "friend_group": "A" },
+  { "user_id": 3, "friend": 4, "friend_group": "B" }
+];
+
+INSERT INTO       Reviews [
+  { "review_id": "A", "user_id": 1 },
+  { "review_id": "B", "user_id": 1 },
+  { "review_id": "C", "user_id": 1 },
+  { "review_id": "D", "user_id": 2 },
+  { "review_id": "E", "user_id": 3 },
+  { "review_id": "F", "user_id": 4 }
+];
diff --git a/asterix-graphix/src/test/resources/metadata/queries/graphix/yelp-example/yelp-example.2.query.sqlpp b/asterix-graphix/src/test/resources/runtimets/queries/graphix/path-variable/path-variable.3.query.sqlpp
similarity index 72%
copy from asterix-graphix/src/test/resources/metadata/queries/graphix/yelp-example/yelp-example.2.query.sqlpp
copy to asterix-graphix/src/test/resources/runtimets/queries/graphix/path-variable/path-variable.3.query.sqlpp
index b8151af..e110262 100644
--- a/asterix-graphix/src/test/resources/metadata/queries/graphix/yelp-example/yelp-example.2.query.sqlpp
+++ b/asterix-graphix/src/test/resources/runtimets/queries/graphix/path-variable/path-variable.3.query.sqlpp
@@ -17,6 +17,12 @@
  * under the License.
  */
 
-FROM      `Metadata`.`Graph` G
-SELECT    G.DataverseName, G.GraphName, G.Dependencies, G.Vertices, G.Edges
-ORDER BY  G.DataverseName, G.GraphName;
+// Single vertex path.
+FROM GRAPH  VERTEX (:User)
+                   PRIMARY KEY (user_id)
+                   AS Yelp.Users
+MATCH       (u) AS p
+UNNEST      p AS edgeRecord
+SELECT      PATH_HOP_COUNT(p) AS pathLength,
+            edgeRecord
+ORDER BY    u.user_id, VERTEX_KEY(edgeRecord.LeftVertex);
diff --git a/asterix-graphix/src/test/resources/runtimets/queries/graphix/path-variable/path-variable.4.query.sqlpp b/asterix-graphix/src/test/resources/runtimets/queries/graphix/path-variable/path-variable.4.query.sqlpp
new file mode 100644
index 0000000..a96f62a
--- /dev/null
+++ b/asterix-graphix/src/test/resources/runtimets/queries/graphix/path-variable/path-variable.4.query.sqlpp
@@ -0,0 +1,39 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
+ *
+ *   http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied.  See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+
+// Single edge path.
+FROM GRAPH  VERTEX (:User)
+                   PRIMARY KEY (user_id)
+                   AS Yelp.Users,
+            VERTEX (:Review)
+                   PRIMARY KEY (review_id)
+                   AS Yelp.Reviews,
+            EDGE   (:Review)-[:MADE_BY]->(:User)
+                   SOURCE KEY (review_id)
+                   DESTINATION KEY (user_id)
+                   AS ( FROM    Yelp.Reviews R
+                        SELECT  R.review_id, R.user_id )
+MATCH       (u:User)<-[:MADE_BY]-(r:Review) AS p
+UNNEST      p AS edgeRecord
+SELECT      PATH_HOP_COUNT(p) AS pathLength,
+            edgeRecord
+ORDER BY    u.user_id,
+            r.review_d,
+            VERTEX_KEY(edgeRecord.LeftVertex),
+            SOURCE_KEY(edgeRecord.`Edge`);
diff --git a/asterix-graphix/src/test/resources/runtimets/queries/graphix/path-variable/path-variable.5.query.sqlpp b/asterix-graphix/src/test/resources/runtimets/queries/graphix/path-variable/path-variable.5.query.sqlpp
new file mode 100644
index 0000000..13078e0
--- /dev/null
+++ b/asterix-graphix/src/test/resources/runtimets/queries/graphix/path-variable/path-variable.5.query.sqlpp
@@ -0,0 +1,38 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
+ *
+ *   http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied.  See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+
+// Two bidirectional edges path.
+FROM GRAPH  VERTEX (:User)
+                   PRIMARY KEY (user_id)
+                   AS Yelp.Users,
+            EDGE   (:User)-[:FRIENDS_WITH]->(:User)
+                   SOURCE KEY (user_id)
+                   DESTINATION KEY (friend)
+                   AS ( FROM    Yelp.Friends F
+                        WHERE   F.friend_group = "A"
+                        SELECT  F.user_id, F.friend )
+MATCH       (u)-[e1]-(v)-[e2]-(w) AS p
+UNNEST      p AS edgeRecord
+SELECT      PATH_HOP_COUNT(p) AS pathLength,
+            edgeRecord
+ORDER BY    u.user_id,
+            v.user_id,
+            w.user_id,
+            VERTEX_KEY(edgeRecord.LeftVertex),
+            SOURCE_KEY(edgeRecord.`Edge`);
\ No newline at end of file
diff --git a/asterix-graphix/src/test/resources/runtimets/queries/graphix/path-variable/path-variable.6.query.sqlpp b/asterix-graphix/src/test/resources/runtimets/queries/graphix/path-variable/path-variable.6.query.sqlpp
new file mode 100644
index 0000000..ffef1a7
--- /dev/null
+++ b/asterix-graphix/src/test/resources/runtimets/queries/graphix/path-variable/path-variable.6.query.sqlpp
@@ -0,0 +1,37 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
+ *
+ *   http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied.  See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+
+// An undirected variable-hop sub-path located within a path.
+FROM GRAPH  VERTEX (:User)
+                   PRIMARY KEY (user_id)
+                   AS Yelp.Users,
+            EDGE   (:User)-[:FRIENDS_WITH]->(:User)
+                   SOURCE KEY (user_id)
+                   DESTINATION KEY (friend)
+                   AS ( FROM    Yelp.Friends F
+                        WHERE   F.friend_group = "A"
+                        SELECT  F.user_id, F.friend )
+MATCH       (u)-[e1:{1,2}]-(v) AS p
+UNNEST      p AS edgeRecord
+SELECT      PATH_HOP_COUNT(p) AS pathLength,
+            edgeRecord
+ORDER BY    u.user_id,
+            v.user_id,
+            VERTEX_KEY(edgeRecord.LeftVertex),
+            SOURCE_KEY(edgeRecord.`Edge`);
\ No newline at end of file
diff --git a/asterix-graphix/src/test/resources/metadata/queries/graphix/yelp-example/yelp-example.2.query.sqlpp b/asterix-graphix/src/test/resources/runtimets/queries/graphix/scope-checking/scope-checking.1.ddl.sqlpp
similarity index 60%
copy from asterix-graphix/src/test/resources/metadata/queries/graphix/yelp-example/yelp-example.2.query.sqlpp
copy to asterix-graphix/src/test/resources/runtimets/queries/graphix/scope-checking/scope-checking.1.ddl.sqlpp
index b8151af..4dca0dc 100644
--- a/asterix-graphix/src/test/resources/metadata/queries/graphix/yelp-example/yelp-example.2.query.sqlpp
+++ b/asterix-graphix/src/test/resources/runtimets/queries/graphix/scope-checking/scope-checking.1.ddl.sqlpp
@@ -17,6 +17,21 @@
  * under the License.
  */
 
-FROM      `Metadata`.`Graph` G
-SELECT    G.DataverseName, G.GraphName, G.Dependencies, G.Vertices, G.Edges
-ORDER BY  G.DataverseName, G.GraphName;
+DROP DATAVERSE    Yelp IF EXISTS;
+CREATE DATAVERSE  Yelp;
+USE               Yelp;
+
+CREATE TYPE       UsersType
+AS                { user_id: bigint };
+CREATE DATASET    Users (UsersType)
+PRIMARY KEY       user_id;
+
+CREATE TYPE       FriendsType
+AS                { user_id: bigint, friend: bigint };
+CREATE DATASET    Friends (FriendsType)
+PRIMARY KEY       user_id, friend;
+
+CREATE TYPE       ReviewsType
+AS                { review_id: string };
+CREATE DATASET    Reviews (ReviewsType)
+PRIMARY KEY       review_id;
diff --git a/asterix-graphix/src/test/resources/runtimets/queries/graphix/scope-checking/scope-checking.2.update.sqlpp b/asterix-graphix/src/test/resources/runtimets/queries/graphix/scope-checking/scope-checking.2.update.sqlpp
new file mode 100644
index 0000000..d42899e
--- /dev/null
+++ b/asterix-graphix/src/test/resources/runtimets/queries/graphix/scope-checking/scope-checking.2.update.sqlpp
@@ -0,0 +1,43 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
+ *
+ *   http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied.  See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+
+USE               Yelp;
+
+INSERT INTO       Users [
+  { "user_id": 1 },
+  { "user_id": 2 },
+  { "user_id": 3 },
+  { "user_id": 4 }
+];
+
+INSERT INTO       Friends [
+  { "user_id": 1, "friend": 2 },
+  { "user_id": 2, "friend": 3 },
+  { "user_id": 3, "friend": 4 },
+  { "user_id": 1, "friend": 3 }
+];
+
+INSERT INTO       Reviews [
+  { "review_id": "A", "user_id": 1 },
+  { "review_id": "B", "user_id": 1 },
+  { "review_id": "C", "user_id": 1 },
+  { "review_id": "D", "user_id": 2 },
+  { "review_id": "E", "user_id": 3 },
+  { "review_id": "F", "user_id": 4 }
+];
diff --git a/asterix-graphix/src/test/resources/runtimets/queries/graphix/scope-checking/scope-checking.3.query.sqlpp b/asterix-graphix/src/test/resources/runtimets/queries/graphix/scope-checking/scope-checking.3.query.sqlpp
new file mode 100644
index 0000000..8122ce1
--- /dev/null
+++ b/asterix-graphix/src/test/resources/runtimets/queries/graphix/scope-checking/scope-checking.3.query.sqlpp
@@ -0,0 +1,42 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
+ *
+ *   http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied.  See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+
+// Subquery expressing anti-join of patterns.
+FROM GRAPH  VERTEX (:User)
+                   PRIMARY KEY (user_id)
+                   AS Yelp.Users,
+            VERTEX (:Review)
+                   PRIMARY KEY (review_id)
+                   AS Yelp.Reviews,
+            EDGE   (:Review)-[:MADE_BY]->(:User)
+                   SOURCE KEY (review_id)
+                   DESTINATION KEY (user_id)
+                   AS ( FROM    Yelp.Reviews R
+                        SELECT  R.review_id, R.user_id )
+MATCH       (u:User)<-(r)
+WHERE       NOT EXISTS ( FROM GRAPH   VERTEX (:User)
+                                      PRIMARY KEY (user_id)
+                                      AS ( FROM    Yelp.Users U
+                                           WHERE   U.user_id = 1
+                                           SELECT  VALUE U )
+                          MATCH       (innerU:User)
+                          WHERE       innerU = u
+                          SELECT      VALUE 1 )
+SELECT      u.user_id
+ORDER BY    u.user_id;
\ No newline at end of file
diff --git a/asterix-graphix/src/test/resources/runtimets/queries/graphix/scope-checking/scope-checking.4.query.sqlpp b/asterix-graphix/src/test/resources/runtimets/queries/graphix/scope-checking/scope-checking.4.query.sqlpp
new file mode 100644
index 0000000..e103b44
--- /dev/null
+++ b/asterix-graphix/src/test/resources/runtimets/queries/graphix/scope-checking/scope-checking.4.query.sqlpp
@@ -0,0 +1,45 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
+ *
+ *   http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied.  See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+
+// Subquery expressing anti-join of patterns, using aliases.
+FROM GRAPH  VERTEX (:User)
+                   PRIMARY KEY (user_id)
+                   AS Yelp.Users,
+            VERTEX (:Review)
+                   PRIMARY KEY (review_id)
+                   AS Yelp.Reviews,
+            EDGE   (:Review)-[:MADE_BY]->(:User)
+                   SOURCE KEY (review_id)
+                   DESTINATION KEY (user_id)
+                   AS ( FROM    Yelp.Reviews R
+                        SELECT  R.review_id, R.user_id )
+MATCH       (u:User)<-(r)
+LET         myUser = u,
+            myReview = r
+WHERE       NOT EXISTS ( FROM GRAPH   VERTEX (:User)
+                                      PRIMARY KEY (user_id)
+                                      AS ( FROM    Yelp.Users U
+                                           WHERE   U.user_id = 1
+                                           SELECT  VALUE U )
+                          MATCH       (innerU:User)
+                          LET         myInnerUser = innerU
+                          WHERE       myInnerUser = myUser
+                          SELECT      VALUE 1 )
+SELECT      myUser.user_id, myReview.review_id
+ORDER BY    u.user_id;
\ No newline at end of file
diff --git a/asterix-graphix/src/test/resources/runtimets/queries/graphix/scope-checking/scope-checking.5.query.sqlpp b/asterix-graphix/src/test/resources/runtimets/queries/graphix/scope-checking/scope-checking.5.query.sqlpp
new file mode 100644
index 0000000..40e57c3
--- /dev/null
+++ b/asterix-graphix/src/test/resources/runtimets/queries/graphix/scope-checking/scope-checking.5.query.sqlpp
@@ -0,0 +1,39 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
+ *
+ *   http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied.  See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+
+// Subquery + GROUP BY expressing (bounded) shortest-path.
+FROM GRAPH  VERTEX (:User)
+                   PRIMARY KEY (user_id)
+                   AS Yelp.Users,
+            EDGE   (:User)-[:FRIENDS_WITH]->(:User)
+                   SOURCE KEY (user_id)
+                   DESTINATION KEY (friend)
+                   AS ( FROM    Yelp.Friends F
+                        SELECT  VALUE F )
+MATCH       (u1)-[:{1,3}]->(u2) AS p
+GROUP BY    u1, u2
+GROUP AS    g
+LET         shortestPath = ( FROM      g AS gi
+                             SELECT    VALUE ( FROM    PATH_VERTICES(gi.p) pv
+                                               SELECT  VALUE pv.user_id )
+                             ORDER BY  PATH_HOP_COUNT(gi.p) ASC
+                             LIMIT     1 )
+SELECT      u1.user_id AS u1_user_id,
+            u2.user_id AS u2_user_id,
+            shortestPath[0] AS shortestPath;
\ No newline at end of file
diff --git a/asterix-graphix/src/test/resources/runtimets/queries/graphix/scope-checking/scope-checking.6.query.sqlpp b/asterix-graphix/src/test/resources/runtimets/queries/graphix/scope-checking/scope-checking.6.query.sqlpp
new file mode 100644
index 0000000..1404a75
--- /dev/null
+++ b/asterix-graphix/src/test/resources/runtimets/queries/graphix/scope-checking/scope-checking.6.query.sqlpp
@@ -0,0 +1,42 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
+ *
+ *   http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied.  See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+
+// Subquery + GROUP BY expressing (bounded) shortest-path, using aliases.
+FROM GRAPH  VERTEX (:User)
+                   PRIMARY KEY (user_id)
+                   AS Yelp.Users,
+            EDGE   (:User)-[:FRIENDS_WITH]->(:User)
+                   SOURCE KEY (user_id)
+                   DESTINATION KEY (friend)
+                   AS ( FROM    Yelp.Friends F
+                        SELECT  VALUE F )
+MATCH       (u1)-[:{1,3}]->(u2) AS p
+LET         pathHopCount = PATH_HOP_COUNT(p),
+            pathVertices = PATH_VERTICES(p),
+            myUser1 = u1,
+            myUser2 = u2
+GROUP BY    myUser1, myUser2
+GROUP AS    g
+SELECT      myUser1.user_id AS u1_user_id,
+            myUser2.user_id AS u2_user_id,
+            ( FROM      g AS gi
+              SELECT    VALUE ( FROM    gi.pathVertices AS pv
+                                SELECT  VALUE pv.user_id )
+              ORDER BY  gi.pathHopCount ASC
+              LIMIT     1 )[0] AS shortestPath;
\ No newline at end of file
diff --git a/asterix-graphix/src/test/resources/runtimets/queries/graphix/scope-checking/scope-checking.7.query.sqlpp b/asterix-graphix/src/test/resources/runtimets/queries/graphix/scope-checking/scope-checking.7.query.sqlpp
new file mode 100644
index 0000000..13c5e00
--- /dev/null
+++ b/asterix-graphix/src/test/resources/runtimets/queries/graphix/scope-checking/scope-checking.7.query.sqlpp
@@ -0,0 +1,37 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
+ *
+ *   http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied.  See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+
+// Scope should be respected when a variable is re-declared in a non-graph query.
+FROM GRAPH  VERTEX (:User)
+                   PRIMARY KEY (user_id)
+                   AS Yelp.Users,
+            VERTEX (:Review)
+                   PRIMARY KEY (review_id)
+                   AS Yelp.Reviews,
+            EDGE   (:Review)-[:MADE_BY]->(:User)
+                   SOURCE KEY (review_id)
+                   DESTINATION KEY (user_id)
+                   AS ( FROM    Yelp.Reviews R
+                        SELECT  R.review_id, R.user_id )
+MATCH       (u:User)<-(r)
+WHERE       EXISTS ( FROM    Yelp.Users u
+                     WHERE   u.user_id = 1
+                     SELECT  VALUE 1 )
+SELECT      u.user_id, r.review_id
+ORDER BY    u.user_id, r.review_id;
\ No newline at end of file
diff --git a/asterix-graphix/src/test/resources/runtimets/queries/graphix/scope-checking/scope-checking.8.query.sqlpp b/asterix-graphix/src/test/resources/runtimets/queries/graphix/scope-checking/scope-checking.8.query.sqlpp
new file mode 100644
index 0000000..0c97f2c
--- /dev/null
+++ b/asterix-graphix/src/test/resources/runtimets/queries/graphix/scope-checking/scope-checking.8.query.sqlpp
@@ -0,0 +1,40 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
+ *
+ *   http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied.  See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+
+// Scope should be respected when a variable is re-declared in another graph query.
+FROM GRAPH  VERTEX (:User)
+                   PRIMARY KEY (user_id)
+                   AS Yelp.Users,
+            VERTEX (:Review)
+                   PRIMARY KEY (review_id)
+                   AS Yelp.Reviews,
+            EDGE   (:Review)-[:MADE_BY]->(:User)
+                   SOURCE KEY (review_id)
+                   DESTINATION KEY (user_id)
+                   AS ( FROM    Yelp.Reviews R
+                        SELECT  R.review_id, R.user_id )
+MATCH       (u:User)<-(r)
+WHERE       EXISTS ( FROM GRAPH  VERTEX (:User)
+                                 PRIMARY KEY (user_id)
+                                 AS Yelp.Users
+                     MATCH       (u:User)
+                     WHERE       u.user_id = 1
+                     SELECT      VALUE 1 )
+SELECT      u.user_id, r.review_id
+ORDER BY    u.user_id, r.review_id;
\ No newline at end of file
diff --git a/asterix-graphix/src/test/resources/metadata/queries/graphix/yelp-example/yelp-example.2.query.sqlpp b/asterix-graphix/src/test/resources/runtimets/queries/graphix/simple-1-edge/simple-1-edge.1.ddl.sqlpp
similarity index 67%
copy from asterix-graphix/src/test/resources/metadata/queries/graphix/yelp-example/yelp-example.2.query.sqlpp
copy to asterix-graphix/src/test/resources/runtimets/queries/graphix/simple-1-edge/simple-1-edge.1.ddl.sqlpp
index b8151af..271a6a8 100644
--- a/asterix-graphix/src/test/resources/metadata/queries/graphix/yelp-example/yelp-example.2.query.sqlpp
+++ b/asterix-graphix/src/test/resources/runtimets/queries/graphix/simple-1-edge/simple-1-edge.1.ddl.sqlpp
@@ -17,6 +17,15 @@
  * under the License.
  */
 
-FROM      `Metadata`.`Graph` G
-SELECT    G.DataverseName, G.GraphName, G.Dependencies, G.Vertices, G.Edges
-ORDER BY  G.DataverseName, G.GraphName;
+DROP DATAVERSE    Yelp IF EXISTS;
+CREATE DATAVERSE  Yelp;
+USE               Yelp;
+
+CREATE TYPE       GenericType
+AS                { _id: uuid };
+CREATE DATASET    Friends (GenericType)
+PRIMARY KEY       _id AUTOGENERATED;
+CREATE DATASET    Reviews (GenericType)
+PRIMARY KEY       _id AUTOGENERATED;
+CREATE DATASET    Users (GenericType)
+PRIMARY KEY       _id AUTOGENERATED;
diff --git a/asterix-graphix/src/test/resources/runtimets/queries/graphix/simple-1-edge/simple-1-edge.2.update.sqlpp b/asterix-graphix/src/test/resources/runtimets/queries/graphix/simple-1-edge/simple-1-edge.2.update.sqlpp
new file mode 100644
index 0000000..21365f1
--- /dev/null
+++ b/asterix-graphix/src/test/resources/runtimets/queries/graphix/simple-1-edge/simple-1-edge.2.update.sqlpp
@@ -0,0 +1,42 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
+ *
+ *   http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied.  See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+
+USE               Yelp;
+
+INSERT INTO       Users [
+  { "user_id": 1, "friends": [2, 3], "best_friend": 2 },
+  { "user_id": 2, "friends": [1] },
+  { "user_id": 3, "friends": [1], "best_friend": 1 },
+  { "user_id": 4 }
+];
+
+INSERT INTO       Friends [
+  { "user_id": 4, "friend": 1 },
+  { "user_id": 4, "friend": 2 },
+  { "user_id": 5, "friend": null }
+];
+
+INSERT INTO       Reviews [
+  { "review_id": "A", "user_id": 1 },
+  { "review_id": "B", "user_id": 1 },
+  { "review_id": "C", "user_id": 2 },
+  { "review_id": "D", "user_id": 3 },
+  { "review_id": "E", "user_id": 4 },
+  { "review_id": "F", "user_id": 5 }
+];
diff --git a/asterix-graphix/src/test/resources/runtimets/queries/graphix/simple-1-edge/simple-1-edge.3.query.sqlpp b/asterix-graphix/src/test/resources/runtimets/queries/graphix/simple-1-edge/simple-1-edge.3.query.sqlpp
new file mode 100644
index 0000000..e69655d
--- /dev/null
+++ b/asterix-graphix/src/test/resources/runtimets/queries/graphix/simple-1-edge/simple-1-edge.3.query.sqlpp
@@ -0,0 +1,37 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
+ *
+ *   http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied.  See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+
+// One edge definition, single vertex definition on both sides.
+FROM GRAPH  VERTEX (:User)
+                   PRIMARY KEY (user_id)
+                   AS Yelp.Users,
+            EDGE   (:User)-[:FRIENDS_WITH]->(:User)
+                   SOURCE KEY (user_id)
+                   DESTINATION KEY (friend)
+                   AS ( FROM    Yelp.Users U
+                        UNNEST  U.friends F
+                        SELECT  U.user_id AS user_id,
+                                F AS friend )
+MATCH       (u2:User)<-[fw:FRIENDS_WITH]-(u1:User)
+SELECT      u1.user_id AS u1_user_id,
+            u2.user_id AS u2_user_id,
+            u1.friends AS friends,
+            fw.user_id AS fw_user_id,
+            fw.friend AS fw_friend
+ORDER BY    u1, u2, fw;
\ No newline at end of file
diff --git a/asterix-graphix/src/test/resources/runtimets/queries/graphix/simple-1-edge/simple-1-edge.4.query.sqlpp b/asterix-graphix/src/test/resources/runtimets/queries/graphix/simple-1-edge/simple-1-edge.4.query.sqlpp
new file mode 100644
index 0000000..9e57a33
--- /dev/null
+++ b/asterix-graphix/src/test/resources/runtimets/queries/graphix/simple-1-edge/simple-1-edge.4.query.sqlpp
@@ -0,0 +1,45 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
+ *
+ *   http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied.  See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+
+// Two edge definitions, single vertex definition on both sides.
+FROM GRAPH  VERTEX (:User)
+                   PRIMARY KEY (user_id)
+                   AS Yelp.Users,
+            EDGE   (:User)-[:FRIENDS_WITH]->(:User)
+                   SOURCE KEY (user_id)
+                   DESTINATION KEY (friend)
+                   AS ( FROM    Yelp.Users U
+                        UNNEST  U.friends F
+                        SELECT  U.user_id AS user_id,
+                                F AS friend ),
+            EDGE   (:User)-[:FRIENDS_WITH]->(:User)
+                   SOURCE KEY (user_id)
+                   DESTINATION KEY (friend)
+                   AS ( FROM    Yelp.Friends F
+                        SELECT  F.user_id AS user_id,
+                                F.friend AS friend )
+MATCH       (u2:User)<-[fw:FRIENDS_WITH]-(u1:User)
+SELECT      u1.user_id AS u1_user_id,
+            u2.user_id AS u2_user_id,
+            fw.user_id AS fw_user_id,
+            fw.friend AS fw_friend
+ORDER BY    u1_user_id,
+            u2_user_id,
+            fw_user_id,
+            fw_friend;
diff --git a/asterix-graphix/src/test/resources/runtimets/queries/graphix/simple-1-edge/simple-1-edge.5.query.sqlpp b/asterix-graphix/src/test/resources/runtimets/queries/graphix/simple-1-edge/simple-1-edge.5.query.sqlpp
new file mode 100644
index 0000000..ff0d317
--- /dev/null
+++ b/asterix-graphix/src/test/resources/runtimets/queries/graphix/simple-1-edge/simple-1-edge.5.query.sqlpp
@@ -0,0 +1,49 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
+ *
+ *   http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied.  See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+
+// Two edge definitions, one vertex definition on the source and two vertex definitions on the destination.
+FROM GRAPH  VERTEX (:User)
+                   PRIMARY KEY (user_id)
+                   AS Yelp.Users,
+            VERTEX (:User)
+                   PRIMARY KEY (user_id)
+                   AS ( FROM    Yelp.Friends F
+                        WHERE   F.user_id NOT IN (
+                            FROM    Yelp.Users U
+                            SELECT  VALUE U.user_id
+                        )
+                        SELECT  DISTINCT F.user_id ),
+            EDGE   (:User)-[:FRIENDS_WITH]->(:User)
+                   SOURCE KEY (user_id)
+                   DESTINATION KEY (friend)
+                   AS ( FROM    Yelp.Users U
+                        UNNEST  U.friends F
+                        SELECT  U.user_id AS user_id,
+                                F AS friend ),
+            EDGE   (:User)-[:FRIENDS_WITH]->(:User)
+                   SOURCE KEY (user_id)
+                   DESTINATION KEY (friend)
+                   AS ( FROM    Yelp.Friends F
+                        SELECT  F.user_id AS user_id,
+                                F.friend AS friend )
+MATCH       (u2:User)<-[:FRIENDS_WITH]-(u1:User)
+SELECT      u1.user_id AS u1_user_id,
+            u2.user_id AS u2_user_id
+ORDER BY    u1_user_id,
+            u2_user_id;
\ No newline at end of file
diff --git a/asterix-graphix/src/test/resources/runtimets/queries/graphix/simple-1-edge/simple-1-edge.6.query.sqlpp b/asterix-graphix/src/test/resources/runtimets/queries/graphix/simple-1-edge/simple-1-edge.6.query.sqlpp
new file mode 100644
index 0000000..298b5c8
--- /dev/null
+++ b/asterix-graphix/src/test/resources/runtimets/queries/graphix/simple-1-edge/simple-1-edge.6.query.sqlpp
@@ -0,0 +1,43 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
+ *
+ *   http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied.  See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+
+// One edge definition, single vertex definition on both sides, with a dangling vertex.
+FROM GRAPH  VERTEX (:User)
+                   PRIMARY KEY (user_id)
+                   AS Yelp.Users,
+            VERTEX (:Review)
+                   PRIMARY KEY (review_id)
+                   AS ( FROM   Yelp.Reviews R
+                        SELECT R.user_id AS review_user_id, R.review_id ),
+            EDGE   (:Review)-[:MADE_BY]->(:User)
+                   SOURCE KEY (review_id)
+                   DESTINATION KEY (user_id)
+                   AS ( FROM    Yelp.Reviews R
+                        SELECT  R.user_id, R.review_id )
+MATCH       (u:User)<-[:MADE_BY]-(r:Review), (n)
+SELECT      u.user_id AS u_user_id,
+            r.review_id AS r_review_id,
+            r.user_id AS r_user_id,
+            n.user_id AS n_user_id,
+            n.review_id AS n_review_id
+ORDER BY    u_user_id,
+            r_review_id,
+            r_user_id,
+            n_user_id,
+            n_review_id;
diff --git a/asterix-graphix/src/test/resources/metadata/queries/graphix/yelp-example/yelp-example.2.query.sqlpp b/asterix-graphix/src/test/resources/runtimets/queries/graphix/simple-n-edge/simple-n-edge.1.ddl.sqlpp
similarity index 67%
copy from asterix-graphix/src/test/resources/metadata/queries/graphix/yelp-example/yelp-example.2.query.sqlpp
copy to asterix-graphix/src/test/resources/runtimets/queries/graphix/simple-n-edge/simple-n-edge.1.ddl.sqlpp
index b8151af..271a6a8 100644
--- a/asterix-graphix/src/test/resources/metadata/queries/graphix/yelp-example/yelp-example.2.query.sqlpp
+++ b/asterix-graphix/src/test/resources/runtimets/queries/graphix/simple-n-edge/simple-n-edge.1.ddl.sqlpp
@@ -17,6 +17,15 @@
  * under the License.
  */
 
-FROM      `Metadata`.`Graph` G
-SELECT    G.DataverseName, G.GraphName, G.Dependencies, G.Vertices, G.Edges
-ORDER BY  G.DataverseName, G.GraphName;
+DROP DATAVERSE    Yelp IF EXISTS;
+CREATE DATAVERSE  Yelp;
+USE               Yelp;
+
+CREATE TYPE       GenericType
+AS                { _id: uuid };
+CREATE DATASET    Friends (GenericType)
+PRIMARY KEY       _id AUTOGENERATED;
+CREATE DATASET    Reviews (GenericType)
+PRIMARY KEY       _id AUTOGENERATED;
+CREATE DATASET    Users (GenericType)
+PRIMARY KEY       _id AUTOGENERATED;
diff --git a/asterix-graphix/src/test/resources/runtimets/queries/graphix/simple-n-edge/simple-n-edge.2.update.sqlpp b/asterix-graphix/src/test/resources/runtimets/queries/graphix/simple-n-edge/simple-n-edge.2.update.sqlpp
new file mode 100644
index 0000000..61788ee
--- /dev/null
+++ b/asterix-graphix/src/test/resources/runtimets/queries/graphix/simple-n-edge/simple-n-edge.2.update.sqlpp
@@ -0,0 +1,42 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
+ *
+ *   http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied.  See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+
+USE               Yelp;
+
+INSERT INTO       Users [
+  { "user_id": 1, "best_friend": 2 },
+  { "user_id": 2, "best_friend": 3 },
+  { "user_id": 3 },
+  { "user_id": 4 }
+];
+
+INSERT INTO       Friends [
+  { "user_id": 1, "friend": 2, "friend_group": "A" },
+  { "user_id": 2, "friend": 3, "friend_group": "A" },
+  { "user_id": 3, "friend": 4, "friend_group": "B" }
+];
+
+INSERT INTO       Reviews [
+  { "review_id": "A", "user_id": 1 },
+  { "review_id": "B", "user_id": 1 },
+  { "review_id": "C", "user_id": 1 },
+  { "review_id": "D", "user_id": 2 },
+  { "review_id": "E", "user_id": 2 },
+  { "review_id": "F", "user_id": 3 }
+];
diff --git a/asterix-graphix/src/test/resources/runtimets/queries/graphix/simple-n-edge/simple-n-edge.3.query.sqlpp b/asterix-graphix/src/test/resources/runtimets/queries/graphix/simple-n-edge/simple-n-edge.3.query.sqlpp
new file mode 100644
index 0000000..dd474cc
--- /dev/null
+++ b/asterix-graphix/src/test/resources/runtimets/queries/graphix/simple-n-edge/simple-n-edge.3.query.sqlpp
@@ -0,0 +1,43 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
+ *
+ *   http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied.  See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+
+// Two query edges, single vertex definition on both sides.
+FROM GRAPH  VERTEX (:User)
+                   PRIMARY KEY (user_id)
+                   AS Yelp.Users,
+            VERTEX (:Review)
+                   PRIMARY KEY (review_id)
+                   AS Yelp.Reviews,
+            EDGE   (:Review)-[:MADE_BY]->(:User)
+                   SOURCE KEY (review_id)
+                   DESTINATION KEY (user_id)
+                   AS ( FROM    Yelp.Reviews R
+                        SELECT  R.review_id, R.user_id )
+MATCH       (u:User)<-[mb1:MADE_BY]-(r1:Review),
+            (u)<-[mb2:MADE_BY]-(r2:Review)
+SELECT      u.user_id AS u_user_id,
+            r1.review_id AS r1_review_id,
+            r2.review_id AS r2_review_id,
+            mb1.user_id AS mb1_user_id,
+            mb2.user_id AS mb2_user_id,
+            mb1.review_id AS mb1_review_id,
+            mb2.review_id AS mb2_review_id
+ORDER BY    u_user_id,
+            r1_review_id,
+            r2_review_id;
diff --git a/asterix-graphix/src/test/resources/runtimets/queries/graphix/simple-n-edge/simple-n-edge.4.query.sqlpp b/asterix-graphix/src/test/resources/runtimets/queries/graphix/simple-n-edge/simple-n-edge.4.query.sqlpp
new file mode 100644
index 0000000..e0655b2
--- /dev/null
+++ b/asterix-graphix/src/test/resources/runtimets/queries/graphix/simple-n-edge/simple-n-edge.4.query.sqlpp
@@ -0,0 +1,48 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
+ *
+ *   http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied.  See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+
+// Three query edges, single vertex definition on both sides.
+FROM GRAPH  VERTEX (:User)
+                   PRIMARY KEY (user_id)
+                   AS Yelp.Users,
+            VERTEX (:Review)
+                   PRIMARY KEY (review_id)
+                   AS Yelp.Reviews,
+            EDGE   (:Review)-[:MADE_BY]->(:User)
+                   SOURCE KEY (review_id)
+                   DESTINATION KEY (user_id)
+                   AS ( FROM    Yelp.Reviews R
+                        SELECT  R.review_id, R.user_id )
+MATCH       (u:User)<-[mb1:MADE_BY]-(r1:Review),
+            (u)<-[mb2:MADE_BY]-(r2:Review),
+            (u)<-[mb3:MADE_BY]-(r3:Review)
+SELECT      u.user_id AS u_user_id,
+            r1.review_id AS r1_review_id,
+            r2.review_id AS r2_review_id,
+            r3.review_id AS r3_review_id,
+            mb1.user_id AS mb1_user_id,
+            mb2.user_id AS mb2_user_id,
+            mb3.user_id AS mb3_user_id,
+            mb1.review_id AS mb1_review_id,
+            mb2.review_id AS mb2_review_id,
+            mb3.review_id AS mb3_review_id
+ORDER BY    u_user_id,
+            r1_review_id,
+            r2_review_id,
+            r3_review_id;
diff --git a/asterix-graphix/src/test/resources/runtimets/queries/graphix/simple-n-edge/simple-n-edge.5.query.sqlpp b/asterix-graphix/src/test/resources/runtimets/queries/graphix/simple-n-edge/simple-n-edge.5.query.sqlpp
new file mode 100644
index 0000000..7d12415
--- /dev/null
+++ b/asterix-graphix/src/test/resources/runtimets/queries/graphix/simple-n-edge/simple-n-edge.5.query.sqlpp
@@ -0,0 +1,44 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
+ *
+ *   http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied.  See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+
+// Two bidirectional query edges, single vertex definition for all vertices.
+FROM GRAPH  VERTEX (:User)
+                   PRIMARY KEY (user_id)
+                   AS Yelp.Users,
+            EDGE   (:User)-[:FRIENDS_WITH]->(:User)
+                   SOURCE KEY (user_id)
+                   DESTINATION KEY (friend)
+                   AS ( FROM    Yelp.Friends F
+                        WHERE   F.friend_group = "A"
+                        SELECT  F.user_id, F.friend )
+MATCH       (u)-[e1]-(v)-[e2]-(w)
+SELECT      u.user_id AS u_user_id,
+            v.user_id AS v_user_id,
+            w.user_id AS w_user_id,
+            e1.user_id AS e1_user_id,
+            e1.friend AS e1_friend,
+            e2.user_id AS e2_user_id,
+            e2.friend AS e2_friend
+ORDER BY    u_user_id,
+            v_user_id,
+            w_user_id,
+            e1_user_id,
+            e1_friend,
+            e2_user_id,
+            e2_friend;
diff --git a/asterix-graphix/src/test/resources/runtimets/queries/graphix/simple-n-edge/simple-n-edge.6.query.sqlpp b/asterix-graphix/src/test/resources/runtimets/queries/graphix/simple-n-edge/simple-n-edge.6.query.sqlpp
new file mode 100644
index 0000000..db9f1d1
--- /dev/null
+++ b/asterix-graphix/src/test/resources/runtimets/queries/graphix/simple-n-edge/simple-n-edge.6.query.sqlpp
@@ -0,0 +1,44 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
+ *
+ *   http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied.  See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+
+// Two directed query edges, single vertex definition for all vertices.
+FROM GRAPH  VERTEX (:User)
+                   PRIMARY KEY (user_id)
+                   AS Yelp.Users,
+            EDGE   (:User)-[:FRIENDS_WITH]->(:User)
+                   SOURCE KEY (user_id)
+                   DESTINATION KEY (friend)
+                   AS ( FROM    Yelp.Friends F
+                        WHERE   F.friend_group = "A"
+                        SELECT  F.user_id, F.friend )
+MATCH       (u)-[e1]->(v)-[e2]->(w)
+SELECT      u.user_id AS u_user_id,
+            v.user_id AS v_user_id,
+            w.user_id AS w_user_id,
+            e1.user_id AS e1_user_id,
+            e1.friend AS e1_friend,
+            e2.user_id AS e2_user_id,
+            e2.friend AS e2_friend
+ORDER BY    u_user_id,
+            v_user_id,
+            w_user_id,
+            e1_user_id,
+            e1_friend,
+            e2_user_id,
+            e2_friend;
diff --git a/asterix-graphix/src/test/resources/runtimets/queries/graphix/simple-n-edge/simple-n-edge.7.query.sqlpp b/asterix-graphix/src/test/resources/runtimets/queries/graphix/simple-n-edge/simple-n-edge.7.query.sqlpp
new file mode 100644
index 0000000..56a0672
--- /dev/null
+++ b/asterix-graphix/src/test/resources/runtimets/queries/graphix/simple-n-edge/simple-n-edge.7.query.sqlpp
@@ -0,0 +1,37 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
+ *
+ *   http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied.  See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+
+// Three bidirectional query edges, single vertex definition for all vertices.
+FROM GRAPH  VERTEX (:User)
+                   PRIMARY KEY (user_id)
+                   AS Yelp.Users,
+            EDGE   (:User)-[:FRIENDS_WITH]->(:User)
+                   SOURCE KEY (user_id)
+                   DESTINATION KEY (friend)
+                   AS ( FROM    Yelp.Friends F
+                        SELECT  F.* )
+MATCH       (u)-(v)-(w)-(y)
+SELECT      u.user_id AS u_user_id,
+            v.user_id AS v_user_id,
+            w.user_id AS w_user_id,
+            y.user_id AS y_user_id
+ORDER BY    u_user_id,
+            v_user_id,
+            w_user_id,
+            y_user_id;
diff --git a/asterix-graphix/src/test/resources/metadata/queries/graphix/yelp-example/yelp-example.2.query.sqlpp b/asterix-graphix/src/test/resources/runtimets/queries/graphix/variable-sub-path/variable-sub-path.1.ddl.sqlpp
similarity index 67%
copy from asterix-graphix/src/test/resources/metadata/queries/graphix/yelp-example/yelp-example.2.query.sqlpp
copy to asterix-graphix/src/test/resources/runtimets/queries/graphix/variable-sub-path/variable-sub-path.1.ddl.sqlpp
index b8151af..00df90a 100644
--- a/asterix-graphix/src/test/resources/metadata/queries/graphix/yelp-example/yelp-example.2.query.sqlpp
+++ b/asterix-graphix/src/test/resources/runtimets/queries/graphix/variable-sub-path/variable-sub-path.1.ddl.sqlpp
@@ -17,6 +17,16 @@
  * under the License.
  */
 
-FROM      `Metadata`.`Graph` G
-SELECT    G.DataverseName, G.GraphName, G.Dependencies, G.Vertices, G.Edges
-ORDER BY  G.DataverseName, G.GraphName;
+DROP DATAVERSE    Yelp IF EXISTS;
+CREATE DATAVERSE  Yelp;
+USE               Yelp;
+
+CREATE TYPE       UsersType
+AS                { user_id: bigint };
+CREATE DATASET    Users (UsersType)
+PRIMARY KEY       user_id;
+
+CREATE TYPE       FriendsType
+AS                { user_id: bigint, friend: bigint };
+CREATE DATASET    Friends (FriendsType)
+PRIMARY KEY       user_id, friend;
\ No newline at end of file
diff --git a/asterix-graphix/src/test/resources/metadata/queries/graphix/yelp-example/yelp-example.2.query.sqlpp b/asterix-graphix/src/test/resources/runtimets/queries/graphix/variable-sub-path/variable-sub-path.2.update.sqlpp
similarity index 68%
copy from asterix-graphix/src/test/resources/metadata/queries/graphix/yelp-example/yelp-example.2.query.sqlpp
copy to asterix-graphix/src/test/resources/runtimets/queries/graphix/variable-sub-path/variable-sub-path.2.update.sqlpp
index b8151af..5780dc6 100644
--- a/asterix-graphix/src/test/resources/metadata/queries/graphix/yelp-example/yelp-example.2.query.sqlpp
+++ b/asterix-graphix/src/test/resources/runtimets/queries/graphix/variable-sub-path/variable-sub-path.2.update.sqlpp
@@ -17,6 +17,21 @@
  * under the License.
  */
 
-FROM      `Metadata`.`Graph` G
-SELECT    G.DataverseName, G.GraphName, G.Dependencies, G.Vertices, G.Edges
-ORDER BY  G.DataverseName, G.GraphName;
+USE               Yelp;
+
+INSERT INTO       Users [
+  { "user_id": 1 },
+  { "user_id": 2 },
+  { "user_id": 3 },
+  { "user_id": 4 },
+  { "user_id": 5 },
+  { "user_id": 6 }
+];
+
+INSERT INTO       Friends [
+  { "user_id": 1, "friend": 2 },
+  { "user_id": 2, "friend": 3 },
+  { "user_id": 3, "friend": 4 },
+  { "user_id": 4, "friend": 5 },
+  { "user_id": 5, "friend": 6 }
+];
\ No newline at end of file
diff --git a/asterix-graphix/src/test/resources/runtimets/queries/graphix/variable-sub-path/variable-sub-path.3.query.sqlpp b/asterix-graphix/src/test/resources/runtimets/queries/graphix/variable-sub-path/variable-sub-path.3.query.sqlpp
new file mode 100644
index 0000000..c5c1d8d
--- /dev/null
+++ b/asterix-graphix/src/test/resources/runtimets/queries/graphix/variable-sub-path/variable-sub-path.3.query.sqlpp
@@ -0,0 +1,37 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
+ *
+ *   http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied.  See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+
+// One directed edge definition of one to three hops.
+FROM GRAPH  VERTEX (:User)
+                   PRIMARY KEY (user_id)
+                   AS Yelp.Users,
+            EDGE   (:User)-[:FRIENDS_WITH]->(:User)
+                   SOURCE KEY (user_id)
+                   DESTINATION KEY (friend)
+                   AS ( FROM    Yelp.Friends F
+                        SELECT  F.user_id AS user_id,
+                                F.friend AS friend )
+MATCH       (u2:User)<-[fw:FRIENDS_WITH{1,3}]-(u1:User)
+UNNEST      fw AS fwEdgeRecord
+LET         fw_left_vertex = VERTEX_KEY(fwEdgeRecord.LeftVertex)
+SELECT      u1.user_id AS u1_user_id,
+            fw_left_vertex,
+            u2.user_id AS u2_user_id,
+            HOP_COUNT(fw) AS fw_count
+ORDER BY    u1, fw_left_vertex, u2;
\ No newline at end of file
diff --git a/asterix-graphix/src/test/resources/runtimets/queries/graphix/variable-sub-path/variable-sub-path.4.query.sqlpp b/asterix-graphix/src/test/resources/runtimets/queries/graphix/variable-sub-path/variable-sub-path.4.query.sqlpp
new file mode 100644
index 0000000..83a78b4
--- /dev/null
+++ b/asterix-graphix/src/test/resources/runtimets/queries/graphix/variable-sub-path/variable-sub-path.4.query.sqlpp
@@ -0,0 +1,38 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
+ *
+ *   http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied.  See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+
+// One undirected edge definition of one to two hops.
+FROM GRAPH  VERTEX (:User)
+                   PRIMARY KEY (user_id)
+                   AS Yelp.Users,
+            EDGE   (:User)-[:FRIENDS_WITH]->(:User)
+                   SOURCE KEY (user_id)
+                   DESTINATION KEY (friend)
+                   AS ( FROM    Yelp.Friends F
+                        SELECT  F.user_id AS user_id,
+                                F.friend AS friend )
+MATCH       (u2:User)-[fw:FRIENDS_WITH{1,2}]-(u1:User)
+UNNEST      fw AS fwEdgeRecord
+LET         fw_left_vertex = VERTEX_KEY(fwEdgeRecord.LeftVertex)
+SELECT      u1.user_id AS u1_user_id,
+            fw_left_vertex,
+            DIRECTION(fwEdgeRecord.`Edge`) AS dir,
+            u2.user_id AS u2_user_id,
+            HOP_COUNT(fw) AS fw_hops
+ORDER BY    u1, fw_left_vertex, u2;
\ No newline at end of file
diff --git a/asterix-graphix/src/test/resources/runtimets/results/graphix/dangling-vertices/dangling-vertices.3.adm b/asterix-graphix/src/test/resources/runtimets/results/graphix/dangling-vertices/dangling-vertices.3.adm
new file mode 100644
index 0000000..bf58f6a
--- /dev/null
+++ b/asterix-graphix/src/test/resources/runtimets/results/graphix/dangling-vertices/dangling-vertices.3.adm
@@ -0,0 +1,4 @@
+{ "user_id": 1 }
+{ "user_id": 2 }
+{ "user_id": 3 }
+{ "user_id": 4 }
\ No newline at end of file
diff --git a/asterix-graphix/src/test/resources/runtimets/results/graphix/dangling-vertices/dangling-vertices.4.adm b/asterix-graphix/src/test/resources/runtimets/results/graphix/dangling-vertices/dangling-vertices.4.adm
new file mode 100644
index 0000000..b3d4d9f
--- /dev/null
+++ b/asterix-graphix/src/test/resources/runtimets/results/graphix/dangling-vertices/dangling-vertices.4.adm
@@ -0,0 +1,12 @@
+{ "u1_user_id": 1, "u2_user_id": 2 }
+{ "u1_user_id": 1, "u2_user_id": 3 }
+{ "u1_user_id": 1, "u2_user_id": 4 }
+{ "u1_user_id": 2, "u2_user_id": 1 }
+{ "u1_user_id": 2, "u2_user_id": 3 }
+{ "u1_user_id": 2, "u2_user_id": 4 }
+{ "u1_user_id": 3, "u2_user_id": 1 }
+{ "u1_user_id": 3, "u2_user_id": 2 }
+{ "u1_user_id": 3, "u2_user_id": 4 }
+{ "u1_user_id": 4, "u2_user_id": 1 }
+{ "u1_user_id": 4, "u2_user_id": 2 }
+{ "u1_user_id": 4, "u2_user_id": 3 }
\ No newline at end of file
diff --git a/asterix-graphix/src/test/resources/runtimets/results/graphix/dangling-vertices/dangling-vertices.5.adm b/asterix-graphix/src/test/resources/runtimets/results/graphix/dangling-vertices/dangling-vertices.5.adm
new file mode 100644
index 0000000..d547241
--- /dev/null
+++ b/asterix-graphix/src/test/resources/runtimets/results/graphix/dangling-vertices/dangling-vertices.5.adm
@@ -0,0 +1,24 @@
+{ "user_id": 1, "review_id": "A" }
+{ "user_id": 1, "review_id": "B" }
+{ "user_id": 1, "review_id": "C" }
+{ "user_id": 1, "review_id": "D" }
+{ "user_id": 1, "review_id": "E" }
+{ "user_id": 1, "review_id": "F" }
+{ "user_id": 2, "review_id": "A" }
+{ "user_id": 2, "review_id": "B" }
+{ "user_id": 2, "review_id": "C" }
+{ "user_id": 2, "review_id": "D" }
+{ "user_id": 2, "review_id": "E" }
+{ "user_id": 2, "review_id": "F" }
+{ "user_id": 3, "review_id": "A" }
+{ "user_id": 3, "review_id": "B" }
+{ "user_id": 3, "review_id": "C" }
+{ "user_id": 3, "review_id": "D" }
+{ "user_id": 3, "review_id": "E" }
+{ "user_id": 3, "review_id": "F" }
+{ "user_id": 4, "review_id": "A" }
+{ "user_id": 4, "review_id": "B" }
+{ "user_id": 4, "review_id": "C" }
+{ "user_id": 4, "review_id": "D" }
+{ "user_id": 4, "review_id": "E" }
+{ "user_id": 4, "review_id": "F" }
\ No newline at end of file
diff --git a/asterix-graphix/src/test/resources/runtimets/results/graphix/dangling-vertices/dangling-vertices.6.adm b/asterix-graphix/src/test/resources/runtimets/results/graphix/dangling-vertices/dangling-vertices.6.adm
new file mode 100644
index 0000000..295b176
--- /dev/null
+++ b/asterix-graphix/src/test/resources/runtimets/results/graphix/dangling-vertices/dangling-vertices.6.adm
@@ -0,0 +1,5 @@
+{ "user_id": 1, "review_id": "A" }
+{ "user_id": 1, "review_id": "B" }
+{ "user_id": 2, "review_id": "C" }
+{ "user_id": 3, "review_id": "D" }
+{ "user_id": 4, "review_id": "E" }
\ No newline at end of file
diff --git a/asterix-graphix/src/test/resources/runtimets/results/graphix/fixed-sub-path/fixed-sub-path.3.adm b/asterix-graphix/src/test/resources/runtimets/results/graphix/fixed-sub-path/fixed-sub-path.3.adm
new file mode 100644
index 0000000..45a5043
--- /dev/null
+++ b/asterix-graphix/src/test/resources/runtimets/results/graphix/fixed-sub-path/fixed-sub-path.3.adm
@@ -0,0 +1,8 @@
+{ "fw_hops": 2, "u1_user_id": 1, "fw_left_vertex": { "user_id": 2 }, "u2_user_id": 3 }
+{ "fw_hops": 2, "u1_user_id": 1, "fw_left_vertex": { "user_id": 3 }, "u2_user_id": 3 }
+{ "fw_hops": 2, "u1_user_id": 2, "fw_left_vertex": { "user_id": 3 }, "u2_user_id": 4 }
+{ "fw_hops": 2, "u1_user_id": 2, "fw_left_vertex": { "user_id": 4 }, "u2_user_id": 4 }
+{ "fw_hops": 2, "u1_user_id": 3, "fw_left_vertex": { "user_id": 4 }, "u2_user_id": 5 }
+{ "fw_hops": 2, "u1_user_id": 3, "fw_left_vertex": { "user_id": 5 }, "u2_user_id": 5 }
+{ "fw_hops": 2, "u1_user_id": 4, "fw_left_vertex": { "user_id": 5 }, "u2_user_id": 6 }
+{ "fw_hops": 2, "u1_user_id": 4, "fw_left_vertex": { "user_id": 6 }, "u2_user_id": 6 }
\ No newline at end of file
diff --git a/asterix-graphix/src/test/resources/runtimets/results/graphix/fixed-sub-path/fixed-sub-path.4.adm b/asterix-graphix/src/test/resources/runtimets/results/graphix/fixed-sub-path/fixed-sub-path.4.adm
new file mode 100644
index 0000000..d7b0151
--- /dev/null
+++ b/asterix-graphix/src/test/resources/runtimets/results/graphix/fixed-sub-path/fixed-sub-path.4.adm
@@ -0,0 +1,9 @@
+{ "fw_hops": 3, "u1_user_id": 1, "fw_left_vertex": { "user_id": 2 }, "u2_user_id": 4 }
+{ "fw_hops": 3, "u1_user_id": 1, "fw_left_vertex": { "user_id": 3 }, "u2_user_id": 4 }
+{ "fw_hops": 3, "u1_user_id": 1, "fw_left_vertex": { "user_id": 4 }, "u2_user_id": 4 }
+{ "fw_hops": 3, "u1_user_id": 2, "fw_left_vertex": { "user_id": 3 }, "u2_user_id": 5 }
+{ "fw_hops": 3, "u1_user_id": 2, "fw_left_vertex": { "user_id": 4 }, "u2_user_id": 5 }
+{ "fw_hops": 3, "u1_user_id": 2, "fw_left_vertex": { "user_id": 5 }, "u2_user_id": 5 }
+{ "fw_hops": 3, "u1_user_id": 3, "fw_left_vertex": { "user_id": 4 }, "u2_user_id": 6 }
+{ "fw_hops": 3, "u1_user_id": 3, "fw_left_vertex": { "user_id": 5 }, "u2_user_id": 6 }
+{ "fw_hops": 3, "u1_user_id": 3, "fw_left_vertex": { "user_id": 6 }, "u2_user_id": 6 }
\ No newline at end of file
diff --git a/asterix-graphix/src/test/resources/runtimets/results/graphix/fixed-sub-path/fixed-sub-path.5.adm b/asterix-graphix/src/test/resources/runtimets/results/graphix/fixed-sub-path/fixed-sub-path.5.adm
new file mode 100644
index 0000000..eb23c4f
--- /dev/null
+++ b/asterix-graphix/src/test/resources/runtimets/results/graphix/fixed-sub-path/fixed-sub-path.5.adm
@@ -0,0 +1,8 @@
+{ "fw1_hops": 2, "fw2_hops": 2, "u1_user_id": 1, "fw1_left_vertex": { "user_id": 2 }, "u2_user_id": 3, "fw2_left_vertex": { "user_id": 4 }, "u3_user_id": 5 }
+{ "fw1_hops": 2, "fw2_hops": 2, "u1_user_id": 1, "fw1_left_vertex": { "user_id": 2 }, "u2_user_id": 3, "fw2_left_vertex": { "user_id": 5 }, "u3_user_id": 5 }
+{ "fw1_hops": 2, "fw2_hops": 2, "u1_user_id": 1, "fw1_left_vertex": { "user_id": 3 }, "u2_user_id": 3, "fw2_left_vertex": { "user_id": 4 }, "u3_user_id": 5 }
+{ "fw1_hops": 2, "fw2_hops": 2, "u1_user_id": 1, "fw1_left_vertex": { "user_id": 3 }, "u2_user_id": 3, "fw2_left_vertex": { "user_id": 5 }, "u3_user_id": 5 }
+{ "fw1_hops": 2, "fw2_hops": 2, "u1_user_id": 2, "fw1_left_vertex": { "user_id": 3 }, "u2_user_id": 4, "fw2_left_vertex": { "user_id": 5 }, "u3_user_id": 6 }
+{ "fw1_hops": 2, "fw2_hops": 2, "u1_user_id": 2, "fw1_left_vertex": { "user_id": 3 }, "u2_user_id": 4, "fw2_left_vertex": { "user_id": 6 }, "u3_user_id": 6 }
+{ "fw1_hops": 2, "fw2_hops": 2, "u1_user_id": 2, "fw1_left_vertex": { "user_id": 4 }, "u2_user_id": 4, "fw2_left_vertex": { "user_id": 5 }, "u3_user_id": 6 }
+{ "fw1_hops": 2, "fw2_hops": 2, "u1_user_id": 2, "fw1_left_vertex": { "user_id": 4 }, "u2_user_id": 4, "fw2_left_vertex": { "user_id": 6 }, "u3_user_id": 6 }
\ No newline at end of file
diff --git a/asterix-graphix/src/test/resources/runtimets/results/graphix/fixed-sub-path/fixed-sub-path.6.adm b/asterix-graphix/src/test/resources/runtimets/results/graphix/fixed-sub-path/fixed-sub-path.6.adm
new file mode 100644
index 0000000..6b486c7
--- /dev/null
+++ b/asterix-graphix/src/test/resources/runtimets/results/graphix/fixed-sub-path/fixed-sub-path.6.adm
@@ -0,0 +1,5 @@
+{ "fw_hops": 1, "u1_user_id": 1, "fw_left_vertex": { "user_id": 2 }, "u2_user_id": 2 }
+{ "fw_hops": 1, "u1_user_id": 2, "fw_left_vertex": { "user_id": 3 }, "u2_user_id": 3 }
+{ "fw_hops": 1, "u1_user_id": 3, "fw_left_vertex": { "user_id": 4 }, "u2_user_id": 4 }
+{ "fw_hops": 1, "u1_user_id": 4, "fw_left_vertex": { "user_id": 5 }, "u2_user_id": 5 }
+{ "fw_hops": 1, "u1_user_id": 5, "fw_left_vertex": { "user_id": 6 }, "u2_user_id": 6 }
\ No newline at end of file
diff --git a/asterix-graphix/src/test/resources/runtimets/results/graphix/fixed-sub-path/fixed-sub-path.8.adm b/asterix-graphix/src/test/resources/runtimets/results/graphix/fixed-sub-path/fixed-sub-path.8.adm
new file mode 100644
index 0000000..8d03172
--- /dev/null
+++ b/asterix-graphix/src/test/resources/runtimets/results/graphix/fixed-sub-path/fixed-sub-path.8.adm
@@ -0,0 +1,20 @@
+{ "fw_hops": 2, "u1_user_id": 1, "fw_left_vertex": { "user_id": 2 }, "u2_user_id": 3 }
+{ "fw_hops": 2, "u1_user_id": 1, "fw_left_vertex": { "user_id": 2 }, "u2_user_id": 3 }
+{ "fw_hops": 2, "u1_user_id": 1, "fw_left_vertex": { "user_id": 3 }, "u2_user_id": 3 }
+{ "fw_hops": 2, "u1_user_id": 1, "fw_left_vertex": { "user_id": 3 }, "u2_user_id": 3 }
+{ "fw_hops": 2, "u1_user_id": 2, "fw_left_vertex": { "user_id": 3 }, "u2_user_id": 4 }
+{ "fw_hops": 2, "u1_user_id": 2, "fw_left_vertex": { "user_id": 4 }, "u2_user_id": 4 }
+{ "fw_hops": 2, "u1_user_id": 3, "fw_left_vertex": { "user_id": 1 }, "u2_user_id": 1 }
+{ "fw_hops": 2, "u1_user_id": 3, "fw_left_vertex": { "user_id": 1 }, "u2_user_id": 1 }
+{ "fw_hops": 2, "u1_user_id": 3, "fw_left_vertex": { "user_id": 2 }, "u2_user_id": 1 }
+{ "fw_hops": 2, "u1_user_id": 3, "fw_left_vertex": { "user_id": 2 }, "u2_user_id": 1 }
+{ "fw_hops": 2, "u1_user_id": 3, "fw_left_vertex": { "user_id": 4 }, "u2_user_id": 5 }
+{ "fw_hops": 2, "u1_user_id": 3, "fw_left_vertex": { "user_id": 5 }, "u2_user_id": 5 }
+{ "fw_hops": 2, "u1_user_id": 4, "fw_left_vertex": { "user_id": 2 }, "u2_user_id": 2 }
+{ "fw_hops": 2, "u1_user_id": 4, "fw_left_vertex": { "user_id": 3 }, "u2_user_id": 2 }
+{ "fw_hops": 2, "u1_user_id": 4, "fw_left_vertex": { "user_id": 5 }, "u2_user_id": 6 }
+{ "fw_hops": 2, "u1_user_id": 4, "fw_left_vertex": { "user_id": 6 }, "u2_user_id": 6 }
+{ "fw_hops": 2, "u1_user_id": 5, "fw_left_vertex": { "user_id": 3 }, "u2_user_id": 3 }
+{ "fw_hops": 2, "u1_user_id": 5, "fw_left_vertex": { "user_id": 4 }, "u2_user_id": 3 }
+{ "fw_hops": 2, "u1_user_id": 6, "fw_left_vertex": { "user_id": 4 }, "u2_user_id": 4 }
+{ "fw_hops": 2, "u1_user_id": 6, "fw_left_vertex": { "user_id": 5 }, "u2_user_id": 4 }
\ No newline at end of file
diff --git a/asterix-graphix/src/test/resources/runtimets/results/graphix/graph-isomorphism/graph-isomorphism.3.adm b/asterix-graphix/src/test/resources/runtimets/results/graphix/graph-isomorphism/graph-isomorphism.3.adm
new file mode 100644
index 0000000..b9a3cc8
--- /dev/null
+++ b/asterix-graphix/src/test/resources/runtimets/results/graphix/graph-isomorphism/graph-isomorphism.3.adm
@@ -0,0 +1,12 @@
+{ "u_user_id": 1, "v_user_id": 2 }
+{ "u_user_id": 1, "v_user_id": 3 }
+{ "u_user_id": 1, "v_user_id": 4 }
+{ "u_user_id": 2, "v_user_id": 1 }
+{ "u_user_id": 2, "v_user_id": 3 }
+{ "u_user_id": 2, "v_user_id": 4 }
+{ "u_user_id": 3, "v_user_id": 1 }
+{ "u_user_id": 3, "v_user_id": 2 }
+{ "u_user_id": 3, "v_user_id": 4 }
+{ "u_user_id": 4, "v_user_id": 1 }
+{ "u_user_id": 4, "v_user_id": 2 }
+{ "u_user_id": 4, "v_user_id": 3 }
\ No newline at end of file
diff --git a/asterix-graphix/src/test/resources/runtimets/results/graphix/graph-isomorphism/graph-isomorphism.4.adm b/asterix-graphix/src/test/resources/runtimets/results/graphix/graph-isomorphism/graph-isomorphism.4.adm
new file mode 100644
index 0000000..c3ad22c
--- /dev/null
+++ b/asterix-graphix/src/test/resources/runtimets/results/graphix/graph-isomorphism/graph-isomorphism.4.adm
@@ -0,0 +1,24 @@
+{ "u_user_id": 1, "v_user_id": 2, "w_user_id": 3 }
+{ "u_user_id": 1, "v_user_id": 2, "w_user_id": 4 }
+{ "u_user_id": 1, "v_user_id": 3, "w_user_id": 2 }
+{ "u_user_id": 1, "v_user_id": 3, "w_user_id": 4 }
+{ "u_user_id": 1, "v_user_id": 4, "w_user_id": 2 }
+{ "u_user_id": 1, "v_user_id": 4, "w_user_id": 3 }
+{ "u_user_id": 2, "v_user_id": 1, "w_user_id": 3 }
+{ "u_user_id": 2, "v_user_id": 1, "w_user_id": 4 }
+{ "u_user_id": 2, "v_user_id": 3, "w_user_id": 1 }
+{ "u_user_id": 2, "v_user_id": 3, "w_user_id": 4 }
+{ "u_user_id": 2, "v_user_id": 4, "w_user_id": 1 }
+{ "u_user_id": 2, "v_user_id": 4, "w_user_id": 3 }
+{ "u_user_id": 3, "v_user_id": 1, "w_user_id": 2 }
+{ "u_user_id": 3, "v_user_id": 1, "w_user_id": 4 }
+{ "u_user_id": 3, "v_user_id": 2, "w_user_id": 1 }
+{ "u_user_id": 3, "v_user_id": 2, "w_user_id": 4 }
+{ "u_user_id": 3, "v_user_id": 4, "w_user_id": 1 }
+{ "u_user_id": 3, "v_user_id": 4, "w_user_id": 2 }
+{ "u_user_id": 4, "v_user_id": 1, "w_user_id": 2 }
+{ "u_user_id": 4, "v_user_id": 1, "w_user_id": 3 }
+{ "u_user_id": 4, "v_user_id": 2, "w_user_id": 1 }
+{ "u_user_id": 4, "v_user_id": 2, "w_user_id": 3 }
+{ "u_user_id": 4, "v_user_id": 3, "w_user_id": 1 }
+{ "u_user_id": 4, "v_user_id": 3, "w_user_id": 2 }
\ No newline at end of file
diff --git a/asterix-graphix/src/test/resources/runtimets/results/graphix/graph-isomorphism/graph-isomorphism.5.adm b/asterix-graphix/src/test/resources/runtimets/results/graphix/graph-isomorphism/graph-isomorphism.5.adm
new file mode 100644
index 0000000..df6db5f
--- /dev/null
+++ b/asterix-graphix/src/test/resources/runtimets/results/graphix/graph-isomorphism/graph-isomorphism.5.adm
@@ -0,0 +1 @@
+{ "u_user_id": 1, "v_user_id": 2, "w_user_id": 3 }
\ No newline at end of file
diff --git a/asterix-graphix/src/test/resources/runtimets/results/graphix/graph-isomorphism/graph-isomorphism.6.adm b/asterix-graphix/src/test/resources/runtimets/results/graphix/graph-isomorphism/graph-isomorphism.6.adm
new file mode 100644
index 0000000..0534569
--- /dev/null
+++ b/asterix-graphix/src/test/resources/runtimets/results/graphix/graph-isomorphism/graph-isomorphism.6.adm
@@ -0,0 +1,16 @@
+{ "u_user_id": 1, "v_user_id": 1 }
+{ "u_user_id": 1, "v_user_id": 2 }
+{ "u_user_id": 1, "v_user_id": 3 }
+{ "u_user_id": 1, "v_user_id": 4 }
+{ "u_user_id": 2, "v_user_id": 1 }
+{ "u_user_id": 2, "v_user_id": 2 }
+{ "u_user_id": 2, "v_user_id": 3 }
+{ "u_user_id": 2, "v_user_id": 4 }
+{ "u_user_id": 3, "v_user_id": 1 }
+{ "u_user_id": 3, "v_user_id": 2 }
+{ "u_user_id": 3, "v_user_id": 3 }
+{ "u_user_id": 3, "v_user_id": 4 }
+{ "u_user_id": 4, "v_user_id": 1 }
+{ "u_user_id": 4, "v_user_id": 2 }
+{ "u_user_id": 4, "v_user_id": 3 }
+{ "u_user_id": 4, "v_user_id": 4 }
\ No newline at end of file
diff --git a/asterix-graphix/src/test/resources/runtimets/results/graphix/graph-isomorphism/graph-isomorphism.7.adm b/asterix-graphix/src/test/resources/runtimets/results/graphix/graph-isomorphism/graph-isomorphism.7.adm
new file mode 100644
index 0000000..5ba7e67
--- /dev/null
+++ b/asterix-graphix/src/test/resources/runtimets/results/graphix/graph-isomorphism/graph-isomorphism.7.adm
@@ -0,0 +1,3 @@
+{ "u_user_id": 1, "v_user_id": 2, "w_user_id": 1 }
+{ "u_user_id": 1, "v_user_id": 2, "w_user_id": 3 }
+{ "u_user_id": 2, "v_user_id": 1, "w_user_id": 2 }
\ No newline at end of file
diff --git a/asterix-graphix/src/test/resources/runtimets/results/graphix/graphix-functions/graphix-functions.3.adm b/asterix-graphix/src/test/resources/runtimets/results/graphix/graphix-functions/graphix-functions.3.adm
new file mode 100644
index 0000000..d746e73
--- /dev/null
+++ b/asterix-graphix/src/test/resources/runtimets/results/graphix/graphix-functions/graphix-functions.3.adm
@@ -0,0 +1,8 @@
+{ "vertexProperties": { "review_id": "A", "user_id": 1 }, "vertexDetail": { "Label": "Review", "PrimaryKey": { "review_id": "A" } }, "vertexKey": { "review_id": "A" }, "vertexLabel": "Review" }
+{ "vertexProperties": { "review_id": "B", "user_id": 2 }, "vertexDetail": { "Label": "Review", "PrimaryKey": { "review_id": "B" } }, "vertexKey": { "review_id": "B" }, "vertexLabel": "Review" }
+{ "vertexProperties": { "user_id": 1 }, "vertexDetail": { "Label": "User", "PrimaryKey": { "user_id": 1 } }, "vertexKey": { "user_id": 1 }, "vertexLabel": "User" }
+{ "vertexProperties": { "user_id": 2 }, "vertexDetail": { "Label": "User", "PrimaryKey": { "user_id": 2 } }, "vertexKey": { "user_id": 2 }, "vertexLabel": "User" }
+{ "vertexProperties": { "user_id": 3 }, "vertexDetail": { "Label": "User", "PrimaryKey": { "user_id": 3 } }, "vertexKey": { "user_id": 3 }, "vertexLabel": "User" }
+{ "vertexProperties": { "user_id": 4 }, "vertexDetail": { "Label": "User", "PrimaryKey": { "user_id": 4 } }, "vertexKey": { "user_id": 4 }, "vertexLabel": "User" }
+{ "vertexProperties": { "user_id": 5 }, "vertexDetail": { "Label": "User", "PrimaryKey": { "user_id": 5 } }, "vertexKey": { "user_id": 5 }, "vertexLabel": "User" }
+{ "vertexProperties": { "user_id": 6 }, "vertexDetail": { "Label": "User", "PrimaryKey": { "user_id": 6 } }, "vertexKey": { "user_id": 6 }, "vertexLabel": "User" }
\ No newline at end of file
diff --git a/asterix-graphix/src/test/resources/runtimets/results/graphix/graphix-functions/graphix-functions.4.adm b/asterix-graphix/src/test/resources/runtimets/results/graphix/graphix-functions/graphix-functions.4.adm
new file mode 100644
index 0000000..a4b2231
--- /dev/null
+++ b/asterix-graphix/src/test/resources/runtimets/results/graphix/graphix-functions/graphix-functions.4.adm
@@ -0,0 +1,14 @@
+{ "sourceVertex": { "review_id": "A", "user_id": 1, "_GraphixElementDetail": { "Label": "Review" }, "_GraphixVertexDetail": { "PrimaryKey": { "review_id": "A" } } }, "destVertex": { "user_id": 1, "_GraphixElementDetail": { "Label": "User" }, "_GraphixVertexDetail": { "PrimaryKey": { "user_id": 1 } } }, "edgeDetail": { "Label": "MADE_BY", "EdgeDirection": "LEFT_TO_RIGHT", "SourceKey": { "review_id": "A" }, "DestinationKey": { "user_id": 1 } }, "edgeProperties": { "review_id": "A", "user_id": 1 }, "direction": "LEFT_TO_RIGHT", "sourceKeyValue": { "review_id": "A" }, "destKeyValue": { "user_id": 1 }, "edgeLabel": "MADE_BY", "n1Label": "Review", "n2Label": "User" }
+{ "sourceVertex": { "review_id": "B", "user_id": 2, "_GraphixElementDetail": { "Label": "Review" }, "_GraphixVertexDetail": { "PrimaryKey": { "review_id": "B" } } }, "destVertex": { "user_id": 2, "_GraphixElementDetail": { "Label": "User" }, "_GraphixVertexDetail": { "PrimaryKey": { "user_id": 2 } } }, "edgeDetail": { "Label": "MADE_BY", "EdgeDirection": "LEFT_TO_RIGHT", "SourceKey": { "review_id": "B" }, "DestinationKey": { "user_id": 2 } }, "edgeProperties": { "review_id": "B", "user_id": 2 }, "direction": "LEFT_TO_RIGHT", "sourceKeyValue": { "review_id": "B" }, "destKeyValue": { "user_id": 2 }, "edgeLabel": "MADE_BY", "n1Label": "Review", "n2Label": "User" }
+{ "sourceVertex": { "user_id": 1, "_GraphixElementDetail": { "Label": "User" }, "_GraphixVertexDetail": { "PrimaryKey": { "user_id": 1 } } }, "destVertex": { "user_id": 2, "_GraphixElementDetail": { "Label": "User" }, "_GraphixVertexDetail": { "PrimaryKey": { "user_id": 2 } } }, "edgeDetail": { "Label": "FRIENDS_WITH", "EdgeDirection": "LEFT_TO_RIGHT", "SourceKey": { "user_id": 1 }, "DestinationKey": { "friend": 2 } }, "edgeProperties": { "user_id": 1, "friend": 2 }, "direction": "LEFT_TO_RIGHT", "sourceKeyValue": { "user_id": 1 }, "destKeyValue": { "friend": 2 }, "edgeLabel": "FRIENDS_WITH", "n1Label": "User", "n2Label": "User" }
+{ "sourceVertex": { "review_id": "A", "user_id": 1, "_GraphixElementDetail": { "Label": "Review" }, "_GraphixVertexDetail": { "PrimaryKey": { "review_id": "A" } } }, "destVertex": { "user_id": 1, "_GraphixElementDetail": { "Label": "User" }, "_GraphixVertexDetail": { "PrimaryKey": { "user_id": 1 } } }, "edgeDetail": { "Label": "MADE_BY", "EdgeDirection": "RIGHT_TO_LEFT", "SourceKey": { "review_id": "A" }, "DestinationKey": { "user_id": 1 } }, "edgeProperties": { "review_id": "A", "user_id": 1 }, "direction": "RIGHT_TO_LEFT", "sourceKeyValue": { "review_id": "A" }, "destKeyValue": { "user_id": 1 }, "edgeLabel": "MADE_BY", "n1Label": "User", "n2Label": "Review" }
+{ "sourceVertex": { "user_id": 1, "_GraphixElementDetail": { "Label": "User" }, "_GraphixVertexDetail": { "PrimaryKey": { "user_id": 1 } } }, "destVertex": { "user_id": 2, "_GraphixElementDetail": { "Label": "User" }, "_GraphixVertexDetail": { "PrimaryKey": { "user_id": 2 } } }, "edgeDetail": { "Label": "FRIENDS_WITH", "EdgeDirection": "RIGHT_TO_LEFT", "SourceKey": { "user_id": 1 }, "DestinationKey": { "friend": 2 } }, "edgeProperties": { "user_id": 1, "friend": 2 }, "direction": "RIGHT_TO_LEFT", "sourceKeyValue": { "user_id": 1 }, "destKeyValue": { "friend": 2 }, "edgeLabel": "FRIENDS_WITH", "n1Label": "User", "n2Label": "User" }
+{ "sourceVertex": { "user_id": 2, "_GraphixElementDetail": { "Label": "User" }, "_GraphixVertexDetail": { "PrimaryKey": { "user_id": 2 } } }, "destVertex": { "user_id": 3, "_GraphixElementDetail": { "Label": "User" }, "_GraphixVertexDetail": { "PrimaryKey": { "user_id": 3 } } }, "edgeDetail": { "Label": "FRIENDS_WITH", "EdgeDirection": "LEFT_TO_RIGHT", "SourceKey": { "user_id": 2 }, "DestinationKey": { "friend": 3 } }, "edgeProperties": { "user_id": 2, "friend": 3 }, "direction": "LEFT_TO_RIGHT", "sourceKeyValue": { "user_id": 2 }, "destKeyValue": { "friend": 3 }, "edgeLabel": "FRIENDS_WITH", "n1Label": "User", "n2Label": "User" }
+{ "sourceVertex": { "review_id": "B", "user_id": 2, "_GraphixElementDetail": { "Label": "Review" }, "_GraphixVertexDetail": { "PrimaryKey": { "review_id": "B" } } }, "destVertex": { "user_id": 2, "_GraphixElementDetail": { "Label": "User" }, "_GraphixVertexDetail": { "PrimaryKey": { "user_id": 2 } } }, "edgeDetail": { "Label": "MADE_BY", "EdgeDirection": "RIGHT_TO_LEFT", "SourceKey": { "review_id": "B" }, "DestinationKey": { "user_id": 2 } }, "edgeProperties": { "review_id": "B", "user_id": 2 }, "direction": "RIGHT_TO_LEFT", "sourceKeyValue": { "review_id": "B" }, "destKeyValue": { "user_id": 2 }, "edgeLabel": "MADE_BY", "n1Label": "User", "n2Label": "Review" }
+{ "sourceVertex": { "user_id": 2, "_GraphixElementDetail": { "Label": "User" }, "_GraphixVertexDetail": { "PrimaryKey": { "user_id": 2 } } }, "destVertex": { "user_id": 3, "_GraphixElementDetail": { "Label": "User" }, "_GraphixVertexDetail": { "PrimaryKey": { "user_id": 3 } } }, "edgeDetail": { "Label": "FRIENDS_WITH", "EdgeDirection": "RIGHT_TO_LEFT", "SourceKey": { "user_id": 2 }, "DestinationKey": { "friend": 3 } }, "edgeProperties": { "user_id": 2, "friend": 3 }, "direction": "RIGHT_TO_LEFT", "sourceKeyValue": { "user_id": 2 }, "destKeyValue": { "friend": 3 }, "edgeLabel": "FRIENDS_WITH", "n1Label": "User", "n2Label": "User" }
+{ "sourceVertex": { "user_id": 3, "_GraphixElementDetail": { "Label": "User" }, "_GraphixVertexDetail": { "PrimaryKey": { "user_id": 3 } } }, "destVertex": { "user_id": 4, "_GraphixElementDetail": { "Label": "User" }, "_GraphixVertexDetail": { "PrimaryKey": { "user_id": 4 } } }, "edgeDetail": { "Label": "FRIENDS_WITH", "EdgeDirection": "LEFT_TO_RIGHT", "SourceKey": { "user_id": 3 }, "DestinationKey": { "friend": 4 } }, "edgeProperties": { "user_id": 3, "friend": 4 }, "direction": "LEFT_TO_RIGHT", "sourceKeyValue": { "user_id": 3 }, "destKeyValue": { "friend": 4 }, "edgeLabel": "FRIENDS_WITH", "n1Label": "User", "n2Label": "User" }
+{ "sourceVertex": { "user_id": 3, "_GraphixElementDetail": { "Label": "User" }, "_GraphixVertexDetail": { "PrimaryKey": { "user_id": 3 } } }, "destVertex": { "user_id": 4, "_GraphixElementDetail": { "Label": "User" }, "_GraphixVertexDetail": { "PrimaryKey": { "user_id": 4 } } }, "edgeDetail": { "Label": "FRIENDS_WITH", "EdgeDirection": "RIGHT_TO_LEFT", "SourceKey": { "user_id": 3 }, "DestinationKey": { "friend": 4 } }, "edgeProperties": { "user_id": 3, "friend": 4 }, "direction": "RIGHT_TO_LEFT", "sourceKeyValue": { "user_id": 3 }, "destKeyValue": { "friend": 4 }, "edgeLabel": "FRIENDS_WITH", "n1Label": "User", "n2Label": "User" }
+{ "sourceVertex": { "user_id": 4, "_GraphixElementDetail": { "Label": "User" }, "_GraphixVertexDetail": { "PrimaryKey": { "user_id": 4 } } }, "destVertex": { "user_id": 5, "_GraphixElementDetail": { "Label": "User" }, "_GraphixVertexDetail": { "PrimaryKey": { "user_id": 5 } } }, "edgeDetail": { "Label": "FRIENDS_WITH", "EdgeDirection": "LEFT_TO_RIGHT", "SourceKey": { "user_id": 4 }, "DestinationKey": { "friend": 5 } }, "edgeProperties": { "user_id": 4, "friend": 5 }, "direction": "LEFT_TO_RIGHT", "sourceKeyValue": { "user_id": 4 }, "destKeyValue": { "friend": 5 }, "edgeLabel": "FRIENDS_WITH", "n1Label": "User", "n2Label": "User" }
+{ "sourceVertex": { "user_id": 4, "_GraphixElementDetail": { "Label": "User" }, "_GraphixVertexDetail": { "PrimaryKey": { "user_id": 4 } } }, "destVertex": { "user_id": 5, "_GraphixElementDetail": { "Label": "User" }, "_GraphixVertexDetail": { "PrimaryKey": { "user_id": 5 } } }, "edgeDetail": { "Label": "FRIENDS_WITH", "EdgeDirection": "RIGHT_TO_LEFT", "SourceKey": { "user_id": 4 }, "DestinationKey": { "friend": 5 } }, "edgeProperties": { "user_id": 4, "friend": 5 }, "direction": "RIGHT_TO_LEFT", "sourceKeyValue": { "user_id": 4 }, "destKeyValue": { "friend": 5 }, "edgeLabel": "FRIENDS_WITH", "n1Label": "User", "n2Label": "User" }
+{ "sourceVertex": { "user_id": 5, "_GraphixElementDetail": { "Label": "User" }, "_GraphixVertexDetail": { "PrimaryKey": { "user_id": 5 } } }, "destVertex": { "user_id": 6, "_GraphixElementDetail": { "Label": "User" }, "_GraphixVertexDetail": { "PrimaryKey": { "user_id": 6 } } }, "edgeDetail": { "Label": "FRIENDS_WITH", "EdgeDirection": "LEFT_TO_RIGHT", "SourceKey": { "user_id": 5 }, "DestinationKey": { "friend": 6 } }, "edgeProperties": { "user_id": 5, "friend": 6 }, "direction": "LEFT_TO_RIGHT", "sourceKeyValue": { "user_id": 5 }, "destKeyValue": { "friend": 6 }, "edgeLabel": "FRIENDS_WITH", "n1Label": "User", "n2Label": "User" }
+{ "sourceVertex": { "user_id": 5, "_GraphixElementDetail": { "Label": "User" }, "_GraphixVertexDetail": { "PrimaryKey": { "user_id": 5 } } }, "destVertex": { "user_id": 6, "_GraphixElementDetail": { "Label": "User" }, "_GraphixVertexDetail": { "PrimaryKey": { "user_id": 6 } } }, "edgeDetail": { "Label": "FRIENDS_WITH", "EdgeDirection": "RIGHT_TO_LEFT", "SourceKey": { "user_id": 5 }, "DestinationKey": { "friend": 6 } }, "edgeProperties": { "user_id": 5, "friend": 6 }, "direction": "RIGHT_TO_LEFT", "sourceKeyValue": { "user_id": 5 }, "destKeyValue": { "friend": 6 }, "edgeLabel": "FRIENDS_WITH", "n1Label": "User", "n2Label": "User" }
\ No newline at end of file
diff --git a/asterix-graphix/src/test/resources/runtimets/results/graphix/graphix-functions/graphix-functions.5.adm b/asterix-graphix/src/test/resources/runtimets/results/graphix/graphix-functions/graphix-functions.5.adm
new file mode 100644
index 0000000..6fab046
--- /dev/null
+++ b/asterix-graphix/src/test/resources/runtimets/results/graphix/graphix-functions/graphix-functions.5.adm
@@ -0,0 +1,4 @@
+{ "pEdges": [ { "review_id": "A", "user_id": 1, "_GraphixElementDetail": { "Label": "MADE_BY" }, "_GraphixEdgeDetail": { "EdgeDirection": "LEFT_TO_RIGHT", "SourceKey": { "review_id": "A" }, "DestinationKey": { "user_id": 1 } } }, { "user_id": 1, "friend": 2, "_GraphixElementDetail": { "Label": "FRIENDS_WITH" }, "_GraphixEdgeDetail": { "EdgeDirection": "LEFT_TO_RIGHT", "SourceKey": { "user_id": 1 }, "DestinationKey": { "friend": 2 } } } ], "eEdges": [ { "review_id": "A", "user_id": 1, "_GraphixElementDetail": { "Label": "MADE_BY" }, "_GraphixEdgeDetail": { "EdgeDirection": "LEFT_TO_RIGHT", "SourceKey": { "review_id": "A" }, "DestinationKey": { "user_id": 1 } } } ], "pHopCount": 2, "pLabels": [ "FRIENDS_WITH", "MADE_BY", "Review", "User" ], "eLabels": [ "MADE_BY", "Review", "User" ], "pVertices": [ { "review_id": "A", "user_id": 1, "_GraphixElementDetail": { "Label": "Review" }, "_GraphixVertexDetail": { "PrimaryKey": { "review_id": "A" } } }, { "user_id": 1, "_GraphixElementDetail": { "Label": "User" }, "_GraphixVertexDetail": { "PrimaryKey": { "user_id": 1 } } }, { "user_id": 2, "_GraphixElementDetail": { "Label": "User" }, "_GraphixVertexDetail": { "PrimaryKey": { "user_id": 2 } } } ], "eVertices": [ { "review_id": "A", "user_id": 1, "_GraphixElementDetail": { "Label": "Review" }, "_GraphixVertexDetail": { "PrimaryKey": { "review_id": "A" } } }, { "user_id": 1, "_GraphixElementDetail": { "Label": "User" }, "_GraphixVertexDetail": { "PrimaryKey": { "user_id": 1 } } } ] }
+{ "pEdges": [ { "review_id": "B", "user_id": 2, "_GraphixElementDetail": { "Label": "MADE_BY" }, "_GraphixEdgeDetail": { "EdgeDirection": "LEFT_TO_RIGHT", "SourceKey": { "review_id": "B" }, "DestinationKey": { "user_id": 2 } } }, { "user_id": 1, "friend": 2, "_GraphixElementDetail": { "Label": "FRIENDS_WITH" }, "_GraphixEdgeDetail": { "EdgeDirection": "RIGHT_TO_LEFT", "SourceKey": { "user_id": 1 }, "DestinationKey": { "friend": 2 } } } ], "eEdges": [ { "review_id": "B", "user_id": 2, "_GraphixElementDetail": { "Label": "MADE_BY" }, "_GraphixEdgeDetail": { "EdgeDirection": "LEFT_TO_RIGHT", "SourceKey": { "review_id": "B" }, "DestinationKey": { "user_id": 2 } } } ], "pHopCount": 2, "pLabels": [ "FRIENDS_WITH", "MADE_BY", "Review", "User" ], "eLabels": [ "MADE_BY", "Review", "User" ], "pVertices": [ { "review_id": "B", "user_id": 2, "_GraphixElementDetail": { "Label": "Review" }, "_GraphixVertexDetail": { "PrimaryKey": { "review_id": "B" } } }, { "user_id": 1, "_GraphixElementDetail": { "Label": "User" }, "_GraphixVertexDetail": { "PrimaryKey": { "user_id": 1 } } }, { "user_id": 2, "_GraphixElementDetail": { "Label": "User" }, "_GraphixVertexDetail": { "PrimaryKey": { "user_id": 2 } } } ], "eVertices": [ { "review_id": "B", "user_id": 2, "_GraphixElementDetail": { "Label": "Review" }, "_GraphixVertexDetail": { "PrimaryKey": { "review_id": "B" } } }, { "user_id": 2, "_GraphixElementDetail": { "Label": "User" }, "_GraphixVertexDetail": { "PrimaryKey": { "user_id": 2 } } } ] }
+{ "pEdges": [ { "user_id": 1, "friend": 2, "_GraphixElementDetail": { "Label": "FRIENDS_WITH" }, "_GraphixEdgeDetail": { "EdgeDirection": "LEFT_TO_RIGHT", "SourceKey": { "user_id": 1 }, "DestinationKey": { "friend": 2 } } }, { "review_id": "B", "user_id": 2, "_GraphixElementDetail": { "Label": "MADE_BY" }, "_GraphixEdgeDetail": { "EdgeDirection": "RIGHT_TO_LEFT", "SourceKey": { "review_id": "B" }, "DestinationKey": { "user_id": 2 } } } ], "eEdges": [ { "user_id": 1, "friend": 2, "_GraphixElementDetail": { "Label": "FRIENDS_WITH" }, "_GraphixEdgeDetail": { "EdgeDirection": "LEFT_TO_RIGHT", "SourceKey": { "user_id": 1 }, "DestinationKey": { "friend": 2 } } } ], "pHopCount": 2, "pLabels": [ "FRIENDS_WITH", "MADE_BY", "Review", "User" ], "eLabels": [ "FRIENDS_WITH", "User" ], "pVertices": [ { "review_id": "B", "user_id": 2, "_GraphixElementDetail": { "Label": "Review" }, "_GraphixVertexDetail": { "PrimaryKey": { "review_id": "B" } } }, { "user_id": 1, "_GraphixElementDetail": { "Label": "User" }, "_GraphixVertexDetail": { "PrimaryKey": { "user_id": 1 } } }, { "user_id": 2, "_GraphixElementDetail": { "Label": "User" }, "_GraphixVertexDetail": { "PrimaryKey": { "user_id": 2 } } } ], "eVertices": [ { "user_id": 1, "_GraphixElementDetail": { "Label": "User" }, "_GraphixVertexDetail": { "PrimaryKey": { "user_id": 1 } } }, { "user_id": 2, "_GraphixElementDetail": { "Label": "User" }, "_GraphixVertexDetail": { "PrimaryKey": { "user_id": 2 } } } ] }
+{ "pEdges": [ { "user_id": 1, "friend": 2, "_GraphixElementDetail": { "Label": "FRIENDS_WITH" }, "_GraphixEdgeDetail": { "EdgeDirection": "RIGHT_TO_LEFT", "SourceKey": { "user_id": 1 }, "DestinationKey": { "friend": 2 } } }, { "review_id": "A", "user_id": 1, "_GraphixElementDetail": { "Label": "MADE_BY" }, "_GraphixEdgeDetail": { "EdgeDirection": "RIGHT_TO_LEFT", "SourceKey": { "review_id": "A" }, "DestinationKey": { "user_id": 1 } } } ], "eEdges": [ { "user_id": 1, "friend": 2, "_GraphixElementDetail": { "Label": "FRIENDS_WITH" }, "_GraphixEdgeDetail": { "EdgeDirection": "RIGHT_TO_LEFT", "SourceKey": { "user_id": 1 }, "DestinationKey": { "friend": 2 } } } ], "pHopCount": 2, "pLabels": [ "FRIENDS_WITH", "MADE_BY", "Review", "User" ], "eLabels": [ "FRIENDS_WITH", "User" ], "pVertices": [ { "review_id": "A", "user_id": 1, "_GraphixElementDetail": { "Label": "Review" }, "_GraphixVertexDetail": { "PrimaryKey": { "review_id": "A" } } }, { "user_id": 1, "_GraphixElementDetail": { "Label": "User" }, "_GraphixVertexDetail": { "PrimaryKey": { "user_id": 1 } } }, { "user_id": 2, "_GraphixElementDetail": { "Label": "User" }, "_GraphixVertexDetail": { "PrimaryKey": { "user_id": 2 } } } ], "eVertices": [ { "user_id": 1, "_GraphixElementDetail": { "Label": "User" }, "_GraphixVertexDetail": { "PrimaryKey": { "user_id": 1 } } }, { "user_id": 2, "_GraphixElementDetail": { "Label": "User" }, "_GraphixVertexDetail": { "PrimaryKey": { "user_id": 2 } } } ] }
\ No newline at end of file
diff --git a/asterix-graphix/src/test/resources/runtimets/results/graphix/inference-resolution/inference-resolution.3.adm b/asterix-graphix/src/test/resources/runtimets/results/graphix/inference-resolution/inference-resolution.3.adm
new file mode 100644
index 0000000..aea519f
--- /dev/null
+++ b/asterix-graphix/src/test/resources/runtimets/results/graphix/inference-resolution/inference-resolution.3.adm
@@ -0,0 +1 @@
+{ "e_label": "FRIENDS_WITH", "n_label": "User" }
\ No newline at end of file
diff --git a/asterix-graphix/src/test/resources/runtimets/results/graphix/inference-resolution/inference-resolution.4.adm b/asterix-graphix/src/test/resources/runtimets/results/graphix/inference-resolution/inference-resolution.4.adm
new file mode 100644
index 0000000..20fd92b
--- /dev/null
+++ b/asterix-graphix/src/test/resources/runtimets/results/graphix/inference-resolution/inference-resolution.4.adm
@@ -0,0 +1,2 @@
+{ "e_label": "FRIENDS_WITH", "n_label": "User", "f_label": "FRIENDS_WITH", "m_label": "User" }
+{ "e_label": "FRIENDS_WITH", "n_label": "User", "f_label": "MADE_BY", "m_label": "Review" }
\ No newline at end of file
diff --git a/asterix-graphix/src/test/resources/runtimets/results/graphix/inference-resolution/inference-resolution.5.adm b/asterix-graphix/src/test/resources/runtimets/results/graphix/inference-resolution/inference-resolution.5.adm
new file mode 100644
index 0000000..771db0f
--- /dev/null
+++ b/asterix-graphix/src/test/resources/runtimets/results/graphix/inference-resolution/inference-resolution.5.adm
@@ -0,0 +1 @@
+{ "e_label": "FRIENDS_WITH", "n_label": "User", "f_label": "MADE_BY", "f_direction": "RIGHT_TO_LEFT" }
\ No newline at end of file
diff --git a/asterix-graphix/src/test/resources/runtimets/results/graphix/inference-resolution/inference-resolution.6.adm b/asterix-graphix/src/test/resources/runtimets/results/graphix/inference-resolution/inference-resolution.6.adm
new file mode 100644
index 0000000..5a87275
--- /dev/null
+++ b/asterix-graphix/src/test/resources/runtimets/results/graphix/inference-resolution/inference-resolution.6.adm
@@ -0,0 +1 @@
+{ "e_length": 2, "e_label": "FRIENDS_WITH", "n_label": "User" }
\ No newline at end of file
diff --git a/asterix-graphix/src/test/resources/runtimets/results/graphix/left-match/left-match.3.adm b/asterix-graphix/src/test/resources/runtimets/results/graphix/left-match/left-match.3.adm
new file mode 100644
index 0000000..6e6daf8
--- /dev/null
+++ b/asterix-graphix/src/test/resources/runtimets/results/graphix/left-match/left-match.3.adm
@@ -0,0 +1,3 @@
+{ "u1_user_id": 1, "mb_user_id": 1, "mb_review_id": "A", "r_review_id": "A" }
+{ "u1_user_id": 1, "mb_user_id": 1, "mb_review_id": "C", "r_review_id": "C" }
+{ "u1_user_id": 2, "fw_user_id": 2, "fw_friend": 3, "u2_user_id": 3, "mb_user_id": 2, "mb_review_id": "B", "r_review_id": "B" }
\ No newline at end of file
diff --git a/asterix-graphix/src/test/resources/runtimets/results/graphix/left-match/left-match.4.adm b/asterix-graphix/src/test/resources/runtimets/results/graphix/left-match/left-match.4.adm
new file mode 100644
index 0000000..9a221cf
--- /dev/null
+++ b/asterix-graphix/src/test/resources/runtimets/results/graphix/left-match/left-match.4.adm
@@ -0,0 +1,2 @@
+{ "u1_user_id": 1, "fw_user_id": 1, "fw_friend": 2, "u2_user_id": 2 }
+{ "u1_user_id": 2, "fw_user_id": 2, "fw_friend": 3, "u2_user_id": 3, "mb_user_id": 2, "mb_review_id": "A", "r_review_id": "A" }
\ No newline at end of file
diff --git a/asterix-graphix/src/test/resources/runtimets/results/graphix/left-match/left-match.5.adm b/asterix-graphix/src/test/resources/runtimets/results/graphix/left-match/left-match.5.adm
new file mode 100644
index 0000000..5c82883
--- /dev/null
+++ b/asterix-graphix/src/test/resources/runtimets/results/graphix/left-match/left-match.5.adm
@@ -0,0 +1,5 @@
+{ "u1_user_id": 1, "fw1_user_id": 1, "fw1_friend": 2, "u2_user_id": 2, "u3_user_id": 3, "mb_user_id": 3, "mb_review_id": "A", "r_review_id": "A", "fw2_user_id": 3, "fw2_friend": 1 }
+{ "u1_user_id": 1, "fw1_user_id": 1, "fw1_friend": 2, "u2_user_id": 2, "u3_user_id": 4, "mb_user_id": 4, "mb_review_id": "B", "r_review_id": "B", "fw2_user_id": 4, "fw2_friend": 1 }
+{ "u1_user_id": 1, "fw1_user_id": 1, "fw1_friend": 4, "u2_user_id": 4, "u3_user_id": 3, "mb_user_id": 3, "mb_review_id": "A", "r_review_id": "A", "fw2_user_id": 3, "fw2_friend": 1 }
+{ "u1_user_id": 3, "fw1_user_id": 3, "fw1_friend": 1, "u2_user_id": 1 }
+{ "u1_user_id": 4, "fw1_user_id": 4, "fw1_friend": 1, "u2_user_id": 1 }
\ No newline at end of file
diff --git a/asterix-graphix/src/test/resources/runtimets/results/graphix/left-match/left-match.6.adm b/asterix-graphix/src/test/resources/runtimets/results/graphix/left-match/left-match.6.adm
new file mode 100644
index 0000000..f3ea80e
--- /dev/null
+++ b/asterix-graphix/src/test/resources/runtimets/results/graphix/left-match/left-match.6.adm
@@ -0,0 +1,5 @@
+{ "u1_user_id": 1, "fw1_user_id": 1, "fw1_friend": 2, "u2_user_id": 2, "mb_user_id": 2, "mb_review_id": "A", "r_review_id": "A" }
+{ "u1_user_id": 1, "fw1_user_id": 1, "fw1_friend": 3, "u2_user_id": 3, "mb_user_id": 3, "mb_review_id": "B", "r_review_id": "B", "fw2_user_id": 3, "fw2_friend": 4, "u3_user_id": 4 }
+{ "u1_user_id": 1, "fw1_user_id": 1, "fw1_friend": 3, "u2_user_id": 3, "mb_user_id": 3, "mb_review_id": "B", "r_review_id": "B", "fw2_user_id": 3, "fw2_friend": 5, "u3_user_id": 5 }
+{ "u1_user_id": 3, "fw1_user_id": 3, "fw1_friend": 4, "u2_user_id": 4 }
+{ "u1_user_id": 3, "fw1_user_id": 3, "fw1_friend": 5, "u2_user_id": 5 }
\ No newline at end of file
diff --git a/asterix-graphix/src/test/resources/runtimets/results/graphix/minimal-resolution/minimal-resolution.3.adm b/asterix-graphix/src/test/resources/runtimets/results/graphix/minimal-resolution/minimal-resolution.3.adm
new file mode 100644
index 0000000..bf58f6a
--- /dev/null
+++ b/asterix-graphix/src/test/resources/runtimets/results/graphix/minimal-resolution/minimal-resolution.3.adm
@@ -0,0 +1,4 @@
+{ "user_id": 1 }
+{ "user_id": 2 }
+{ "user_id": 3 }
+{ "user_id": 4 }
\ No newline at end of file
diff --git a/asterix-graphix/src/test/resources/runtimets/results/graphix/minimal-resolution/minimal-resolution.4.adm b/asterix-graphix/src/test/resources/runtimets/results/graphix/minimal-resolution/minimal-resolution.4.adm
new file mode 100644
index 0000000..9fd8681
--- /dev/null
+++ b/asterix-graphix/src/test/resources/runtimets/results/graphix/minimal-resolution/minimal-resolution.4.adm
@@ -0,0 +1,10 @@
+{ "user_id": 1 }
+{ "user_id": 1, "review_id": "A" }
+{ "user_id": 1, "review_id": "B" }
+{ "user_id": 2 }
+{ "user_id": 2, "review_id": "C" }
+{ "user_id": 3 }
+{ "user_id": 3, "review_id": "D" }
+{ "user_id": 4 }
+{ "user_id": 4, "review_id": "E" }
+{ "user_id": 5, "review_id": "F" }
\ No newline at end of file
diff --git a/asterix-graphix/src/test/resources/runtimets/results/graphix/minimal-resolution/minimal-resolution.5.adm b/asterix-graphix/src/test/resources/runtimets/results/graphix/minimal-resolution/minimal-resolution.5.adm
new file mode 100644
index 0000000..843d7f9
--- /dev/null
+++ b/asterix-graphix/src/test/resources/runtimets/results/graphix/minimal-resolution/minimal-resolution.5.adm
@@ -0,0 +1,10 @@
+{ "left_review_id": "A", "right_user_id": 1, "e_user_id": 1, "e_review_id": "A" }
+{ "left_review_id": "B", "right_user_id": 1, "e_user_id": 1, "e_review_id": "B" }
+{ "left_review_id": "C", "right_user_id": 2, "e_user_id": 2, "e_review_id": "C" }
+{ "left_review_id": "D", "right_user_id": 3, "e_user_id": 3, "e_review_id": "D" }
+{ "left_review_id": "E", "right_user_id": 4, "e_user_id": 4, "e_review_id": "E" }
+{ "left_user_id": 1, "right_review_id": "A", "e_user_id": 1, "e_review_id": "A" }
+{ "left_user_id": 1, "right_review_id": "B", "e_user_id": 1, "e_review_id": "B" }
+{ "left_user_id": 2, "right_review_id": "C", "e_user_id": 2, "e_review_id": "C" }
+{ "left_user_id": 3, "right_review_id": "D", "e_user_id": 3, "e_review_id": "D" }
+{ "left_user_id": 4, "right_review_id": "E", "e_user_id": 4, "e_review_id": "E" }
\ No newline at end of file
diff --git a/asterix-graphix/src/test/resources/runtimets/results/graphix/minimal-resolution/minimal-resolution.6.adm b/asterix-graphix/src/test/resources/runtimets/results/graphix/minimal-resolution/minimal-resolution.6.adm
new file mode 100644
index 0000000..b451053
--- /dev/null
+++ b/asterix-graphix/src/test/resources/runtimets/results/graphix/minimal-resolution/minimal-resolution.6.adm
@@ -0,0 +1,8 @@
+{ "source_user_id": 1, "dest_user_id": 2, "e_user_id": 1, "e_friend": 2 }
+{ "source_user_id": 3, "dest_user_id": 2, "e_user_id": 3, "e_friend": 2 }
+{ "source_user_id": 4, "dest_user_id": 2, "e_user_id": 4, "e_friend": 2 }
+{ "source_review_id": "A", "dest_user_id": 1, "e_user_id": 1, "e_review_id": "A" }
+{ "source_review_id": "B", "dest_user_id": 1, "e_user_id": 1, "e_review_id": "B" }
+{ "source_review_id": "C", "dest_user_id": 2, "e_user_id": 2, "e_review_id": "C" }
+{ "source_review_id": "D", "dest_user_id": 3, "e_user_id": 3, "e_review_id": "D" }
+{ "source_review_id": "E", "dest_user_id": 4, "e_user_id": 4, "e_review_id": "E" }
\ No newline at end of file
diff --git a/asterix-graphix/src/test/resources/runtimets/results/graphix/path-variable/path-variable.3.adm b/asterix-graphix/src/test/resources/runtimets/results/graphix/path-variable/path-variable.3.adm
new file mode 100644
index 0000000..dc47f05
--- /dev/null
+++ b/asterix-graphix/src/test/resources/runtimets/results/graphix/path-variable/path-variable.3.adm
@@ -0,0 +1,4 @@
+{ "pathLength": 0, "edgeRecord": { "Edge": null, "RightVertex": null, "LeftVertex": { "user_id": 1, "best_friend": 2, "_GraphixElementDetail": { "Label": "User" }, "_GraphixVertexDetail": { "PrimaryKey": { "user_id": 1 } } } } }
+{ "pathLength": 0, "edgeRecord": { "Edge": null, "RightVertex": null, "LeftVertex": { "user_id": 2, "best_friend": 3, "_GraphixElementDetail": { "Label": "User" }, "_GraphixVertexDetail": { "PrimaryKey": { "user_id": 2 } } } } }
+{ "pathLength": 0, "edgeRecord": { "Edge": null, "RightVertex": null, "LeftVertex": { "user_id": 3, "_GraphixElementDetail": { "Label": "User" }, "_GraphixVertexDetail": { "PrimaryKey": { "user_id": 3 } } } } }
+{ "pathLength": 0, "edgeRecord": { "Edge": null, "RightVertex": null, "LeftVertex": { "user_id": 4, "_GraphixElementDetail": { "Label": "User" }, "_GraphixVertexDetail": { "PrimaryKey": { "user_id": 4 } } } } }
\ No newline at end of file
diff --git a/asterix-graphix/src/test/resources/runtimets/results/graphix/path-variable/path-variable.4.adm b/asterix-graphix/src/test/resources/runtimets/results/graphix/path-variable/path-variable.4.adm
new file mode 100644
index 0000000..be295c8
--- /dev/null
+++ b/asterix-graphix/src/test/resources/runtimets/results/graphix/path-variable/path-variable.4.adm
@@ -0,0 +1,6 @@
+{ "pathLength": 1, "edgeRecord": { "LeftVertex": { "user_id": 1, "best_friend": 2, "_GraphixElementDetail": { "Label": "User" }, "_GraphixVertexDetail": { "PrimaryKey": { "user_id": 1 } } }, "Edge": { "review_id": "A", "user_id": 1, "_GraphixElementDetail": { "Label": "MADE_BY" }, "_GraphixEdgeDetail": { "EdgeDirection": "RIGHT_TO_LEFT", "SourceKey": { "review_id": "A" }, "DestinationKey": { "user_id": 1 } } }, "RightVertex": { "review_id": "A", "user_id": 1, "_GraphixElementDetail": { "Label": "Review" }, "_GraphixVertexDetail": { "PrimaryKey": { "review_id": "A" } } } } }
+{ "pathLength": 1, "edgeRecord": { "LeftVertex": { "user_id": 1, "best_friend": 2, "_GraphixElementDetail": { "Label": "User" }, "_GraphixVertexDetail": { "PrimaryKey": { "user_id": 1 } } }, "Edge": { "review_id": "B", "user_id": 1, "_GraphixElementDetail": { "Label": "MADE_BY" }, "_GraphixEdgeDetail": { "EdgeDirection": "RIGHT_TO_LEFT", "SourceKey": { "review_id": "B" }, "DestinationKey": { "user_id": 1 } } }, "RightVertex": { "review_id": "B", "user_id": 1, "_GraphixElementDetail": { "Label": "Review" }, "_GraphixVertexDetail": { "PrimaryKey": { "review_id": "B" } } } } }
+{ "pathLength": 1, "edgeRecord": { "LeftVertex": { "user_id": 1, "best_friend": 2, "_GraphixElementDetail": { "Label": "User" }, "_GraphixVertexDetail": { "PrimaryKey": { "user_id": 1 } } }, "Edge": { "review_id": "C", "user_id": 1, "_GraphixElementDetail": { "Label": "MADE_BY" }, "_GraphixEdgeDetail": { "EdgeDirection": "RIGHT_TO_LEFT", "SourceKey": { "review_id": "C" }, "DestinationKey": { "user_id": 1 } } }, "RightVertex": { "review_id": "C", "user_id": 1, "_GraphixElementDetail": { "Label": "Review" }, "_GraphixVertexDetail": { "PrimaryKey": { "review_id": "C" } } } } }
+{ "pathLength": 1, "edgeRecord": { "LeftVertex": { "user_id": 2, "best_friend": 3, "_GraphixElementDetail": { "Label": "User" }, "_GraphixVertexDetail": { "PrimaryKey": { "user_id": 2 } } }, "Edge": { "review_id": "D", "user_id": 2, "_GraphixElementDetail": { "Label": "MADE_BY" }, "_GraphixEdgeDetail": { "EdgeDirection": "RIGHT_TO_LEFT", "SourceKey": { "review_id": "D" }, "DestinationKey": { "user_id": 2 } } }, "RightVertex": { "review_id": "D", "user_id": 2, "_GraphixElementDetail": { "Label": "Review" }, "_GraphixVertexDetail": { "PrimaryKey": { "review_id": "D" } } } } }
+{ "pathLength": 1, "edgeRecord": { "LeftVertex": { "user_id": 3, "_GraphixElementDetail": { "Label": "User" }, "_GraphixVertexDetail": { "PrimaryKey": { "user_id": 3 } } }, "Edge": { "review_id": "E", "user_id": 3, "_GraphixElementDetail": { "Label": "MADE_BY" }, "_GraphixEdgeDetail": { "EdgeDirection": "RIGHT_TO_LEFT", "SourceKey": { "review_id": "E" }, "DestinationKey": { "user_id": 3 } } }, "RightVertex": { "review_id": "E", "user_id": 3, "_GraphixElementDetail": { "Label": "Review" }, "_GraphixVertexDetail": { "PrimaryKey": { "review_id": "E" } } } } }
+{ "pathLength": 1, "edgeRecord": { "LeftVertex": { "user_id": 4, "_GraphixElementDetail": { "Label": "User" }, "_GraphixVertexDetail": { "PrimaryKey": { "user_id": 4 } } }, "Edge": { "review_id": "F", "user_id": 4, "_GraphixElementDetail": { "Label": "MADE_BY" }, "_GraphixEdgeDetail": { "EdgeDirection": "RIGHT_TO_LEFT", "SourceKey": { "review_id": "F" }, "DestinationKey": { "user_id": 4 } } }, "RightVertex": { "review_id": "F", "user_id": 4, "_GraphixElementDetail": { "Label": "Review" }, "_GraphixVertexDetail": { "PrimaryKey": { "review_id": "F" } } } } }
\ No newline at end of file
diff --git a/asterix-graphix/src/test/resources/runtimets/results/graphix/path-variable/path-variable.5.adm b/asterix-graphix/src/test/resources/runtimets/results/graphix/path-variable/path-variable.5.adm
new file mode 100644
index 0000000..94e906a
--- /dev/null
+++ b/asterix-graphix/src/test/resources/runtimets/results/graphix/path-variable/path-variable.5.adm
@@ -0,0 +1,4 @@
+{ "pathLength": 2, "edgeRecord": { "LeftVertex": { "user_id": 1, "best_friend": 2, "_GraphixElementDetail": { "Label": "User" }, "_GraphixVertexDetail": { "PrimaryKey": { "user_id": 1 } } }, "Edge": { "user_id": 1, "friend": 2, "_GraphixElementDetail": { "Label": "FRIENDS_WITH" }, "_GraphixEdgeDetail": { "EdgeDirection": "LEFT_TO_RIGHT", "SourceKey": { "user_id": 1 }, "DestinationKey": { "friend": 2 } } }, "RightVertex": { "user_id": 2, "best_friend": 3, "_GraphixElementDetail": { "Label": "User" }, "_GraphixVertexDetail": { "PrimaryKey": { "user_id": 2 } } } } }
+{ "pathLength": 2, "edgeRecord": { "LeftVertex": { "user_id": 2, "best_friend": 3, "_GraphixElementDetail": { "Label": "User" }, "_GraphixVertexDetail": { "PrimaryKey": { "user_id": 2 } } }, "Edge": { "user_id": 2, "friend": 3, "_GraphixElementDetail": { "Label": "FRIENDS_WITH" }, "_GraphixEdgeDetail": { "EdgeDirection": "LEFT_TO_RIGHT", "SourceKey": { "user_id": 2 }, "DestinationKey": { "friend": 3 } } }, "RightVertex": { "user_id": 3, "_GraphixElementDetail": { "Label": "User" }, "_GraphixVertexDetail": { "PrimaryKey": { "user_id": 3 } } } } }
+{ "pathLength": 2, "edgeRecord": { "LeftVertex": { "user_id": 2, "best_friend": 3, "_GraphixElementDetail": { "Label": "User" }, "_GraphixVertexDetail": { "PrimaryKey": { "user_id": 2 } } }, "Edge": { "user_id": 1, "friend": 2, "_GraphixElementDetail": { "Label": "FRIENDS_WITH" }, "_GraphixEdgeDetail": { "EdgeDirection": "RIGHT_TO_LEFT", "SourceKey": { "user_id": 1 }, "DestinationKey": { "friend": 2 } } }, "RightVertex": { "user_id": 1, "best_friend": 2, "_GraphixElementDetail": { "Label": "User" }, "_GraphixVertexDetail": { "PrimaryKey": { "user_id": 1 } } } } }
+{ "pathLength": 2, "edgeRecord": { "LeftVertex": { "user_id": 3, "_GraphixElementDetail": { "Label": "User" }, "_GraphixVertexDetail": { "PrimaryKey": { "user_id": 3 } } }, "Edge": { "user_id": 2, "friend": 3, "_GraphixElementDetail": { "Label": "FRIENDS_WITH" }, "_GraphixEdgeDetail": { "EdgeDirection": "RIGHT_TO_LEFT", "SourceKey": { "user_id": 2 }, "DestinationKey": { "friend": 3 } } }, "RightVertex": { "user_id": 2, "best_friend": 3, "_GraphixElementDetail": { "Label": "User" }, "_GraphixVertexDetail": { "PrimaryKey": { "user_id": 2 } } } } }
\ No newline at end of file
diff --git a/asterix-graphix/src/test/resources/runtimets/results/graphix/path-variable/path-variable.6.adm b/asterix-graphix/src/test/resources/runtimets/results/graphix/path-variable/path-variable.6.adm
new file mode 100644
index 0000000..ba46ed7
--- /dev/null
+++ b/asterix-graphix/src/test/resources/runtimets/results/graphix/path-variable/path-variable.6.adm
@@ -0,0 +1,8 @@
+{ "pathLength": 1, "edgeRecord": { "LeftVertex": { "user_id": 1, "best_friend": 2, "_GraphixElementDetail": { "Label": "User" }, "_GraphixVertexDetail": { "PrimaryKey": { "user_id": 1 } } }, "Edge": { "user_id": 1, "friend": 2, "_GraphixElementDetail": { "Label": "FRIENDS_WITH" }, "_GraphixEdgeDetail": { "EdgeDirection": "LEFT_TO_RIGHT", "SourceKey": { "user_id": 1 }, "DestinationKey": { "friend": 2 } } }, "RightVertex": { "user_id": 2, "best_friend": 3, "_GraphixElementDetail": { "Label": "User" }, "_GraphixVertexDetail": { "PrimaryKey": { "user_id": 2 } } } } }
+{ "pathLength": 2, "edgeRecord": { "LeftVertex": { "user_id": 1, "best_friend": 2, "_GraphixElementDetail": { "Label": "User" }, "_GraphixVertexDetail": { "PrimaryKey": { "user_id": 1 } } }, "Edge": { "user_id": 1, "friend": 2, "_GraphixElementDetail": { "Label": "FRIENDS_WITH" }, "_GraphixEdgeDetail": { "EdgeDirection": "LEFT_TO_RIGHT", "SourceKey": { "user_id": 1 }, "DestinationKey": { "friend": 2 } } }, "RightVertex": { "user_id": 2, "best_friend": 3, "_GraphixElementDetail": { "Label": "User" }, "_GraphixVertexDetail": { "PrimaryKey": { "user_id": 2 } } } } }
+{ "pathLength": 2, "edgeRecord": { "LeftVertex": { "user_id": 2, "best_friend": 3, "_GraphixElementDetail": { "Label": "User" }, "_GraphixVertexDetail": { "PrimaryKey": { "user_id": 2 } } }, "Edge": { "user_id": 2, "friend": 3, "_GraphixElementDetail": { "Label": "FRIENDS_WITH" }, "_GraphixEdgeDetail": { "EdgeDirection": "LEFT_TO_RIGHT", "SourceKey": { "user_id": 2 }, "DestinationKey": { "friend": 3 } } }, "RightVertex": { "user_id": 3, "_GraphixElementDetail": { "Label": "User" }, "_GraphixVertexDetail": { "PrimaryKey": { "user_id": 3 } } } } }
+{ "pathLength": 1, "edgeRecord": { "LeftVertex": { "user_id": 2, "best_friend": 3, "_GraphixElementDetail": { "Label": "User" }, "_GraphixVertexDetail": { "PrimaryKey": { "user_id": 2 } } }, "Edge": { "user_id": 1, "friend": 2, "_GraphixElementDetail": { "Label": "FRIENDS_WITH" }, "_GraphixEdgeDetail": { "EdgeDirection": "RIGHT_TO_LEFT", "SourceKey": { "user_id": 1 }, "DestinationKey": { "friend": 2 } } }, "RightVertex": { "user_id": 1, "best_friend": 2, "_GraphixElementDetail": { "Label": "User" }, "_GraphixVertexDetail": { "PrimaryKey": { "user_id": 1 } } } } }
+{ "pathLength": 1, "edgeRecord": { "LeftVertex": { "user_id": 2, "best_friend": 3, "_GraphixElementDetail": { "Label": "User" }, "_GraphixVertexDetail": { "PrimaryKey": { "user_id": 2 } } }, "Edge": { "user_id": 2, "friend": 3, "_GraphixElementDetail": { "Label": "FRIENDS_WITH" }, "_GraphixEdgeDetail": { "EdgeDirection": "LEFT_TO_RIGHT", "SourceKey": { "user_id": 2 }, "DestinationKey": { "friend": 3 } } }, "RightVertex": { "user_id": 3, "_GraphixElementDetail": { "Label": "User" }, "_GraphixVertexDetail": { "PrimaryKey": { "user_id": 3 } } } } }
+{ "pathLength": 2, "edgeRecord": { "LeftVertex": { "user_id": 2, "best_friend": 3, "_GraphixElementDetail": { "Label": "User" }, "_GraphixVertexDetail": { "PrimaryKey": { "user_id": 2 } } }, "Edge": { "user_id": 1, "friend": 2, "_GraphixElementDetail": { "Label": "FRIENDS_WITH" }, "_GraphixEdgeDetail": { "EdgeDirection": "RIGHT_TO_LEFT", "SourceKey": { "user_id": 1 }, "DestinationKey": { "friend": 2 } } }, "RightVertex": { "user_id": 1, "best_friend": 2, "_GraphixElementDetail": { "Label": "User" }, "_GraphixVertexDetail": { "PrimaryKey": { "user_id": 1 } } } } }
+{ "pathLength": 2, "edgeRecord": { "LeftVertex": { "user_id": 3, "_GraphixElementDetail": { "Label": "User" }, "_GraphixVertexDetail": { "PrimaryKey": { "user_id": 3 } } }, "Edge": { "user_id": 2, "friend": 3, "_GraphixElementDetail": { "Label": "FRIENDS_WITH" }, "_GraphixEdgeDetail": { "EdgeDirection": "RIGHT_TO_LEFT", "SourceKey": { "user_id": 2 }, "DestinationKey": { "friend": 3 } } }, "RightVertex": { "user_id": 2, "best_friend": 3, "_GraphixElementDetail": { "Label": "User" }, "_GraphixVertexDetail": { "PrimaryKey": { "user_id": 2 } } } } }
+{ "pathLength": 1, "edgeRecord": { "LeftVertex": { "user_id": 3, "_GraphixElementDetail": { "Label": "User" }, "_GraphixVertexDetail": { "PrimaryKey": { "user_id": 3 } } }, "Edge": { "user_id": 2, "friend": 3, "_GraphixElementDetail": { "Label": "FRIENDS_WITH" }, "_GraphixEdgeDetail": { "EdgeDirection": "RIGHT_TO_LEFT", "SourceKey": { "user_id": 2 }, "DestinationKey": { "friend": 3 } } }, "RightVertex": { "user_id": 2, "best_friend": 3, "_GraphixElementDetail": { "Label": "User" }, "_GraphixVertexDetail": { "PrimaryKey": { "user_id": 2 } } } } }
\ No newline at end of file
diff --git a/asterix-graphix/src/test/resources/runtimets/results/graphix/scope-checking/scope-checking.3.adm b/asterix-graphix/src/test/resources/runtimets/results/graphix/scope-checking/scope-checking.3.adm
new file mode 100644
index 0000000..5744f8b
--- /dev/null
+++ b/asterix-graphix/src/test/resources/runtimets/results/graphix/scope-checking/scope-checking.3.adm
@@ -0,0 +1,3 @@
+{ "user_id": 2 }
+{ "user_id": 3 }
+{ "user_id": 4 }
\ No newline at end of file
diff --git a/asterix-graphix/src/test/resources/runtimets/results/graphix/scope-checking/scope-checking.4.adm b/asterix-graphix/src/test/resources/runtimets/results/graphix/scope-checking/scope-checking.4.adm
new file mode 100644
index 0000000..f55b204
--- /dev/null
+++ b/asterix-graphix/src/test/resources/runtimets/results/graphix/scope-checking/scope-checking.4.adm
@@ -0,0 +1,3 @@
+{ "user_id": 2, "review_id": "D" }
+{ "user_id": 3, "review_id": "E" }
+{ "user_id": 4, "review_id": "F" }
\ No newline at end of file
diff --git a/asterix-graphix/src/test/resources/runtimets/results/graphix/scope-checking/scope-checking.5.adm b/asterix-graphix/src/test/resources/runtimets/results/graphix/scope-checking/scope-checking.5.adm
new file mode 100644
index 0000000..802c33a
--- /dev/null
+++ b/asterix-graphix/src/test/resources/runtimets/results/graphix/scope-checking/scope-checking.5.adm
@@ -0,0 +1,6 @@
+{ "shortestPath": [ 1, 2 ], "u1_user_id": 1, "u2_user_id": 2 }
+{ "shortestPath": [ 1, 3 ], "u1_user_id": 1, "u2_user_id": 3 }
+{ "shortestPath": [ 1, 3, 4 ], "u1_user_id": 1, "u2_user_id": 4 }
+{ "shortestPath": [ 2, 3 ], "u1_user_id": 2, "u2_user_id": 3 }
+{ "shortestPath": [ 2, 3, 4 ], "u1_user_id": 2, "u2_user_id": 4 }
+{ "shortestPath": [ 3, 4 ], "u1_user_id": 3, "u2_user_id": 4 }
\ No newline at end of file
diff --git a/asterix-graphix/src/test/resources/runtimets/results/graphix/scope-checking/scope-checking.6.adm b/asterix-graphix/src/test/resources/runtimets/results/graphix/scope-checking/scope-checking.6.adm
new file mode 100644
index 0000000..802c33a
--- /dev/null
+++ b/asterix-graphix/src/test/resources/runtimets/results/graphix/scope-checking/scope-checking.6.adm
@@ -0,0 +1,6 @@
+{ "shortestPath": [ 1, 2 ], "u1_user_id": 1, "u2_user_id": 2 }
+{ "shortestPath": [ 1, 3 ], "u1_user_id": 1, "u2_user_id": 3 }
+{ "shortestPath": [ 1, 3, 4 ], "u1_user_id": 1, "u2_user_id": 4 }
+{ "shortestPath": [ 2, 3 ], "u1_user_id": 2, "u2_user_id": 3 }
+{ "shortestPath": [ 2, 3, 4 ], "u1_user_id": 2, "u2_user_id": 4 }
+{ "shortestPath": [ 3, 4 ], "u1_user_id": 3, "u2_user_id": 4 }
\ No newline at end of file
diff --git a/asterix-graphix/src/test/resources/runtimets/results/graphix/scope-checking/scope-checking.7.adm b/asterix-graphix/src/test/resources/runtimets/results/graphix/scope-checking/scope-checking.7.adm
new file mode 100644
index 0000000..9b24dd0
--- /dev/null
+++ b/asterix-graphix/src/test/resources/runtimets/results/graphix/scope-checking/scope-checking.7.adm
@@ -0,0 +1,6 @@
+{ "user_id": 1, "review_id": "A" }
+{ "user_id": 1, "review_id": "B" }
+{ "user_id": 1, "review_id": "C" }
+{ "user_id": 2, "review_id": "D" }
+{ "user_id": 3, "review_id": "E" }
+{ "user_id": 4, "review_id": "F" }
\ No newline at end of file
diff --git a/asterix-graphix/src/test/resources/runtimets/results/graphix/scope-checking/scope-checking.8.adm b/asterix-graphix/src/test/resources/runtimets/results/graphix/scope-checking/scope-checking.8.adm
new file mode 100644
index 0000000..9b24dd0
--- /dev/null
+++ b/asterix-graphix/src/test/resources/runtimets/results/graphix/scope-checking/scope-checking.8.adm
@@ -0,0 +1,6 @@
+{ "user_id": 1, "review_id": "A" }
+{ "user_id": 1, "review_id": "B" }
+{ "user_id": 1, "review_id": "C" }
+{ "user_id": 2, "review_id": "D" }
+{ "user_id": 3, "review_id": "E" }
+{ "user_id": 4, "review_id": "F" }
\ No newline at end of file
diff --git a/asterix-graphix/src/test/resources/runtimets/results/graphix/simple-1-edge/simple-1-edge.3.adm b/asterix-graphix/src/test/resources/runtimets/results/graphix/simple-1-edge/simple-1-edge.3.adm
new file mode 100644
index 0000000..710a380
--- /dev/null
+++ b/asterix-graphix/src/test/resources/runtimets/results/graphix/simple-1-edge/simple-1-edge.3.adm
@@ -0,0 +1,4 @@
+{ "u1_user_id": 1, "u2_user_id": 2, "friends": [ 2, 3 ], "fw_user_id": 1, "fw_friend": 2 }
+{ "u1_user_id": 1, "u2_user_id": 3, "friends": [ 2, 3 ], "fw_user_id": 1, "fw_friend": 3 }
+{ "u1_user_id": 2, "u2_user_id": 1, "friends": [ 1 ], "fw_user_id": 2, "fw_friend": 1 }
+{ "u1_user_id": 3, "u2_user_id": 1, "friends": [ 1 ], "fw_user_id": 3, "fw_friend": 1 }
\ No newline at end of file
diff --git a/asterix-graphix/src/test/resources/runtimets/results/graphix/simple-1-edge/simple-1-edge.4.adm b/asterix-graphix/src/test/resources/runtimets/results/graphix/simple-1-edge/simple-1-edge.4.adm
new file mode 100644
index 0000000..d340a90
--- /dev/null
+++ b/asterix-graphix/src/test/resources/runtimets/results/graphix/simple-1-edge/simple-1-edge.4.adm
@@ -0,0 +1,6 @@
+{ "u1_user_id": 1, "u2_user_id": 2, "fw_user_id": 1, "fw_friend": 2 }
+{ "u1_user_id": 1, "u2_user_id": 3, "fw_user_id": 1, "fw_friend": 3 }
+{ "u1_user_id": 2, "u2_user_id": 1, "fw_user_id": 2, "fw_friend": 1 }
+{ "u1_user_id": 3, "u2_user_id": 1, "fw_user_id": 3, "fw_friend": 1 }
+{ "u1_user_id": 4, "u2_user_id": 1, "fw_user_id": 4, "fw_friend": 1 }
+{ "u1_user_id": 4, "u2_user_id": 2, "fw_user_id": 4, "fw_friend": 2 }
\ No newline at end of file
diff --git a/asterix-graphix/src/test/resources/runtimets/results/graphix/simple-1-edge/simple-1-edge.5.adm b/asterix-graphix/src/test/resources/runtimets/results/graphix/simple-1-edge/simple-1-edge.5.adm
new file mode 100644
index 0000000..190ae9b
--- /dev/null
+++ b/asterix-graphix/src/test/resources/runtimets/results/graphix/simple-1-edge/simple-1-edge.5.adm
@@ -0,0 +1,6 @@
+{ "u1_user_id": 1, "u2_user_id": 2 }
+{ "u1_user_id": 1, "u2_user_id": 3 }
+{ "u1_user_id": 2, "u2_user_id": 1 }
+{ "u1_user_id": 3, "u2_user_id": 1 }
+{ "u1_user_id": 4, "u2_user_id": 1 }
+{ "u1_user_id": 4, "u2_user_id": 2 }
\ No newline at end of file
diff --git a/asterix-graphix/src/test/resources/runtimets/results/graphix/simple-1-edge/simple-1-edge.6.adm b/asterix-graphix/src/test/resources/runtimets/results/graphix/simple-1-edge/simple-1-edge.6.adm
new file mode 100644
index 0000000..48e9814
--- /dev/null
+++ b/asterix-graphix/src/test/resources/runtimets/results/graphix/simple-1-edge/simple-1-edge.6.adm
@@ -0,0 +1,40 @@
+{ "u_user_id": 1, "r_review_id": "A", "n_review_id": "B" }
+{ "u_user_id": 1, "r_review_id": "A", "n_review_id": "C" }
+{ "u_user_id": 1, "r_review_id": "A", "n_review_id": "D" }
+{ "u_user_id": 1, "r_review_id": "A", "n_review_id": "E" }
+{ "u_user_id": 1, "r_review_id": "A", "n_review_id": "F" }
+{ "u_user_id": 1, "r_review_id": "A", "n_user_id": 2 }
+{ "u_user_id": 1, "r_review_id": "A", "n_user_id": 3 }
+{ "u_user_id": 1, "r_review_id": "A", "n_user_id": 4 }
+{ "u_user_id": 1, "r_review_id": "B", "n_review_id": "A" }
+{ "u_user_id": 1, "r_review_id": "B", "n_review_id": "C" }
+{ "u_user_id": 1, "r_review_id": "B", "n_review_id": "D" }
+{ "u_user_id": 1, "r_review_id": "B", "n_review_id": "E" }
+{ "u_user_id": 1, "r_review_id": "B", "n_review_id": "F" }
+{ "u_user_id": 1, "r_review_id": "B", "n_user_id": 2 }
+{ "u_user_id": 1, "r_review_id": "B", "n_user_id": 3 }
+{ "u_user_id": 1, "r_review_id": "B", "n_user_id": 4 }
+{ "u_user_id": 2, "r_review_id": "C", "n_review_id": "A" }
+{ "u_user_id": 2, "r_review_id": "C", "n_review_id": "B" }
+{ "u_user_id": 2, "r_review_id": "C", "n_review_id": "D" }
+{ "u_user_id": 2, "r_review_id": "C", "n_review_id": "E" }
+{ "u_user_id": 2, "r_review_id": "C", "n_review_id": "F" }
+{ "u_user_id": 2, "r_review_id": "C", "n_user_id": 1 }
+{ "u_user_id": 2, "r_review_id": "C", "n_user_id": 3 }
+{ "u_user_id": 2, "r_review_id": "C", "n_user_id": 4 }
+{ "u_user_id": 3, "r_review_id": "D", "n_review_id": "A" }
+{ "u_user_id": 3, "r_review_id": "D", "n_review_id": "B" }
+{ "u_user_id": 3, "r_review_id": "D", "n_review_id": "C" }
+{ "u_user_id": 3, "r_review_id": "D", "n_review_id": "E" }
+{ "u_user_id": 3, "r_review_id": "D", "n_review_id": "F" }
+{ "u_user_id": 3, "r_review_id": "D", "n_user_id": 1 }
+{ "u_user_id": 3, "r_review_id": "D", "n_user_id": 2 }
+{ "u_user_id": 3, "r_review_id": "D", "n_user_id": 4 }
+{ "u_user_id": 4, "r_review_id": "E", "n_review_id": "A" }
+{ "u_user_id": 4, "r_review_id": "E", "n_review_id": "B" }
+{ "u_user_id": 4, "r_review_id": "E", "n_review_id": "C" }
+{ "u_user_id": 4, "r_review_id": "E", "n_review_id": "D" }
+{ "u_user_id": 4, "r_review_id": "E", "n_review_id": "F" }
+{ "u_user_id": 4, "r_review_id": "E", "n_user_id": 1 }
+{ "u_user_id": 4, "r_review_id": "E", "n_user_id": 2 }
+{ "u_user_id": 4, "r_review_id": "E", "n_user_id": 3 }
\ No newline at end of file
diff --git a/asterix-graphix/src/test/resources/runtimets/results/graphix/simple-n-edge/simple-n-edge.3.adm b/asterix-graphix/src/test/resources/runtimets/results/graphix/simple-n-edge/simple-n-edge.3.adm
new file mode 100644
index 0000000..8066712
--- /dev/null
+++ b/asterix-graphix/src/test/resources/runtimets/results/graphix/simple-n-edge/simple-n-edge.3.adm
@@ -0,0 +1,8 @@
+{ "u_user_id": 1, "r1_review_id": "A", "r2_review_id": "B", "mb1_user_id": 1, "mb2_user_id": 1, "mb1_review_id": "A", "mb2_review_id": "B" }
+{ "u_user_id": 1, "r1_review_id": "A", "r2_review_id": "C", "mb1_user_id": 1, "mb2_user_id": 1, "mb1_review_id": "A", "mb2_review_id": "C" }
+{ "u_user_id": 1, "r1_review_id": "B", "r2_review_id": "A", "mb1_user_id": 1, "mb2_user_id": 1, "mb1_review_id": "B", "mb2_review_id": "A" }
+{ "u_user_id": 1, "r1_review_id": "B", "r2_review_id": "C", "mb1_user_id": 1, "mb2_user_id": 1, "mb1_review_id": "B", "mb2_review_id": "C" }
+{ "u_user_id": 1, "r1_review_id": "C", "r2_review_id": "A", "mb1_user_id": 1, "mb2_user_id": 1, "mb1_review_id": "C", "mb2_review_id": "A" }
+{ "u_user_id": 1, "r1_review_id": "C", "r2_review_id": "B", "mb1_user_id": 1, "mb2_user_id": 1, "mb1_review_id": "C", "mb2_review_id": "B" }
+{ "u_user_id": 2, "r1_review_id": "D", "r2_review_id": "E", "mb1_user_id": 2, "mb2_user_id": 2, "mb1_review_id": "D", "mb2_review_id": "E" }
+{ "u_user_id": 2, "r1_review_id": "E", "r2_review_id": "D", "mb1_user_id": 2, "mb2_user_id": 2, "mb1_review_id": "E", "mb2_review_id": "D" }
\ No newline at end of file
diff --git a/asterix-graphix/src/test/resources/runtimets/results/graphix/simple-n-edge/simple-n-edge.4.adm b/asterix-graphix/src/test/resources/runtimets/results/graphix/simple-n-edge/simple-n-edge.4.adm
new file mode 100644
index 0000000..5dc5f34
--- /dev/null
+++ b/asterix-graphix/src/test/resources/runtimets/results/graphix/simple-n-edge/simple-n-edge.4.adm
@@ -0,0 +1,6 @@
+{ "u_user_id": 1, "r1_review_id": "A", "r2_review_id": "B", "r3_review_id": "C", "mb1_user_id": 1, "mb2_user_id": 1, "mb3_user_id": 1, "mb1_review_id": "A", "mb2_review_id": "B", "mb3_review_id": "C" }
+{ "u_user_id": 1, "r1_review_id": "A", "r2_review_id": "C", "r3_review_id": "B", "mb1_user_id": 1, "mb2_user_id": 1, "mb3_user_id": 1, "mb1_review_id": "A", "mb2_review_id": "C", "mb3_review_id": "B" }
+{ "u_user_id": 1, "r1_review_id": "B", "r2_review_id": "A", "r3_review_id": "C", "mb1_user_id": 1, "mb2_user_id": 1, "mb3_user_id": 1, "mb1_review_id": "B", "mb2_review_id": "A", "mb3_review_id": "C" }
+{ "u_user_id": 1, "r1_review_id": "B", "r2_review_id": "C", "r3_review_id": "A", "mb1_user_id": 1, "mb2_user_id": 1, "mb3_user_id": 1, "mb1_review_id": "B", "mb2_review_id": "C", "mb3_review_id": "A" }
+{ "u_user_id": 1, "r1_review_id": "C", "r2_review_id": "A", "r3_review_id": "B", "mb1_user_id": 1, "mb2_user_id": 1, "mb3_user_id": 1, "mb1_review_id": "C", "mb2_review_id": "A", "mb3_review_id": "B" }
+{ "u_user_id": 1, "r1_review_id": "C", "r2_review_id": "B", "r3_review_id": "A", "mb1_user_id": 1, "mb2_user_id": 1, "mb3_user_id": 1, "mb1_review_id": "C", "mb2_review_id": "B", "mb3_review_id": "A" }
\ No newline at end of file
diff --git a/asterix-graphix/src/test/resources/runtimets/results/graphix/simple-n-edge/simple-n-edge.5.adm b/asterix-graphix/src/test/resources/runtimets/results/graphix/simple-n-edge/simple-n-edge.5.adm
new file mode 100644
index 0000000..e007129
--- /dev/null
+++ b/asterix-graphix/src/test/resources/runtimets/results/graphix/simple-n-edge/simple-n-edge.5.adm
@@ -0,0 +1,2 @@
+{ "u_user_id": 1, "v_user_id": 2, "w_user_id": 3, "e1_user_id": 1, "e1_friend": 2, "e2_user_id": 2, "e2_friend": 3 }
+{ "u_user_id": 3, "v_user_id": 2, "w_user_id": 1, "e1_user_id": 2, "e1_friend": 3, "e2_user_id": 1, "e2_friend": 2 }
\ No newline at end of file
diff --git a/asterix-graphix/src/test/resources/runtimets/results/graphix/simple-n-edge/simple-n-edge.6.adm b/asterix-graphix/src/test/resources/runtimets/results/graphix/simple-n-edge/simple-n-edge.6.adm
new file mode 100644
index 0000000..a3464bc
--- /dev/null
+++ b/asterix-graphix/src/test/resources/runtimets/results/graphix/simple-n-edge/simple-n-edge.6.adm
@@ -0,0 +1 @@
+{ "u_user_id": 1, "v_user_id": 2, "w_user_id": 3, "e1_user_id": 1, "e1_friend": 2, "e2_user_id": 2, "e2_friend": 3 }
\ No newline at end of file
diff --git a/asterix-graphix/src/test/resources/runtimets/results/graphix/simple-n-edge/simple-n-edge.7.adm b/asterix-graphix/src/test/resources/runtimets/results/graphix/simple-n-edge/simple-n-edge.7.adm
new file mode 100644
index 0000000..f672b8d
--- /dev/null
+++ b/asterix-graphix/src/test/resources/runtimets/results/graphix/simple-n-edge/simple-n-edge.7.adm
@@ -0,0 +1,2 @@
+{ "u_user_id": 1, "v_user_id": 2, "w_user_id": 3, "y_user_id": 4 }
+{ "u_user_id": 4, "v_user_id": 3, "w_user_id": 2, "y_user_id": 1 }
\ No newline at end of file
diff --git a/asterix-graphix/src/test/resources/runtimets/results/graphix/variable-sub-path/variable-sub-path.3.adm b/asterix-graphix/src/test/resources/runtimets/results/graphix/variable-sub-path/variable-sub-path.3.adm
new file mode 100644
index 0000000..5f0bdb6
--- /dev/null
+++ b/asterix-graphix/src/test/resources/runtimets/results/graphix/variable-sub-path/variable-sub-path.3.adm
@@ -0,0 +1,22 @@
+{ "fw_count": 1, "u1_user_id": 1, "fw_left_vertex": { "user_id": 2 }, "u2_user_id": 2 }
+{ "fw_count": 2, "u1_user_id": 1, "fw_left_vertex": { "user_id": 2 }, "u2_user_id": 3 }
+{ "fw_count": 3, "u1_user_id": 1, "fw_left_vertex": { "user_id": 2 }, "u2_user_id": 4 }
+{ "fw_count": 2, "u1_user_id": 1, "fw_left_vertex": { "user_id": 3 }, "u2_user_id": 3 }
+{ "fw_count": 3, "u1_user_id": 1, "fw_left_vertex": { "user_id": 3 }, "u2_user_id": 4 }
+{ "fw_count": 3, "u1_user_id": 1, "fw_left_vertex": { "user_id": 4 }, "u2_user_id": 4 }
+{ "fw_count": 1, "u1_user_id": 2, "fw_left_vertex": { "user_id": 3 }, "u2_user_id": 3 }
+{ "fw_count": 2, "u1_user_id": 2, "fw_left_vertex": { "user_id": 3 }, "u2_user_id": 4 }
+{ "fw_count": 3, "u1_user_id": 2, "fw_left_vertex": { "user_id": 3 }, "u2_user_id": 5 }
+{ "fw_count": 2, "u1_user_id": 2, "fw_left_vertex": { "user_id": 4 }, "u2_user_id": 4 }
+{ "fw_count": 3, "u1_user_id": 2, "fw_left_vertex": { "user_id": 4 }, "u2_user_id": 5 }
+{ "fw_count": 3, "u1_user_id": 2, "fw_left_vertex": { "user_id": 5 }, "u2_user_id": 5 }
+{ "fw_count": 1, "u1_user_id": 3, "fw_left_vertex": { "user_id": 4 }, "u2_user_id": 4 }
+{ "fw_count": 2, "u1_user_id": 3, "fw_left_vertex": { "user_id": 4 }, "u2_user_id": 5 }
+{ "fw_count": 3, "u1_user_id": 3, "fw_left_vertex": { "user_id": 4 }, "u2_user_id": 6 }
+{ "fw_count": 2, "u1_user_id": 3, "fw_left_vertex": { "user_id": 5 }, "u2_user_id": 5 }
+{ "fw_count": 3, "u1_user_id": 3, "fw_left_vertex": { "user_id": 5 }, "u2_user_id": 6 }
+{ "fw_count": 3, "u1_user_id": 3, "fw_left_vertex": { "user_id": 6 }, "u2_user_id": 6 }
+{ "fw_count": 1, "u1_user_id": 4, "fw_left_vertex": { "user_id": 5 }, "u2_user_id": 5 }
+{ "fw_count": 2, "u1_user_id": 4, "fw_left_vertex": { "user_id": 5 }, "u2_user_id": 6 }
+{ "fw_count": 2, "u1_user_id": 4, "fw_left_vertex": { "user_id": 6 }, "u2_user_id": 6 }
+{ "fw_count": 1, "u1_user_id": 5, "fw_left_vertex": { "user_id": 6 }, "u2_user_id": 6 }
\ No newline at end of file
diff --git a/asterix-graphix/src/test/resources/runtimets/results/graphix/variable-sub-path/variable-sub-path.4.adm b/asterix-graphix/src/test/resources/runtimets/results/graphix/variable-sub-path/variable-sub-path.4.adm
new file mode 100644
index 0000000..581cb48
--- /dev/null
+++ b/asterix-graphix/src/test/resources/runtimets/results/graphix/variable-sub-path/variable-sub-path.4.adm
@@ -0,0 +1,26 @@
+{ "fw_hops": 1, "u1_user_id": 1, "fw_left_vertex": { "user_id": 2 }, "dir": "RIGHT_TO_LEFT", "u2_user_id": 2 }
+{ "fw_hops": 2, "u1_user_id": 1, "fw_left_vertex": { "user_id": 2 }, "dir": "RIGHT_TO_LEFT", "u2_user_id": 3 }
+{ "fw_hops": 2, "u1_user_id": 1, "fw_left_vertex": { "user_id": 3 }, "dir": "RIGHT_TO_LEFT", "u2_user_id": 3 }
+{ "fw_hops": 1, "u1_user_id": 2, "fw_left_vertex": { "user_id": 1 }, "dir": "LEFT_TO_RIGHT", "u2_user_id": 1 }
+{ "fw_hops": 1, "u1_user_id": 2, "fw_left_vertex": { "user_id": 3 }, "dir": "RIGHT_TO_LEFT", "u2_user_id": 3 }
+{ "fw_hops": 2, "u1_user_id": 2, "fw_left_vertex": { "user_id": 3 }, "dir": "RIGHT_TO_LEFT", "u2_user_id": 4 }
+{ "fw_hops": 2, "u1_user_id": 2, "fw_left_vertex": { "user_id": 4 }, "dir": "RIGHT_TO_LEFT", "u2_user_id": 4 }
+{ "fw_hops": 2, "u1_user_id": 3, "fw_left_vertex": { "user_id": 1 }, "dir": "LEFT_TO_RIGHT", "u2_user_id": 1 }
+{ "fw_hops": 2, "u1_user_id": 3, "fw_left_vertex": { "user_id": 2 }, "dir": "LEFT_TO_RIGHT", "u2_user_id": 1 }
+{ "fw_hops": 1, "u1_user_id": 3, "fw_left_vertex": { "user_id": 2 }, "dir": "LEFT_TO_RIGHT", "u2_user_id": 2 }
+{ "fw_hops": 1, "u1_user_id": 3, "fw_left_vertex": { "user_id": 4 }, "dir": "RIGHT_TO_LEFT", "u2_user_id": 4 }
+{ "fw_hops": 2, "u1_user_id": 3, "fw_left_vertex": { "user_id": 4 }, "dir": "RIGHT_TO_LEFT", "u2_user_id": 5 }
+{ "fw_hops": 2, "u1_user_id": 3, "fw_left_vertex": { "user_id": 5 }, "dir": "RIGHT_TO_LEFT", "u2_user_id": 5 }
+{ "fw_hops": 2, "u1_user_id": 4, "fw_left_vertex": { "user_id": 2 }, "dir": "LEFT_TO_RIGHT", "u2_user_id": 2 }
+{ "fw_hops": 2, "u1_user_id": 4, "fw_left_vertex": { "user_id": 3 }, "dir": "LEFT_TO_RIGHT", "u2_user_id": 2 }
+{ "fw_hops": 1, "u1_user_id": 4, "fw_left_vertex": { "user_id": 3 }, "dir": "LEFT_TO_RIGHT", "u2_user_id": 3 }
+{ "fw_hops": 1, "u1_user_id": 4, "fw_left_vertex": { "user_id": 5 }, "dir": "RIGHT_TO_LEFT", "u2_user_id": 5 }
+{ "fw_hops": 2, "u1_user_id": 4, "fw_left_vertex": { "user_id": 5 }, "dir": "RIGHT_TO_LEFT", "u2_user_id": 6 }
+{ "fw_hops": 2, "u1_user_id": 4, "fw_left_vertex": { "user_id": 6 }, "dir": "RIGHT_TO_LEFT", "u2_user_id": 6 }
+{ "fw_hops": 2, "u1_user_id": 5, "fw_left_vertex": { "user_id": 3 }, "dir": "LEFT_TO_RIGHT", "u2_user_id": 3 }
+{ "fw_hops": 2, "u1_user_id": 5, "fw_left_vertex": { "user_id": 4 }, "dir": "LEFT_TO_RIGHT", "u2_user_id": 3 }
+{ "fw_hops": 1, "u1_user_id": 5, "fw_left_vertex": { "user_id": 4 }, "dir": "LEFT_TO_RIGHT", "u2_user_id": 4 }
+{ "fw_hops": 1, "u1_user_id": 5, "fw_left_vertex": { "user_id": 6 }, "dir": "RIGHT_TO_LEFT", "u2_user_id": 6 }
+{ "fw_hops": 2, "u1_user_id": 6, "fw_left_vertex": { "user_id": 4 }, "dir": "LEFT_TO_RIGHT", "u2_user_id": 4 }
+{ "fw_hops": 2, "u1_user_id": 6, "fw_left_vertex": { "user_id": 5 }, "dir": "LEFT_TO_RIGHT", "u2_user_id": 4 }
+{ "fw_hops": 1, "u1_user_id": 6, "fw_left_vertex": { "user_id": 5 }, "dir": "LEFT_TO_RIGHT", "u2_user_id": 5 }
\ No newline at end of file
diff --git a/asterix-graphix/src/test/resources/runtimets/testsuite.xml b/asterix-graphix/src/test/resources/runtimets/testsuite.xml
index ea6db85..0ca8de6 100644
--- a/asterix-graphix/src/test/resources/runtimets/testsuite.xml
+++ b/asterix-graphix/src/test/resources/runtimets/testsuite.xml
@@ -20,21 +20,129 @@
             ResultOffsetPath="results"
             QueryOffsetPath="queries"
             QueryFileExtension=".sqlpp">
-  <test-group name="error-handling">
+  <test-group name="create-drop-error">
     <test-case FilePath="graphix">
-      <compilation-unit name="error-handling">
-        <output-dir compare="Text">error-handling</output-dir>
-        <expected-error>Cannot drop dataset (or view) TestDataverse.GenericDataset being used by graph TestGraph</expected-error>
-        <expected-error>Cannot drop function TestDataverse.TestFunction() being used by graph TestGraph</expected-error>
-        <expected-error>Cannot drop dataset (or view) TestDataverse.TestView being used by graph TestGraph</expected-error>
-        <expected-error>Cannot drop synonym TestDataverse.DatasetSynonym being used by graph TestGraph</expected-error>
-        <expected-error>Cannot drop dataverse: dataset (or view) TestDataverse2.GenericDataset being used by graph TestGraph</expected-error>
+      <compilation-unit name="create-drop-error">
+        <output-dir compare="Text">create-drop-error</output-dir>
+        <expected-error>Cannot drop DATASET TestDataverse.GenericDataset being used by GRAPH TestDataverse.TestGraph</expected-error>
+        <expected-error>Cannot drop FUNCTION TestDataverse.TestFunction() being used by GRAPH TestDataverse.TestGraph</expected-error>
+        <expected-error>Cannot drop DATASET TestDataverse.TestView being used by GRAPH TestDataverse.TestGraph</expected-error>
+        <expected-error>Cannot drop SYNONYM TestDataverse.DatasetSynonym being used by GRAPH TestDataverse.TestGraph</expected-error>
+        <expected-error>Cannot drop dataverse: DATASET TestDataverse2.GenericDataset being used by GRAPH TestDataverse.TestGraph</expected-error>
         <expected-error>Bad definition for a graph element(.)*Cannot find dataset DatasetThatDoesNotExist in dataverse TestDataverse nor an alias with name DatasetThatDoesNotExist</expected-error>
         <expected-error>Bad definition for a graph element(.)*Cannot resolve ambiguous alias reference for identifier V</expected-error>
         <expected-error>Conflicting primary keys for vertices with label Vertex1</expected-error>
-        <expected-error>Destination vertex Vertex3 not found in the edge EDGE_1.</expected-error>
-        <expected-error>Graph TestGraph already exists.</expected-error>
-        <expected-error>Graph GraphThatDoesntExist2 does not exist.</expected-error>
+        <expected-error>Destination vertex Vertex3 not found in the edge EDGE_1</expected-error>
+        <expected-error>Graph TestGraph already exists</expected-error>
+        <expected-error>Graph GraphThatDoesntExist2 does not exist</expected-error>
+        <expected-error>Cannot drop GRAPH TestDataverse.TestGraph being used by VIEW TestDataverse.TestView</expected-error>
+        <expected-error>Cannot drop GRAPH TestDataverse.TestGraph being used by FUNCTION TestDataverse.TestFunction</expected-error>
+        <expected-error>Cannot drop GRAPH TestDataverse.TestGraph being used by GRAPH TestDataverse.TestGraph2</expected-error>
+      </compilation-unit>
+    </test-case>
+  </test-group>
+  <test-group name="dangling-vertices">
+    <test-case FilePath="graphix">
+      <compilation-unit name="dangling-vertices">
+        <output-dir compare="Text">dangling-vertices</output-dir>
+      </compilation-unit>
+    </test-case>
+  </test-group>
+  <test-group name="fixed-sub-path">
+    <test-case FilePath="graphix">
+      <compilation-unit name="fixed-sub-path">
+        <output-dir compare="Text">fixed-sub-path</output-dir>
+      </compilation-unit>
+    </test-case>
+  </test-group>
+  <test-group name="graph-isomorphism">
+    <test-case FilePath="graphix">
+      <compilation-unit name="graph-isomorphism">
+        <output-dir compare="Text">graph-isomorphism</output-dir>
+      </compilation-unit>
+    </test-case>
+  </test-group>
+  <test-group name="graphix-functions">
+    <test-case FilePath="graphix">
+      <compilation-unit name="graphix-functions">
+        <output-dir compare="Text">graphix-functions</output-dir>
+      </compilation-unit>
+    </test-case>
+  </test-group>
+  <test-group name="inference-resolution">
+    <test-case FilePath="graphix">
+      <compilation-unit name="inference-resolution">
+        <output-dir compare="Text">inference-resolution</output-dir>
+      </compilation-unit>
+    </test-case>
+  </test-group>
+  <test-group name="left-match">
+    <test-case FilePath="graphix">
+      <compilation-unit name="left-match">
+        <output-dir compare="Text">left-match</output-dir>
+      </compilation-unit>
+    </test-case>
+  </test-group>
+  <test-group name="minimal-resolution">
+    <test-case FilePath="graphix" check-warnings="true">
+      <compilation-unit name="minimal-resolution">
+        <output-dir compare="Text">minimal-resolution</output-dir>
+        <expected-warn>Vertex label could not be resolved. Assuming that vertex $n has all schema labels.</expected-warn>
+        <expected-warn>Vertex label could not be resolved. Assuming that vertex $m has all schema labels.</expected-warn>
+        <expected-warn>Vertex label could not be resolved. Assuming that vertex $n has all schema labels.</expected-warn>
+      </compilation-unit>
+    </test-case>
+  </test-group>
+  <test-group name="on-query-error">
+    <test-case FilePath="graphix">
+      <compilation-unit name="on-query-error">
+        <output-dir compare="Text">on-query-error</output-dir>
+        <expected-error>Vertex $v defined with a label more than once. Labels can only be bound to vertices once.</expected-error>
+        <expected-error>Edge $e defined more than once. Edges can only connect two vertices.</expected-error>
+        <expected-error>Vertex label NonExistentLabel does not exist in the given graph schema.</expected-error>
+        <expected-error>Edge label NON_EXISTENT_EDGE does not exist in the given graph schema.</expected-error>
+        <expected-error>Query edge given, but no edge is defined in the schema.</expected-error>
+        <expected-error>Sub-path edges cannot have a hop length less than 1.</expected-error>
+        <expected-error>Sub-path edges cannot have a maximum hop length (2) less than the minimum hop length (4).</expected-error>
+        <expected-error>Conflicting primary keys for vertices with label Vertex1</expected-error>
+        <expected-error>Cannot resolve alias reference for undefined identifier invalidVariable</expected-error>
+        <expected-error>Cannot resolve alias reference for undefined identifier invalidVariable</expected-error>
+        <expected-error>Cannot resolve alias reference for undefined identifier invalidVariable</expected-error>
+      </compilation-unit>
+    </test-case>
+  </test-group>
+  <test-group name="path-variable">
+    <test-case FilePath="graphix">
+      <compilation-unit name="path-variable">
+        <output-dir compare="Text">path-variable</output-dir>
+      </compilation-unit>
+    </test-case>
+  </test-group>
+  <test-group name="scope-checking">
+    <test-case FilePath="graphix">
+      <compilation-unit name="scope-checking">
+        <output-dir compare="Text">scope-checking</output-dir>
+      </compilation-unit>
+    </test-case>
+  </test-group>
+  <test-group name="simple-1-edge">
+    <test-case FilePath="graphix">
+      <compilation-unit name="simple-1-edge">
+        <output-dir compare="Text">simple-1-edge</output-dir>
+      </compilation-unit>
+    </test-case>
+  </test-group>
+  <test-group name="simple-n-edge">
+    <test-case FilePath="graphix">
+      <compilation-unit name="simple-n-edge">
+        <output-dir compare="Text">simple-n-edge</output-dir>
+      </compilation-unit>
+    </test-case>
+  </test-group>
+  <test-group name="variable-sub-path">
+    <test-case FilePath="graphix">
+      <compilation-unit name="variable-sub-path">
+        <output-dir compare="Text">variable-sub-path</output-dir>
       </compilation-unit>
     </test-case>
   </test-group>