According to the SPARQL reference, multiple FROM clauses should mean a
query over the merge of all specified datasets.
http://www.w3.org/TR/sparql11-query/#unnamedGraph
I used multiple graph in a query and a combination of filter and minus
operators in "where" clause in this way:
SELECT ?s
FROM <graph1>
FROM <graph2>
WHERE
{
?s rdf:type <type1>
MINUS { ?s <p1> ?p1 .
}
?s <p2> ?p2 FILTER ( ?p2='p2_1' || ?p2='p2_2' )
}
The result is 0 (it should not).
It does not happen removing the first graph or removing the "or" in the
filter (or the minus clause).
Thanks for the help
Nicola Ghirardi
CINECA
Italy
PS.
I'm using Virtuoso version 07.00.3203 on Linux (x86_64-pc-linux-gnu),
Single Server Edition
This the query "explain":
{
Precode:
0: __rdflit := Call __rdflit (rdflit1067587)
5: __rdflit := Call __rdflit (rdflit1067586)
10: BReturn 0
RDF_QUAD_POGS 4.2e+02 rows(s_13_8_t2.O, s_13_8_t2.S, s_13_8_t2.G)
P = #ssd , O = $32 "in_iter"
END Node
After test:
0: one_of_these := Call one_of_these (s_13_8_t2.G,
#database/repositories/rlink/config ,
#database/repositories/rlink/researchUgovData )
5: if ( 0 < one_of_these) then 9 else 31 unkn 31
9: if ({
RDF_QUAD 0.41 rows(s_12_4_t0.G)
inlined P = #hasVersion , S = k_s_13_8_t2.S
END Node
After test:
0: one_of_these := Call one_of_these (s_12_4_t0.G,
#database/repositories/rlink/config ,
#database/repositories/rlink/researchUgovData )
5: if ( 0 < one_of_these) then 9 else 10 unkn 10
9: BReturn 1
10: BReturn 0
Subquery Select( <none> )
}
) then 31 else 13 unkn 31
13: isiri_id := Call isiri_id (s_13_8_t2.O)
18: temp := artm 1 - isiri_id
22: temp := artm 1 - isiri_id
26: if ( 0 = temp) then 31 else 30 unkn 31
30: BReturn 1
31: BReturn 0
in iterates in_iter over ( #database/repositories/rlink/config ,
#database/repositories/rlink/researchUgovData )
RDF_QUAD 0.18 rows(s_13_8_t1.S)
inlined P = #type , S = k_s_13_8_t2.S , O = #ResearchContent , G =
k_in_iter
After code:
0: istanza := Call __id2in (s_13_8_t1.S)
5: BReturn 0
Select (istanza)
}
------------------------------------------------------------------------------
Shape the Mobile Experience: Free Subscription
Software experts and developers: Be at the forefront of tech innovation.
Intel(R) Software Adrenaline delivers strategic insight and game-changing
conversations that shape the rapidly evolving mobile landscape. Sign up now.
http://pubads.g.doubleclick.net/gampad/clk?id=63431311&iu=/4140/ostg.clktrk
_______________________________________________
Virtuoso-users mailing list
Virtuoso-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/virtuoso-users