Hi all, I think that SPARQL queries using property paths which include the plus sign yield incorrect results. This is what I get with the following queries (number of results between brackets):
SELECT DISTINCT ?scl WHERE {wd:Q3336843 rdfs:subClassOf* ?scl} (25 rows) SELECT DISTINCT ?scl WHERE {wd:Q3336843 rdfs:subClassOf+ ?scl} (4 rows) SELECT DISTINCT ?scl WHERE {wd:Q3336843 rdfs:subClassOf{1,} ?scl} (24 rows) SELECT DISTINCT ?scl WHERE {wd:Q3336843 rdfs:subClassOf{2,} ?scl} (20 rows) SELECT DISTINCT ?scl WHERE {wd:Q3336843 rdfs:subClassOf{3,} ?scl} (17 rows) ... This is the output of EXPLAIN on the first and second queries (the latter 3 have apparently the same plan as the first one): ---------------------------- { Precode: 0: __all_eq := Call __all_eq ( #/Q3336843 ) 5: BReturn 0 Transitive dt dir 1, input: (__all_eq) input shadow: (ZÁ^D) output: (_::trans_obj_1_1) { RDF_QUAD 1.8 rows(s_1_4_t0.S, s_1_4_t0.O) inlined P = ##subClassOf , S = k_ZÁ^D After code: 0: _::trans_subj_1_0 := := artm s_1_4_t0.S 4: _::trans_obj_1_1 := := artm s_1_4_t0.O 8: BReturn 0 Subquery Select(_::trans_subj_1_0, _::trans_obj_1_1) } Distinct (_::trans_obj_1_1) After code: 0: scl := := artm _::trans_obj_1_1 4: BReturn 0 Subquery Select(scl) After code: 0: scl := Call __ro2sq (scl) 5: BReturn 0 Select (scl) } ---------------------------- ---------------------------- { RDF_QUAD 8 rows(s_1_2_t0.O) inlined P = ##subClassOf , S = #/Q3336843 Distinct (s_1_2_t0.O) After code: 0: scl := := artm s_1_2_t0.O 4: BReturn 0 Subquery Select(scl) After code: 0: scl := Call __ro2sq (scl) 5: BReturn 0 Select (scl) } ---------------------------- Have you already encountered this issue? I'm using build f609f14aa6bdb8ef29d4da038fdb7934c6ca65d7. Thanks, Nicola ------------------------------------------------------------------------------ Dive into the World of Parallel Programming The Go Parallel Website, sponsored by Intel and developed in partnership with Slashdot Media, is your hub for all things parallel software development, from weekly thought leadership blogs to news, videos, case studies, tutorials and more. Take a look and join the conversation now. http://goparallel.sourceforge.net/ _______________________________________________ Virtuoso-users mailing list Virtuoso-users@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/virtuoso-users