Skip to content

Commit

Permalink
fix(interactive): update the integration tests in GOpt-based compilat…
Browse files Browse the repository at this point in the history
…ion (#3786)

#3736

Co-authored-by: 霄磊 <[email protected]>
  • Loading branch information
BingqingLyu and zhanglei1949 authored Jun 7, 2024
1 parent 9ff8c34 commit bee9ee8
Show file tree
Hide file tree
Showing 7 changed files with 333 additions and 69 deletions.
3 changes: 3 additions & 0 deletions interactive_engine/compiler/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -84,6 +84,9 @@ ldbc_test:
# mvn test -Dtest=com.alibaba.graphscope.gremlin.integration.ldbc.IrLdbcTest
mvn test -Dtest=com.alibaba.graphscope.cypher.integration.ldbc.IrLdbcTest

simple_test:
mvn test -Dtest=com.alibaba.graphscope.cypher.integration.ldbc.SimpleMatchTest

# start rpc server
# make run graph.schema:=../executor/ir/core/resource/ldbc_schema.json
pattern_test:
Expand Down
24 changes: 23 additions & 1 deletion interactive_engine/compiler/ir_experimental_advanced_ci.sh
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@ base_dir=$(cd $(dirname $0); pwd)
ps -ef | grep "com.alibaba.graphscope.GraphServer" | awk '{print $2}' | xargs kill -9 || true
ps -ef | grep "start_rpc_server" | awk '{print $2}' | xargs kill -9
sleep 3
# Test1: run advanced tests (pattern & ldbc) on experimental store via ir-core
# start engine service and load ldbc graph with sf=0.1
cd ${base_dir}/../executor/ir/target/release &&
RUST_LOG=info DATA_PATH=/tmp/gstest/ldbc_graph_exp_bin PARTITION_ID=0 ./start_rpc_server --config ${base_dir}/../executor/ir/integrated/config/distributed/server_0 &
Expand All @@ -16,11 +17,32 @@ sleep 5
# run pattern tests and ldbc tests
cd ${base_dir} && make pattern_test && make ldbc_test
exit_code=$?
# clean compiler service
ps -ef | grep "com.alibaba.graphscope.GraphServer" | awk '{print $2}' | xargs kill -9 || true
ps -ef | grep "start_rpc_server" | awk '{print $2}' | xargs kill -9
sleep 3
# report test result
if [ $exit_code -ne 0 ]; then
echo "ir integration pattern test on experimental store fail"
exit 1
fi

# Test2: run advanced tests (pattern & ldbc & simple match) on experimental store via calcite-based ir
# start service
cd ${base_dir}/../executor/ir/target/release &&
RUST_LOG=info DATA_PATH=/tmp/gstest/ldbc_graph_exp_bin PARTITION_ID=0 ./start_rpc_server --config ${base_dir}/../executor/ir/integrated/config/distributed/server_0 &
cd ${base_dir}/../executor/ir/target/release &&
RUST_LOG=info DATA_PATH=/tmp/gstest/ldbc_graph_exp_bin PARTITION_ID=1 ./start_rpc_server --config ${base_dir}/../executor/ir/integrated/config/distributed/server_1 &
sleep 10
cd ${base_dir} && make run graph.schema:=../executor/ir/core/resource/ldbc_schema.json gremlin.script.language.name=antlr_gremlin_calcite physical.opt.config=proto graph.planner.opt=CBO graph.statistics=src/main/resources/statistics/ldbc1_statistics.json pegasus.hosts:=127.0.0.1:1234,127.0.0.1:1235 graph.planner.rules=NotMatchToAntiJoinRule,FilterIntoJoinRule,FilterMatchRule,ExtendIntersectRule,ExpandGetVFusionRule &
sleep 5s
cd ${base_dir} && make pattern_test && make ldbc_test && make simple_test
exit_code=$?
# clean service
ps -ef | grep "com.alibaba.graphscope.GraphServer" | awk '{print $2}' | xargs kill -9 || true
ps -ef | grep "start_rpc_server" | awk '{print $2}' | xargs kill -9
# report test result
if [ $exit_code -ne 0 ]; then
echo "ir integration pattern test on experimental store fail"
echo "ir\(calcite-based\) integration pattern test on experimental store fail"
exit 1
fi
Original file line number Diff line number Diff line change
Expand Up @@ -186,11 +186,21 @@ public static QueryContext get_simple_match_query_15_test() {

List<String> expected =
Arrays.asList(
"Record<{aId: 94, c: path[], bId: 987}>",
"Record<{aId: 94, c: path[], bId: 2199023256154}>",
"Record<{aId: 94, c: path[], bId: 2199023256776}>",
"Record<{aId: 94, c: path[], bId: 6597069767432}>",
"Record<{aId: 94, c: path[], bId: 8796093022369}>");
"Record<{aId: 94, c:"
+ " path[[(72057594037928030)-[771484:KNOWS]->(72057594037928923)],"
+ " bId: 987}>",
"Record<{aId: 94, c:"
+ " path[(72057594037928030)-[771485:KNOWS]->(72059793061184090)], bId:"
+ " 2199023256154}>",
"Record<{aId: 94, c:"
+ " path[(72057594037928030)-[771486:KNOWS]->(72059793061184712)], bId:"
+ " 2199023256776}>",
"Record<{aId: 94, c:"
+ " path[(72057594037928030)-[771487:KNOWS]->(72064191107695368)], bId:"
+ " 6597069767432}>",
"Record<{aId: 94, c:"
+ " path[(72057594037928030)-[771488:KNOWS]->(72066390130950305)]],"
+ " bId: 8796093022369}>");
return new QueryContext(query, expected);
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -154,14 +154,6 @@
test = "org.apache.tinkerpop.gremlin.process.traversal.step.filter.HasTest",
method = "g_EX11X_outV_outE_hasXid_10AsStringX",
reason = "unsupported")
// @Graph.OptOut(
// test = "org.apache.tinkerpop.gremlin.process.traversal.step.filter.IsTest",
// method = "g_V_whereXinXcreatedX_count_isX1XX_valuesXnameX",
// reason = "unsupported")
// @Graph.OptOut(
// test = "org.apache.tinkerpop.gremlin.process.traversal.step.filter.IsTest",
// method = "g_V_whereXinXcreatedX_count_isXgte_2XX_valuesXnameX",
// reason = "unsupported")
@Graph.OptOut(
test = "org.apache.tinkerpop.gremlin.process.traversal.step.filter.RangeTest",
method = "g_V_outE_valuesXweightX_fold_orderXlocalX_skipXlocal_2X",
Expand Down Expand Up @@ -248,16 +240,14 @@
method =
"g_withSideEffectXa_josh_peterX_VX1X_outXcreatedX_inXcreatedX_name_whereXwithinXaXX",
reason = "unsupported")
// @Graph.OptOut(test = "org.apache.tinkerpop.gremlin.process.traversal.step.filter.WhereTest",
// method = "g_V_hasXageX_asXaX_out_in_hasXageX_asXbX_selectXa_bX_whereXa_outXknowsX_bX",
// reason = "unsupported")
@Graph.OptOut(
test = "org.apache.tinkerpop.gremlin.process.traversal.step.filter.WhereTest",
method = "g_V_hasXageX_asXaX_out_in_hasXageX_asXbX_selectXa_bX_whereXa_outXknowsX_bX",
reason = "unsupported")
@Graph.OptOut(
test = "org.apache.tinkerpop.gremlin.process.traversal.step.filter.WhereTest",
method = "g_V_whereXoutXcreatedX_and_outXknowsX_or_inXknowsXX_valuesXnameX",
reason = "unsupported")
// @Graph.OptOut(test = "org.apache.tinkerpop.gremlin.process.traversal.step.filter.WhereTest",
// method = "g_V_whereXnotXoutXcreatedXXX_name",
// reason = "unsupported")
@Graph.OptOut(
test = "org.apache.tinkerpop.gremlin.process.traversal.step.filter.WhereTest",
method =
Expand All @@ -272,9 +262,6 @@
method =
"g_V_asXaX_outEXcreatedX_asXbX_inV_asXcX_inXcreatedX_asXdX_whereXa_ltXbX_orXgtXcXX_andXneqXdXXX_byXageX_byXweightX_byXinXcreatedX_valuesXageX_minX_selectXa_c_dX",
reason = "unsupported")
// @Graph.OptOut(test = "org.apache.tinkerpop.gremlin.process.traversal.step.filter.WhereTest",
// method = "g_V_hasXageX_asXaX_out_in_hasXageX_asXbX_selectXa_bX_whereXb_hasXname_markoXX",
// reason = "unsupported")
@Graph.OptOut(
test = "org.apache.tinkerpop.gremlin.process.traversal.step.filter.WhereTest",
method = "g_VX1X_out_aggregateXxX_out_whereXnotXwithinXaXXX",
Expand Down Expand Up @@ -303,10 +290,6 @@
test = "org.apache.tinkerpop.gremlin.process.traversal.step.map.CountTest",
method = "g_V_both_both_count",
reason = "unsupported")
// @Graph.OptOut(
// test = "org.apache.tinkerpop.gremlin.process.traversal.step.map.CountTest",
// method = "g_V_whereXinXkknowsX_outXcreatedX_count_is_0XX_name",
// reason = "unsupported")
@Graph.OptOut(
test = "org.apache.tinkerpop.gremlin.process.traversal.step.map.GraphTest",
method = "g_V_hasLabelXpersonX_asXpX_VXsoftwareX_addInEXuses_pX",
Expand Down Expand Up @@ -383,10 +366,6 @@
// @Graph.OptOut(test = "org.apache.tinkerpop.gremlin.process.traversal.step.map.OrderTest",
// method = "g_V_order_byXname_incrX_name",
// reason = "unsupported")
// @Graph.OptOut(
// test = "org.apache.tinkerpop.gremlin.process.traversal.step.map.OrderTest",
// method = "g_V_order_byXoutE_count_descX",
// reason = "unsupported")
@Graph.OptOut(
test = "org.apache.tinkerpop.gremlin.process.traversal.step.map.OrderTest",
method = "g_V_order_byXname_a1_b1X_byXname_b2_a2X_name",
Expand Down Expand Up @@ -668,10 +647,6 @@
test = "org.apache.tinkerpop.gremlin.process.traversal.step.sideEffect.GroupTest",
method = "g_V_hasXlangX_groupXaX_byXlangX_byXnameX_out_capXaX",
reason = "unsupported")
// @Graph.OptOut(
// test = "org.apache.tinkerpop.gremlin.process.traversal.step.sideEffect.GroupTest",
// method = "g_V_group_byXoutE_countX_byXnameX",
// reason = "unsupported")
@Graph.OptOut(
test = "org.apache.tinkerpop.gremlin.process.traversal.step.sideEffect.GroupTest",
method = "g_V_groupXaX_byXlabelX_byXoutE_weight_sumX_capXaX",
Expand All @@ -686,10 +661,6 @@
method =
"g_V_unionXrepeatXoutX_timesX2X_groupCountXmX_byXlangXX__repeatXinX_timesX2X_groupCountXmX_byXnameXX_capXmX",
reason = "unsupported")
// @Graph.OptOut(
// test = "org.apache.tinkerpop.gremlin.process.traversal.step.sideEffect.GroupCountTest",
// method = "g_V_groupCount_byXbothE_countX",
// reason = "unsupported")
@Graph.OptOut(
test = "org.apache.tinkerpop.gremlin.process.traversal.step.sideEffect.GroupCountTest",
method = "g_V_repeatXout_groupCountXaX_byXnameXX_timesX2X_capXaX",
Expand Down Expand Up @@ -858,7 +829,7 @@
@Graph.OptOut(
test = "org.apache.tinkerpop.gremlin.process.traversal.step.filter.DedupTest",
method = "g_V_both_both_dedup_byXoutE_countX_name",
reason = "unsupported")
reason = "tested in IrGremlinQueryTest")
// @Graph.OptOut(
// test = "org.apache.tinkerpop.gremlin.process.traversal.step.filter.DedupTest",
// method = "g_V_asXaX_both_asXbX_dedupXa_bX_byXlabelX_selectXa_bX",
Expand Down Expand Up @@ -1020,7 +991,7 @@
@Graph.OptOut(
test = "org.apache.tinkerpop.gremlin.process.traversal.step.filter.HasTest",
method = "g_E_hasXlabelXknowsX",
reason = "Tested in IrGremlinQueryTest")
reason = "tested in IrGremlinQueryTest")
// @Graph.OptOut(
// test = "org.apache.tinkerpop.gremlin.process.traversal.step.map.VertexTest",
// method = "g_VX2X_inE",
Expand Down Expand Up @@ -1212,9 +1183,6 @@
// @Graph.OptOut(method="g_VX1X_asXaX_outXcreatedX_inXcreatedX_asXbX_whereXa_neqXbXX_name" ,
// test="org.apache.tinkerpop.gremlin.process.traversal.step.filter.WhereTest", reason = "will be
// supported")
// @Graph.OptOut(method="g_V_asXaX_outXcreatedX_whereXasXaX_name_isXjoshXX_inXcreatedX_name" ,
// test="org.apache.tinkerpop.gremlin.process.traversal.step.filter.WhereTest", reason = "will be
// supported")
// @Graph.OptOut(method="g_V_asXaX_outXcreatedX_asXbX_inXcreatedX_asXcX_bothXknowsX_bothXknowsX_asXdX_whereXc__notXeqXaX_orXeqXdXXXX_selectXa_b_c_dX" , test="org.apache.tinkerpop.gremlin.process.traversal.step.filter.WhereTest", reason = "will be supported")
// @Graph.OptOut(method="g_V_asXaX_outXcreatedX_inXcreatedX_asXbX_whereXa_gtXbXX_byXageX_selectXa_bX_byXnameX" , test="org.apache.tinkerpop.gremlin.process.traversal.step.filter.WhereTest", reason = "will be supported")
// @Graph.OptOut(method="g_V_hasLabelXpersonX_order_byXageX" ,
Expand Down Expand Up @@ -1257,9 +1225,6 @@
// @Graph.OptOut(method="g_V_asXaX_name_order_asXbX_selectXa_bX_byXnameX_by_XitX" ,
// test="org.apache.tinkerpop.gremlin.process.traversal.step.map.SelectTest", reason = "will be
// supported")
// @Graph.OptOut(method="g_V_asXaX_whereXoutXknowsXX_selectXaX" ,
// test="org.apache.tinkerpop.gremlin.process.traversal.step.map.SelectTest", reason = "will be
// supported")
@Graph.OptOut(
method = "g_EX11X_propertiesXweightX_asXaX_selectXaX_byXvalueX",
test = "org.apache.tinkerpop.gremlin.process.traversal.step.map.SelectTest",
Expand Down Expand Up @@ -1314,7 +1279,7 @@
@Graph.OptOut(
method = "g_V_group_byXageX",
test = "org.apache.tinkerpop.gremlin.process.traversal.step.sideEffect.GroupTest",
reason = "tinkerpop v3.5 takes null key into account, but later version filter null key")
reason = "tested in IrGremlinQueryTest")

// @Graph.OptOut(method="g_V_hasXp_neqXvXX" ,
// test="org.apache.tinkerpop.gremlin.process.traversal.step.filter.HasTest", reason = "existence of
Expand Down Expand Up @@ -1537,67 +1502,63 @@
@Graph.OptOut(
method = "g_V_unionXout__inX_name",
test = "org.apache.tinkerpop.gremlin.process.traversal.step.branch.UnionTest",
reason = "Tested in IrGremlinQueryTest")
reason = "tested in IrGremlinQueryTest")
@Graph.OptOut(
test = "org.apache.tinkerpop.gremlin.process.traversal.step.branch.UnionTest",
method = "g_VX1_2X_unionXoutE_count__inE_count__outE_weight_sumX",
reason = "Tested in IrGremlinQueryTest")
// @Graph.OptOut(
// method = "g_V_haslabel_union_identity_out_values",
// test = "com.alibaba.graphscope.gremlin.integration.suite.standard.IrGremlinQueryTest",
// reason = "union is unsupported yet")
reason = "tested in IrGremlinQueryTest")
@Graph.OptOut(
test = "org.apache.tinkerpop.gremlin.process.traversal.step.filter.HasTest",
method = "g_V_hasLabelXpersonX_hasLabelXsoftwareX",
reason = "throw schema errors instead of returning empty results")
@Graph.OptOut(
test = "org.apache.tinkerpop.gremlin.process.traversal.step.filter.IsTest",
method = "g_V_whereXinXcreatedX_count_isX1XX_valuesXnameX",
reason = "sub query is unsupported yet")
reason = "tested in IrGremlinQueryTest")
@Graph.OptOut(
test = "org.apache.tinkerpop.gremlin.process.traversal.step.filter.IsTest",
method = "g_V_whereXinXcreatedX_count_isXgte_2XX_valuesXnameX",
reason = "sub query is unsupported yet")
@Graph.OptOut(
test = "org.apache.tinkerpop.gremlin.process.traversal.step.filter.WhereTest",
method = "g_V_hasXageX_asXaX_out_in_hasXageX_asXbX_selectXa_bX_whereXa_outXknowsX_bX",
reason = "sub query is unsupported yet")
reason = "tested in IrGremlinQueryTest")
// @Graph.OptOut(
// test = "org.apache.tinkerpop.gremlin.process.traversal.step.filter.WhereTest",
// method = "g_V_hasXageX_asXaX_out_in_hasXageX_asXbX_selectXa_bX_whereXa_outXknowsX_bX",
// reason = "sub query is unsupported yet")
@Graph.OptOut(
test = "org.apache.tinkerpop.gremlin.process.traversal.step.filter.WhereTest",
method = "g_V_whereXnotXoutXcreatedXXX_name",
reason = "sub query is unsupported yet")
reason = "tested in IrGremlinQueryTest")
@Graph.OptOut(
method = "g_V_asXaX_outXcreatedX_whereXasXaX_name_isXjoshXX_inXcreatedX_name",
test = "org.apache.tinkerpop.gremlin.process.traversal.step.filter.WhereTest",
reason = "sub query is unsupported yet")
reason = "tested in IrGremlinQueryTest")
@Graph.OptOut(
test = "org.apache.tinkerpop.gremlin.process.traversal.step.filter.WhereTest",
method = "g_V_hasXageX_asXaX_out_in_hasXageX_asXbX_selectXa_bX_whereXb_hasXname_markoXX",
reason = "sub query is unsupported yet")
reason = "tested in IrGremlinQueryTest")
@Graph.OptOut(
test = "org.apache.tinkerpop.gremlin.process.traversal.step.map.CountTest",
method = "g_V_whereXinXkknowsX_outXcreatedX_count_is_0XX_name",
reason = "sub query is unsupported yet")
reason = "tested in IrGremlinQueryTest")
@Graph.OptOut(
test = "org.apache.tinkerpop.gremlin.process.traversal.step.map.OrderTest",
method = "g_V_order_byXoutE_count_descX",
reason = "sub query is unsupported yet")
reason = "tested in IrGremlinQueryTest")
@Graph.OptOut(
test = "com.alibaba.graphscope.gremlin.integration.suite.standard.IrGremlinQueryTest",
method = "g_V_group_by_outE_count_test",
reason = "sub query is unsupported yet")
reason = "tested in IrGremlinQueryTest")
@Graph.OptOut(
method = "g_V_asXaX_whereXoutXknowsXX_selectXaX",
test = "org.apache.tinkerpop.gremlin.process.traversal.step.map.SelectTest",
reason = "sub query is unsupported yet")
reason = "tested in IrGremlinQueryTest")
@Graph.OptOut(
test = "org.apache.tinkerpop.gremlin.process.traversal.step.sideEffect.GroupTest",
method = "g_V_group_byXoutE_countX_byXnameX",
reason = "sub query is unsupported yet")
reason = "tested in IrGremlinQueryTest")
@Graph.OptOut(
test = "org.apache.tinkerpop.gremlin.process.traversal.step.sideEffect.GroupCountTest",
method = "g_V_groupCount_byXbothE_countX",
reason = "sub query is unsupported yet")
reason = "tested in IrGremlinQueryTest")
@Graph.OptOut(
method =
"g_VX1X_outEXknowsX_asXhereX_hasXweight_1X_asXfakeX_inV_hasXname_joshX_selectXhereX",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,7 @@
import org.apache.tinkerpop.gremlin.process.traversal.Traversal;
import org.apache.tinkerpop.gremlin.structure.Vertex;
import org.junit.Assert;
import org.junit.Ignore;
import org.junit.Test;

import java.util.Map;
Expand Down Expand Up @@ -162,13 +163,15 @@ public void run_pattern_8_test() {
Assert.assertEquals(1247146L, traversal.next().longValue());
}

@Ignore("Have not supported pattern with multi-edges yet")
@Test
public void run_pattern_9_test() {
Traversal<Vertex, Long> traversal = this.get_pattern_9_test();
this.printTraversalForm(traversal);
Assert.assertEquals(23286L, traversal.next().longValue());
}

@Ignore("Have not supported pattern with multi-edges yet")
@Test
public void run_pattern_9b_test() {
Traversal<Vertex, Long> traversal = this.get_pattern_9b_test();
Expand Down
Loading

0 comments on commit bee9ee8

Please sign in to comment.