[NO-ISSUE][GRAPHIX] Updating rewriter for Graphix.
Details:
- Rewriter now generates SQLPP ASTs that a) minimize the nesting to
reduce the time to compile and b) maximize the number of hash
JOINs. This is accomplished by aiming for "wide" ASTs (via UNION-ALLs)
as opposed to nested SELECT-EXPRs.
- Rewriter now pushes isomorphism conjuncts earlier (via a "correlated
WHERE clause").
- Schema information for functions are now added in lazy manner, as
opposed to eagerly.
- Added a DECLARE GRAPH statement.
- Added a SOURCE_VERTEX and DEST_VERTEX function.
- Fixed a bug w/ the element resolver not handling sub-paths properly.
Change-Id: I95c56b38e7a01e6f73fe59c2243f88646735ed39
Reviewed-on: https://asterix-gerrit.ics.uci.edu/c/asterixdb-graph/+/16543
Tested-by: Jenkins <jenkins@fulliautomatix.ics.uci.edu>
Reviewed-by: Glenn Galvizo <ggalvizo@uci.edu>
diff --git a/asterix-graphix/src/test/resources/runtimets/testsuite.xml b/asterix-graphix/src/test/resources/runtimets/testsuite.xml
index 0ca8de6..a5ea9fc 100644
--- a/asterix-graphix/src/test/resources/runtimets/testsuite.xml
+++ b/asterix-graphix/src/test/resources/runtimets/testsuite.xml
@@ -31,7 +31,7 @@
<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>Conflicting vertex label found: 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>
@@ -42,9 +42,10 @@
</test-case>
</test-group>
<test-group name="dangling-vertices">
- <test-case FilePath="graphix">
+ <test-case FilePath="graphix" check-warnings="true">
<compilation-unit name="dangling-vertices">
<output-dir compare="Text">dangling-vertices</output-dir>
+ <expected-warn>Potential disconnected pattern encountered! A CROSS-JOIN has been introduced.</expected-warn>
</compilation-unit>
</test-case>
</test-group>
@@ -70,7 +71,7 @@
</test-case>
</test-group>
<test-group name="inference-resolution">
- <test-case FilePath="graphix">
+ <test-case FilePath="graphix" check-warnings="true">
<compilation-unit name="inference-resolution">
<output-dir compare="Text">inference-resolution</output-dir>
</compilation-unit>
@@ -83,16 +84,6 @@
</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">
@@ -104,7 +95,7 @@
<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>Conflicting vertex label found: 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>