Skip to content

Commit

Permalink
Merge pull request #1778 from kuzudb/order-by-result
Browse files Browse the repository at this point in the history
Change IC12 query
  • Loading branch information
acquamarin committed Jul 7, 2023
2 parents 7ffffbd + e56068a commit 80aeccf
Showing 1 changed file with 7 additions and 7 deletions.
14 changes: 7 additions & 7 deletions test/test_files/ldbc/ldbc-interactive/interactive-complex.test
Original file line number Diff line number Diff line change
Expand Up @@ -165,23 +165,23 @@ Euripides|1
# IC12 should be changed to use Kleene Star relationship once that is implemented
-LOG IC12
-CHECK_ORDER
-PARALLELISM 1
-PARALLELISM 10
-STATEMENT MATCH (tag:Tag)-[:Tag_hasType_TagClass|:TagClass_isSubclassOf_TagClass*1..20]->(baseTagClass:TagClass)
WHERE tag.name = "Monarch" OR baseTagClass.name = "Monarch"
WITH collect(tag.id) as tags
MATCH (:Person {id: 6597069767300 })-[:Person_knows_Person]-(friend:Person)<-[:Comment_hasCreator_Person]-(comment:Comment)-[:Comment_replyOf_Post]->(:Post)-[:Post_hasTag_Tag]->(tag:Tag)
WHERE list_contains(tags, tag.id)
RETURN friend.id AS personId, friend.firstName AS personFirstName, friend.lastName AS personLastName, collect(DISTINCT tag.name) AS tagNames, count(DISTINCT comment) AS replyCount
RETURN friend.id AS personId, friend.firstName AS personFirstName, friend.lastName AS personLastName, list_sort(collect(DISTINCT tag.name)) AS tagNames, count(DISTINCT comment) AS replyCount
ORDER BY replyCount DESC, personId ASC
LIMIT 20;
---- 7
8796093022764|Zheng|Xu|[Mahmud_of_Ghazni,Ashoka,Tiberius,Marcus_Aurelius,Genghis_Khan,Justinian_I,Hadrian,Timur]|13
10995116278353|Otto|Muller|[Tiberius,Genghis_Khan,Justinian_I,Constantine_the_Great,Trajan]|11
17592186044994|Jie|Wang|[Genghis_Khan,David]|7
8796093022764|Zheng|Xu|[Ashoka,Genghis_Khan,Hadrian,Justinian_I,Mahmud_of_Ghazni,Marcus_Aurelius,Tiberius,Timur]|13
10995116278353|Otto|Muller|[Constantine_the_Great,Genghis_Khan,Justinian_I,Tiberius,Trajan]|11
17592186044994|Jie|Wang|[David,Genghis_Khan]|7
13194139534548|Bing|Zheng|[Genghis_Khan,Hadrian,Solomon]|6
13194139533500|Otto|Becker|[Tiberius,Genghis_Khan,Julius_Caesar,David,Alexander_the_Great]|5
13194139533500|Otto|Becker|[Alexander_the_Great,David,Genghis_Khan,Julius_Caesar,Tiberius]|5
28587302322537|Anh|Nguyen|[Mahmud_of_Ghazni,Trajan]|3
30786325578932|Alexander|Hleb|[Mahmud_of_Ghazni,David]|3
30786325578932|Alexander|Hleb|[David,Mahmud_of_Ghazni]|3

# To be completely correct, this query needs to have
# (i) Unbounded shortest path
Expand Down

0 comments on commit 80aeccf

Please sign in to comment.