diff --git a/Example_of_RSP-QL_query b/Example_of_RSP-QL_query index 1bc51a2..2f58353 100644 --- a/Example_of_RSP-QL_query +++ b/Example_of_RSP-QL_query @@ -12,6 +12,7 @@ As output, for each bar, it streams out an RDF graph with the list of pairs and Note that this example query covers features of C-SPARQL, CQELS, SPARQL-Stream, EP-SPARQL as well as new features missing in all RSP languages: From C-SPARQL it takes the REGISTER clause, the FROM STREAM clause as dataset clause, the AT clause to access the timestamp (in C-SPARQL, AT is implemented with the timestamp() function) and the aggregates (which are computed in parallel without shrinking the result set, but extending it). +# so what is the AT time function doing? where is that timestamp coming from? From CQELS it takes the idea of the STREAM keyword in the WHERE clause. From SPARQL-Stream it takes the ISTREAM clasue that ask the RSP engine to use the R2S operator. @@ -27,6 +28,14 @@ The new features are: the WINDOW keyword in the WHERE clause --> is there any shorter way to express this? for instance, just STREAM keyword inside WHERE? +# this looks a bit different than sparql in terms of order of query blocks, would it harm to make it something like: +# PREFIX ... +# CONSTRUCT ISTREAM { ...etc +# FROM .... +# WHERE { ... +# AS :GallehaultWasTheBar +# UNDER ENTAILMENT xxx... + PREFIX e: PREFIX s: PREFIX g: @@ -51,12 +60,15 @@ WHERE { SEQ { ?someoneelse ex:enters ?poi } WITHIN PT4H } + # is this equivalent to : ? + # STREAM s:1 [RANGE PT1H STEP PT5M] { WINDOW :longWindow { { ?somebody e:isCloseTo ?someoneelse MINUS { ?somebody e:isCloseTo ?yetanotherone . FILTER (?yetanotherone != ?someoneelse) } } WITH DURATION ?longtime FILTER (?longtime>"PT30M"^^xsd:duration) } + # not sure if we need both WITHIN and WITH DURATION+FILTER WINDOW :shortWindow { { ?somebody e:exits ?bar} AT ?t1 { ?someoneelse e:exits ?bar } AT ?t2 @@ -72,3 +84,4 @@ AGGREGATE { COUNT(?somebody) AS ?howmanycouples } +#are we creating a different type of aggregate syntax? i.e. not the one from SPARQL1.1? ok, for the construct you need something else, but could it be done with a subquery right?