Skip to content

Commit f751a9c

Browse files
committed
add syntax v3 queries
1 parent f0f375e commit f751a9c

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

41 files changed

+84
-3
lines changed

tools/ldbc_benchmark/tigergraph/queries/business_intelligence/syntax_v3/bi-1.gsql

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,5 @@
1-
# datetime is a reserved keyword so we use date here.
1+
//graph schema is on page 19 https://ldbc.github.io/ldbc_snb_docs/ldbc-snb-specification.pdf
2+
//BI 1 query description is on page 89 https://ldbc.github.io/ldbc_snb_docs/ldbc-snb-specification.pdf
23
CREATE OR REPLACE DISTRIBUTED QUERY bi1(DATETIME date) SYNTAX v3{
34

45
TYPEDEF TUPLE <INT year, BOOL isComment, INT lengthCategory, INT messageCount,

tools/ldbc_benchmark/tigergraph/queries/business_intelligence/syntax_v3/bi-10.gsql

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,5 @@
1+
//graph schema is on page 19 https://ldbc.github.io/ldbc_snb_docs/ldbc-snb-specification.pdf
2+
//BI 10 query description is on page 98 https://ldbc.github.io/ldbc_snb_docs/ldbc-snb-specification.pdf
13
CREATE OR REPLACE DISTRIBUTED QUERY bi10(VERTEX<Person> personId, STRING country, STRING tagClass) SYNTAX v3 {
24
TYPEDEF TUPLE <UINT personId, STRING tagName, UINT messageCount> RESULT;
35
OrAccum @visited, @selected;

tools/ldbc_benchmark/tigergraph/queries/business_intelligence/syntax_v3/bi-11.gsql

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,5 @@
1+
//graph schema is on page 19 https://ldbc.github.io/ldbc_snb_docs/ldbc-snb-specification.pdf
2+
//BI 11 query description is on page 99 https://ldbc.github.io/ldbc_snb_docs/ldbc-snb-specification.pdf
13
CREATE OR REPLACE DISTRIBUTED QUERY bi11(STRING country, DATETIME startDate, DATETIME endDate) SYNTAX v3 {
24
SumAccum<UINT> @@result;
35
OrAccum<BOOL> @selected;

tools/ldbc_benchmark/tigergraph/queries/business_intelligence/syntax_v3/bi-12.gsql

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,5 @@
1+
//graph schema is on page 19 https://ldbc.github.io/ldbc_snb_docs/ldbc-snb-specification.pdf
2+
//BI 12 query description is on page 100 https://ldbc.github.io/ldbc_snb_docs/ldbc-snb-specification.pdf
13
CREATE OR REPLACE DISTRIBUTED QUERY bi12(DATETIME startDate, INT lengthThreshold, SET<STRING> languages) SYNTAX v3 {
24

35
TYPEDEF TUPLE <UINT messageCount, UINT personCount> RESULT;

tools/ldbc_benchmark/tigergraph/queries/business_intelligence/syntax_v3/bi-13.gsql

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,5 @@
1+
//graph schema is on page 19 https://ldbc.github.io/ldbc_snb_docs/ldbc-snb-specification.pdf
2+
//BI 13 query description is on page 101 https://ldbc.github.io/ldbc_snb_docs/ldbc-snb-specification.pdf
13
CREATE OR REPLACE DISTRIBUTED QUERY bi13(STRING country, DATETIME endDate) SYNTAX v3 {
24

35
TYPEDEF TUPLE <UINT zombieId, UINT zombieLikeCount, UINT totalLikeCount, DOUBLE zombieScore> RESULT;

tools/ldbc_benchmark/tigergraph/queries/business_intelligence/syntax_v3/bi-14.gsql

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,5 @@
1+
//graph schema is on page 19 https://ldbc.github.io/ldbc_snb_docs/ldbc-snb-specification.pdf
2+
//BI 14 query description is on page 102 https://ldbc.github.io/ldbc_snb_docs/ldbc-snb-specification.pdf
13
CREATE OR REPLACE DISTRIBUTED QUERY bi14(STRING country1, STRING country2) SYNTAX v3 {
24
TYPEDEF TUPLE<UINT person1Id, UINT person2Id, STRING city1Name, INT score> pairScore;
35
TYPEDEF TUPLE <UINT pid, UINT score> ps;

tools/ldbc_benchmark/tigergraph/queries/business_intelligence/syntax_v3/bi-15.gsql

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,5 @@
1-
//USE GRAPH ldbc_snb
1+
//graph schema is on page 19 https://ldbc.github.io/ldbc_snb_docs/ldbc-snb-specification.pdf
2+
//BI 15 query description is on page 103 https://ldbc.github.io/ldbc_snb_docs/ldbc-snb-specification.pdf
23
CREATE OR REPLACE DISTRIBUTED QUERY bi15(VERTEX<Person> person1Id, VERTEX<Person> person2Id, DATETIME startDate, DATETIME endDate) syntax v3 {
34
MinAccum<DOUBLE> @@result, @dis;
45
OrAccum @next;

tools/ldbc_benchmark/tigergraph/queries/business_intelligence/syntax_v3/bi-16.gsql

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,6 @@
1-
CREATE OR REPLACE DISTRIBUTED QUERY bi16(STRING tagA, DATETIME dateA,
1+
//graph schema is on page 19 https://ldbc.github.io/ldbc_snb_docs/ldbc-snb-specification.pdf
2+
//BI 16 query description is on page 104 https://ldbc.github.io/ldbc_snb_docs/ldbc-snb-specification.pdf
3+
CREATE OR REPLACE DISTRIBUTED QUERY bi16(STRING tagA, DATETIME dateA,
24
STRING tagB, DATETIME dateB, UINT maxKnowsLimit) SYNTAX v3 {
35

46
TYPEDEF TUPLE <UINT personId, UINT messageCountA, UINT messageCountB, UINT totalMessageCount> RESULT;

tools/ldbc_benchmark/tigergraph/queries/business_intelligence/syntax_v3/bi-17.gsql

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,5 @@
1+
//graph schema is on page 19 https://ldbc.github.io/ldbc_snb_docs/ldbc-snb-specification.pdf
2+
//BI 17 query description is on page 105 https://ldbc.github.io/ldbc_snb_docs/ldbc-snb-specification.pdf
13
CREATE OR REPLACE DISTRIBUTED QUERY bi17(STRING tag, INT delta) SYNTAX v3 {
24
TYPEDEF TUPLE <UINT person1Id, UINT messageCount> RESULT;
35
HeapAccum<RESULT>(10, messageCount DESC, person1Id ASC) @@result;

tools/ldbc_benchmark/tigergraph/queries/business_intelligence/syntax_v3/bi-18.gsql

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,5 @@
1+
//graph schema is on page 19 https://ldbc.github.io/ldbc_snb_docs/ldbc-snb-specification.pdf
2+
//BI 18 query description is on page 106 https://ldbc.github.io/ldbc_snb_docs/ldbc-snb-specification.pdf
13
CREATE OR REPLACE DISTRIBUTED QUERY bi18(STRING tag) SYNTAX v3 {
24
TYPEDEF TUPLE <UINT person1Id, UINT person2Id, UINT mutualFriendCount> RESULT;
35
HeapAccum<RESULT>(20, mutualFriendCount DESC, person1Id ASC, person2Id ASC) @@result;

0 commit comments

Comments
 (0)