Hi Nicola, 

It would appear that it is the "OR" in  a filter that is the problem as 
multiple graphs or filters work for me. I have reported the issue with the 
"OR"'s in filters to development to look into and will let you know when they 
have a fix ...

Best Regards
Hugh Williams
Professional Services
OpenLink Software, Inc.      //              http://www.openlinksw.com/
Weblog   -- http://www.openlinksw.com/blogs/
LinkedIn -- http://www.linkedin.com/company/openlink-software/
Twitter  -- http://twitter.com/OpenLink
Google+  -- http://plus.google.com/100570109519069333827/
Facebook -- http://www.facebook.com/OpenLinkSoftware
Universal Data Access, Integration, and Management Technology Providers

On 8 Dec 2013, at 21:28, ghirardi nicola <n.ghira...@cineca.it> wrote:

> Sorry, I did not see your previous answer.
> This behaviour (wrong zero result) happens when these conditions are met ( I 
> don't know how many are needed):
> 1- multiple from
> 2- multiple filters
> 3- "OR" inside a filter
> In some query removing the multiple from is enough but more often I saw the 
> problem remains with the other conditions.
> This is the case with the last query i sent and for sure this is a problem as 
> well!
> Moreover I could not find a query with multiple from reproducing the bug in a 
> public sparql enpoint.
> I used a workaround in my system (using every filter in a subquery) butt even 
> in this way I had to remove the from statements otherwise I got 0 results.
> Hope it explains the issue.
> If you really need some data I can try to export something from my datasource 
> but it will takes me some time.
> Thanks for the help
> Nicola
> 
> On 08/12/2013 15:43, Hugh Williams wrote:
>> Hi Nicola,
>> 
>> Thought I has seen this post before, you seem to have asked the same 
>> question two weeks ago and gave the same response,  but the queries below do 
>> not have any from clauses, which is the subject of the original problem, 
>> thus in what way are they related ?
>> 
>> Best Regards
>> Hugh Williams
>> Professional Services
>> OpenLink Software, Inc.      //              http://www.openlinksw.com/
>> Weblog   -- http://www.openlinksw.com/blogs/
>> LinkedIn -- http://www.linkedin.com/company/openlink-software/
>> Twitter  -- http://twitter.com/OpenLink
>> Google+  -- http://plus.google.com/100570109519069333827/
>> Facebook -- http://www.facebook.com/OpenLinkSoftware
>> Universal Data Access, Integration, and Management Technology Providers
>> 
>> On 8 Dec 2013, at 13:18, ghirardi nicola <n.ghira...@cineca.it> wrote:
>> 
>>> Hi 
>>> 
>>> A very similar query not working as expected is this one. 
>>> In this case multiple form is not involved but It's a very similar pattern 
>>> and I suppose is related. 
>>> 
>>> This query return 0: 
>>> SELECT   ?s 
>>> WHERE 
>>>  { 
>>> ?s rdf:type <http://dbpedia.org/ontology/Agent>. 
>>> ?s <http://purl.org/dc/terms/subject>  ?p2 . 
>>> 
>>> FILTER NOT EXISTS {  ?s <http://dbpedia.org/ontology/alias> "The Bad 
>>> Samaritans" .  } 
>>>  FILTER ( 
>>> ?p2=<http://dbpedia.org/resource/Category:British_punk_rock_groups> || 
>>> ?p2=<http://dbpedia.org/resource/Category:English_rock_music_groups> ) 
>>> } 
>>> 
>>> This query return lots of result (removing or): 
>>> SELECT   ?s 
>>> WHERE 
>>>  { 
>>> ?s rdf:type <http://dbpedia.org/ontology/Agent>. 
>>> ?s <http://purl.org/dc/terms/subject>  ?p2 . 
>>> 
>>> FILTER NOT EXISTS {  ?s <http://dbpedia.org/ontology/alias> "The Bad 
>>> Samaritans" .  } 
>>>  FILTER ( 
>>> ?p2=<http://dbpedia.org/resource/Category:British_punk_rock_groups> ) 
>>> } 
>>> 
>>> 
>>> Nicola
>>> 
>>> 
>>> On 06/12/2013 18:43, Hugh Williams wrote:
>>>> Hi Nicola,
>>>> 
>>>> Are you able to provide a test case to recreate this behaviour we can 
>>>> setup locally ?
>>>> 
>>>> Best Regards
>>>> Hugh Williams
>>>> Professional Services
>>>> OpenLink Software, Inc.      //              http://www.openlinksw.com/
>>>> Weblog   -- http://www.openlinksw.com/blogs/
>>>> LinkedIn -- http://www.linkedin.com/company/openlink-software/
>>>> Twitter  -- http://twitter.com/OpenLink
>>>> Google+  -- http://plus.google.com/100570109519069333827/
>>>> Facebook -- http://www.facebook.com/OpenLinkSoftware
>>>> Universal Data Access, Integration, and Management Technology Providers
>>>> 
>>>> On 20 Nov 2013, at 19:20, ghirardi nicola <n.ghira...@cineca.it> wrote:
>>>> 
>>>>> 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)
>>>>>  }
>>>>> ------------------------------------------------------------------------------
>>>>> Sponsored by Intel(R) XDK 
>>>>> Develop, test and display web and hybrid apps with a single code base.
>>>>> Download it for free now!
>>>>> http://pubads.g.doubleclick.net/gampad/clk?id=111408631&iu=/4140/ostg.clktrk_______________________________________________
>>>>> Virtuoso-users mailing list
>>>>> Virtuoso-users@lists.sourceforge.net
>>>>> https://lists.sourceforge.net/lists/listinfo/virtuoso-users
>>>> 
>>> 
>>> ------------------------------------------------------------------------------
>>> Sponsored by Intel(R) XDK 
>>> Develop, test and display web and hybrid apps with a single code base.
>>> Download it for free now!
>>> http://pubads.g.doubleclick.net/gampad/clk?id=111408631&iu=/4140/ostg.clktrk_______________________________________________
>>> Virtuoso-users mailing list
>>> Virtuoso-users@lists.sourceforge.net
>>> https://lists.sourceforge.net/lists/listinfo/virtuoso-users
>> 
> 
> ------------------------------------------------------------------------------
> Sponsored by Intel(R) XDK 
> Develop, test and display web and hybrid apps with a single code base.
> Download it for free now!
> http://pubads.g.doubleclick.net/gampad/clk?id=111408631&iu=/4140/ostg.clktrk_______________________________________________
> Virtuoso-users mailing list
> Virtuoso-users@lists.sourceforge.net
> https://lists.sourceforge.net/lists/listinfo/virtuoso-users

------------------------------------------------------------------------------
Rapidly troubleshoot problems before they affect your business. Most IT 
organizations don't have a clear picture of how application performance 
affects their revenue. With AppDynamics, you get 100% visibility into your 
Java,.NET, & PHP application. Start your 15-day FREE TRIAL of AppDynamics Pro!
http://pubads.g.doubleclick.net/gampad/clk?id=84349831&iu=/4140/ostg.clktrk
_______________________________________________
Virtuoso-users mailing list
Virtuoso-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/virtuoso-users

Reply via email to