Skip to content

Commit

Permalink
fix(interactive): Introduce Cypher CI Tests for GIE on Experimental S…
Browse files Browse the repository at this point in the history
…tore (#3303)

<!--
Thanks for your contribution! please review
https://github.com/alibaba/GraphScope/blob/main/CONTRIBUTING.md before
opening an issue.
-->

## What do these changes do?
Introduce new cypher ci tests for gie on experimental store, based on
the movie dataset.

<!-- Please give a short brief about these changes. -->

## Related issue number

<!-- Are there any issues opened that will be resolved by merging this
change? -->

Fixes

---------

Co-authored-by: bingqing.lbq <[email protected]>
Co-authored-by: Longbin Lai <[email protected]>
  • Loading branch information
3 people authored Oct 20, 2023
1 parent 944a645 commit 6d7825d
Show file tree
Hide file tree
Showing 6 changed files with 406 additions and 9 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/gaia.yml
Original file line number Diff line number Diff line change
Expand Up @@ -88,12 +88,12 @@ jobs:
- name: Ir Integration Test on Experimental Store
run: |
. ${HOME}/.graphscope_env
git clone -b master --single-branch --depth=1 https://github.com/7br/gstest.git /tmp/gstest
cd ${GITHUB_WORKSPACE}/interactive_engine/compiler && ./ir_exprimental_ci.sh
- name: Ir Integration Pattern Test on Experimental Store
run: |
cd ${GITHUB_WORKSPACE}
git clone -b master --single-branch --depth=1 https://github.com/7br/gstest.git /tmp/gstest
cd ${GITHUB_WORKSPACE}/interactive_engine/compiler && ./ir_exprimental_advanced_ci.sh
- name: Ir Integration Test on Csr Store
Expand Down
3 changes: 3 additions & 0 deletions interactive_engine/compiler/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -80,4 +80,7 @@ ldbc_test:
pattern_test:
mvn test -Dtest=com.alibaba.graphscope.gremlin.integration.pattern.IrPatternTest

cypher_test:
mvn test -Dtest=com.alibaba.graphscope.cypher.integration.movie.MovieTest

.PHONY: build run
20 changes: 19 additions & 1 deletion interactive_engine/compiler/ir_exprimental_ci.sh
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,24 @@ ps -ef | grep "com.alibaba.graphscope.GraphServer" | grep -v grep | awk '{print
ps -ef | grep "start_rpc_server" | grep -v grep | awk '{print $2}' | xargs kill -9
# report test result
if [ $exit_code -ne 0 ]; then
echo "ir integration test on experimental store fail"
echo "ir gremlin integration test on experimental store fail"
exit 1
fi

cd ${base_dir}/../executor/ir/target/release && DATA_PATH=/tmp/gstest/movie_graph_exp_bin RUST_LOG=info ./start_rpc_server --config ${base_dir}/../executor/ir/integrated/config &
sleep 5s
# start compiler service
cd ${base_dir} && make run graph.schema:=../executor/ir/core/resource/movie_schema.json &
sleep 10s
# run cypher movie tests
cd ${base_dir} && make cypher_test
exit_code=$?
# clean service
ps -ef | grep "com.alibaba.graphscope.GraphServer" | grep -v grep | awk '{print $2}' | xargs kill -9 || true
ps -ef | grep "start_rpc_server" | grep -v grep | awk '{print $2}' | xargs kill -9
# report test result
if [ $exit_code -ne 0 ]; then
echo "ir cypher movie integration test on experimental store fail"
exit 1
fi

Original file line number Diff line number Diff line change
Expand Up @@ -137,29 +137,29 @@ public static QueryContext get_movie_query7_test() {
"MATCH (tom:Person {name:\"Tom Hanks\"})-[:ACTED_IN]->(m)<-[:ACTED_IN]-(coActors)\n"
+ "RETURN m.title AS movieTitle, m.released AS releasedYear, coActors.name AS"
+ " coActorName\n"
+ "ORDER BY releasedYear DESC, movieTitle ASC LIMIT 10;";
+ "ORDER BY releasedYear DESC, movieTitle ASC, coActorName ASC LIMIT 10;";
List<String> expected =
Arrays.asList(
"Record<{movieTitle: \"Cloud Atlas\", releasedYear: 2012, coActorName:"
+ " \"Halle Berry\"}>",
"Record<{movieTitle: \"Cloud Atlas\", releasedYear: 2012, coActorName:"
+ " \"Hugo Weaving\"}>",
"Record<{movieTitle: \"Cloud Atlas\", releasedYear: 2012, coActorName:"
+ " \"Jim Broadbent\"}>",
"Record<{movieTitle: \"Cloud Atlas\", releasedYear: 2012, coActorName:"
+ " \"Halle Berry\"}>",
"Record<{movieTitle: \"Cloud Atlas\", releasedYear: 2012, coActorName:"
+ " \"Tom Hanks\"}>",
"Record<{movieTitle: \"Charlie Wilson's War\", releasedYear: 2007,"
+ " coActorName: \"Julia Roberts\"}>",
"Record<{movieTitle: \"Charlie Wilson's War\", releasedYear: 2007,"
+ " coActorName: \"Tom Hanks\"}>",
"Record<{movieTitle: \"Charlie Wilson's War\", releasedYear: 2007,"
+ " coActorName: \"Philip Seymour Hoffman\"}>",
"Record<{movieTitle: \"The Da Vinci Code\", releasedYear: 2006,"
"Record<{movieTitle: \"Charlie Wilson's War\", releasedYear: 2007,"
+ " coActorName: \"Tom Hanks\"}>",
"Record<{movieTitle: \"The Da Vinci Code\", releasedYear: 2006,"
+ " coActorName: \"Audrey Tautou\"}>",
"Record<{movieTitle: \"The Da Vinci Code\", releasedYear: 2006,"
+ " coActorName: \"Ian McKellen\"}>",
"Record<{movieTitle: \"The Da Vinci Code\", releasedYear: 2006,"
+ " coActorName: \"Audrey Tautou\"}>");
+ " coActorName: \"Paul Bettany\"}>");
return new QueryContext(query, expected);
}

Expand Down
204 changes: 204 additions & 0 deletions interactive_engine/executor/ir/core/resource/movie_schema.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,204 @@
{
"entities": [
{
"label": {
"id": 0,
"name": "Movie"
},
"columns": [
{
"key": {
"id": 4,
"name": "id"
},
"data_type": 1,
"is_primary_key": false
},
{
"key": {
"id": 1,
"name": "released"
},
"data_type": 1,
"is_primary_key": false
},
{
"key": {
"id": 2,
"name": "tagline"
},
"data_type": 4,
"is_primary_key": false
},
{
"key": {
"id": 3,
"name": "title"
},
"data_type": 4,
"is_primary_key": false
}
]
},
{
"label": {
"id": 1,
"name": "Person"
},
"columns": [
{
"key": {
"id": 4,
"name": "id"
},
"data_type": 1,
"is_primary_key": false
},
{
"key": {
"id": 0,
"name": "born"
},
"data_type": 1,
"is_primary_key": false
},
{
"key": {
"id": 1,
"name": "name"
},
"data_type": 4,
"is_primary_key": false
}
]
}
],
"relations": [
{
"label": {
"id": 0,
"name": "ACTED_IN"
},
"entity_pairs": [
{
"src": {
"id": 1,
"name": "Person"
},
"dst": {
"id": 0,
"name": "Movie"
}
}
],
"columns": []
},
{
"label": {
"id": 1,
"name": "DIRECTED"
},
"entity_pairs": [
{
"src": {
"id": 1,
"name": "Person"
},
"dst": {
"id": 0,
"name": "Movie"
}
}
],
"columns": []
},
{
"label": {
"id": 2,
"name": "REVIEW"
},
"entity_pairs": [
{
"src": {
"id": 1,
"name": "Person"
},
"dst": {
"id": 0,
"name": "Movie"
}
}
],
"columns": [
{
"key": {
"id": 3,
"name": "rating"
},
"data_type": 1,
"is_primary_key": false
}
]
},
{
"label": {
"id": 3,
"name": "FOLLOWS"
},
"entity_pairs": [
{
"src": {
"id": 1,
"name": "Person"
},
"dst": {
"id": 0,
"name": "Person"
}
}
],
"columns": []
},
{
"label": {
"id": 4,
"name": "WROTE"
},
"entity_pairs": [
{
"src": {
"id": 1,
"name": "Person"
},
"dst": {
"id": 0,
"name": "Movie"
}
}
],
"columns": []
},
{
"label": {
"id": 5,
"name": "PRODUCED"
},
"entity_pairs": [
{
"src": {
"id": 1,
"name": "Person"
},
"dst": {
"id": 0,
"name": "Movie"
}
}
],
"columns": []
}
],
"is_table_id": true,
"is_column_id": false
}

Loading

0 comments on commit 6d7825d

Please sign in to comment.