Skip to content

Commit b4c8504

Browse files
mirkospasicvi
authored andcommitted
SQL Driver and fixes for SPARQL queries
1 parent 93fa264 commit b4c8504

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

+562
-22
lines changed

ldbc_socialnet_qgen/run.sh

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -20,4 +20,4 @@ done
2020

2121
export CLASSPATH
2222

23-
./sibdriver -t 300000 -idir td_data -uqp query -uc sib/int -mt 1 -runs 1 http://localhost:8607/sparql -printres -q -defaultparams
23+
./sibdriver -t 300000 -idir td_data -uqp query -uc sib/int -mt 1 -runs 1 http://localhost:8619/sparql -printres -pq -defaultparams

ldbc_socialnet_qgen/sib/int/query1.txt

100755100644
File mode changed.

ldbc_socialnet_qgen/sib/int/query10.txt

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@ select ?first ?last #Q10
1414
filter (!exists {%Person% snvoc:hasInterest ?tag})
1515
}
1616
)) as ?score)
17-
?fof ?gender ?based
17+
?fof ?gender ?locationname
1818
from <sib>
1919
where {
2020
{select distinct ?fof
@@ -30,6 +30,7 @@ where {
3030
?fof snvoc:gender ?gender .
3131
?fof snvoc:birthday ?bday .
3232
?fof snvoc:isLocatedIn ?based .
33+
?based foaf:name ?locationname .
3334
filter (1 = if (bif:month (?bday) = %HS0%, if (bif:dayofmonth (?bday) > 21, 1, 0), if (bif:month (?bday) = %HS1%, if (bif:dayofmonth(?bday) < 22, 1, 0), 0)))
3435
}
3536
order by desc(3) ?fof
Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
select ?exp ?first ?last ?tag count (*) #Q12
1+
select ?exp ?first ?last ?tagname count (*) #Q12
22
where {
33
%Person% snvoc:knows ?exp .
44
?exp snvoc:firstName ?first . ?exp snvoc:lastName ?last .
@@ -7,7 +7,8 @@ where {
77
filter (!exists {?org_post snvoc:replyOf ?xx}) .
88
?org_post snvoc:hasTag ?tag .
99
?tag a %TagType% .
10+
?tag foaf:name ?tagname .
1011
}
11-
group by ?exp ?first ?last ?tag
12-
order by desc(5) ?exp ?tag
12+
group by ?exp ?first ?last ?tagname
13+
order by desc(5) ?exp ?tagname
1314
limit 20

ldbc_socialnet_qgen/sib/int/query2.txt

100755100644
Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,7 @@ where {
44
%Person% snvoc:knows ?fr.
55
?fr snvoc:firstName ?first. ?fr snvoc:lastName ?last .
66
?post snvoc:hasCreator ?fr.
7+
?post a snvoc:Post.
78
{ {?post snvoc:content ?content } union { ?post snvoc:imageFile ?content }} .
89
?post snvoc:creationDate ?date.
910
filter (?date <= "%Date0%"^^xsd:date).

ldbc_socialnet_qgen/sib/int/query3.txt

100755100644
Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
select ?fr ?first ?last ?ct1 ?ct2 (?ct1 + ?ct2) as ?sum #Q3
22
from <sib>
33
where {
4-
{select ?fr
4+
{select distinct ?fr ?first ?last
55
(((select count (*)
66
where {
77
?post snvoc:hasCreator ?fr .
Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,9 @@
1-
select ?tag count (*) #Q4
1+
select ?tagname count (*) #Q4
22
from <sib>
33
where {
44
?post snvoc:hasCreator ?fr .
55
?post snvoc:hasTag ?tag .
6+
?tag foaf:name ?tagname .
67
?post snvoc:creationDate ?date .
78
%Person% snvoc:knows ?fr .
89
filter (?date >= "%Date0%"^^xsd:date && ?date <= bif:dateadd ("day", %Duration%, "%Date0%"^^xsd:date) ) .
@@ -13,6 +14,6 @@ where {
1314
?post2 snvoc:creationDate ?date2 .
1415
filter (?date2 < "%Date0%"^^xsd:date)})
1516
}
16-
group by ?tag
17-
order by desc(2) ?tag
17+
group by ?tagname
18+
order by desc(2) ?tagname
1819
limit 10

ldbc_socialnet_qgen/sib/int/query5.txt

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
select ?group count (*) #Q5
1+
select ?title count (*) #Q5
22
from <sib>
33
where {
44
{select distinct ?fr
@@ -12,8 +12,9 @@ where {
1212
?mem snvoc:joinDate ?date .
1313
filter (?date >= "%Date0%"^^xsd:date) .
1414
?post snvoc:hasCreator ?fr .
15-
?group snvoc:containerOf ?post
15+
?group snvoc:containerOf ?post .
16+
?group snvoc:title ?title.
1617
}
17-
group by ?group
18-
order by desc(2) ?group
18+
group by ?title
19+
order by desc(2) ?title
1920
limit 20

ldbc_socialnet_qgen/sib/int/query6.txt

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
select ?tag count (*) #Q6
1+
select ?tagname count (*) #Q6
22
from <sib>
33
where {
44
{ select distinct ?fr
@@ -11,8 +11,9 @@ where {
1111
?post snvoc:hasTag ?tag .
1212
filter (?tag != %Tag%) .
1313
?post snvoc:hasTag %Tag% .
14+
?tag foaf:name ?tagname .
1415
}
15-
group by ?tag
16-
order by desc(2) ?tag
16+
group by ?tagname
17+
order by desc(2) ?tagname
1718
limit 10
1819

ldbc_socialnet_qgen/sib/int/query9.txt

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,7 @@ where {
1010
?fr snvoc:firstName ?first . ?fr snvoc:lastName ?last .
1111
?post snvoc:hasCreator ?fr.
1212
?post snvoc:creationDate ?date.
13+
?post a snvoc:Post.
1314
filter (?date < "%Date0%"^^xsd:date).
1415
{{?post snvoc:content ?content} union {?post snvoc:imageFile ?content}} .
1516
}

0 commit comments

Comments
 (0)