Skip to content

Commit

Permalink
Merge pull request #13 from CPWstatic/fix_ic_11_12
Browse files Browse the repository at this point in the history
Fix ic 11 12
  • Loading branch information
CPWstatic committed May 13, 2022
2 parents 162045c + 03fa0b6 commit 1186b9a
Show file tree
Hide file tree
Showing 4 changed files with 10 additions and 8 deletions.
4 changes: 2 additions & 2 deletions nebula/queries/interactive-complex-11.ngql
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
MATCH (person:Person)-[:KNOWS*1..2]-(friend:Person)
WHERE id(person) == $personId AND not(person==friend)
WHERE id(person) == $personId AND not(id(person)==id(friend))
WITH DISTINCT friend
MATCH (friend)-[workAt:WORK_AT]->(company:Organisation)-[:IS_LOCATED_IN]->(:Place {name:"China"})
MATCH (friend)-[workAt:WORK_AT]->(company:Organisation)-[:IS_LOCATED_IN]->(:Place {name:$countryName})
WHERE workAt.workFrom < $workFromYear
RETURN
id(friend) AS personId,
Expand Down
5 changes: 3 additions & 2 deletions nebula/queries/interactive-complex-12.ngql
Original file line number Diff line number Diff line change
@@ -1,10 +1,11 @@
MATCH (n:Person)-[:KNOWS]-(friend:Person)<-[:HAS_CREATOR]-(`comment`:`Comment`)-[:REPLY_OF]->(:Post)-[:HAS_TAG]->(`tag`:`Tag`)-[:HAS_TYPE]->(tagClass:Tagclass)-[:IS_SUBCLASS_OF*0..100]->(baseTagClass:Tagclass)
WHERE id(n) == $personId AND (tagClass.Tagclass.name == $tagClassName OR baseTagClass.Tagclass.name == $tagClassName)
RETURN
id(friend) AS personId,
/* id(friend) AS personId, 属性裁剪待改进, 暂时通过以下写法规避问题*/
true ? id(friend) : id(n)+id(tagClass)+id(baseTagClass) AS personId,
friend.Person.firstName AS personFirstName,
friend.Person.lastName AS personLastName,
collect(DISTINCT `tag`.`Tag`.name) AS tagNames,
count(DISTINCT `comment`) AS replyCount
count(DISTINCT id(`comment`)) AS replyCount
ORDER BY replyCount DESC, personId ASC
LIMIT 20
4 changes: 2 additions & 2 deletions nebula/queries2/interactive-complex-11.ngql
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
MATCH (person:Person)-[:KNOWS*1..2]-(friend:Person)
WHERE id(person) == $personId AND not(person==friend)
WHERE id(person) == $personId AND not(id(person)==id(friend))
WITH DISTINCT friend
MATCH (friend)-[workAt:WORK_AT]->(company:Organisation)-[:IS_LOCATED_IN]->(:Place {name:"China"})
MATCH (friend)-[workAt:WORK_AT]->(company:Organisation)-[:IS_LOCATED_IN]->(:Place {name:$countryName})
WHERE workAt.workFrom < $workFromYear
RETURN
id(friend) AS personId,
Expand Down
5 changes: 3 additions & 2 deletions nebula/queries2/interactive-complex-12.ngql
Original file line number Diff line number Diff line change
@@ -1,10 +1,11 @@
MATCH (n:Person)-[:KNOWS]-(friend:Person)<-[:COMMENT_HAS_CREATOR]-(`comment`:`Comment`)-[:REPLY_OF_POST]->(:Post)-[:HAS_TAG]->(`tag`:`Tag`)-[:HAS_TYPE]->(tagClass:Tagclass)-[:IS_SUBCLASS_OF*0..100]->(baseTagClass:Tagclass)
WHERE id(n) == $personId AND (tagClass.Tagclass.name == $tagClassName OR baseTagClass.Tagclass.name == $tagClassName)
RETURN
id(friend) AS personId,
/* id(friend) AS personId, 属性裁剪待改进, 暂时通过以下写法规避问题*/
true ? id(friend) : id(n)+id(tagClass)+id(baseTagClass) AS personId,
friend.Person.firstName AS personFirstName,
friend.Person.lastName AS personLastName,
collect(DISTINCT `tag`.`Tag`.name) AS tagNames,
count(DISTINCT `comment`) AS replyCount
count(DISTINCT id(`comment`)) AS replyCount
ORDER BY replyCount DESC, personId ASC
LIMIT 20

0 comments on commit 1186b9a

Please sign in to comment.