Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix ic 11 12 #13

Merged
merged 2 commits into from
May 13, 2022
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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