Hi I am using Virtuoso Open Source Edition Version: 07.10.3207, Build: Feb 17 2014 running on Windows 7.
I am seeing some strange, incorrect(?), results when using aggregates and property paths. In the process of trying to generate a small example case, I have come across the following related problem. I am seeing different results using different forms of property paths depending on whether I specify a no graph, an explicit graph or a variable graph. Given a data set created like this: prefix d: <http://foo/> drop silent graph <http://foo> insert into <http://foo> { d:top d:level "top". d:m d:in d:top. d:a d:in d:m; d:item "a"; d:value 0 . d:b d:in d:m; d:item "b"; d:value 1 . d:c d:in d:m; d:item "c"; d:value 1 . } The queries below demonstrate different results: ########################################## # No graph - correct prefix d: <http://foo/> select * where { ?item d:value ?value. ?item d:in+ ?top. ?top d:level ?level. } returns: (CORRECT) http://foo/a 0 http://foo/top "top" http://foo/b 1 http://foo/top "top" http://foo/c 1 http://foo/top " top" ########################################## # Explicit graph - correct prefix d: <http://foo/> select * where { graph <http://foo> { ?item d:value ?value. ?item d:in+ ?top. ?top d:level ?level. } } returns:(CORRECT) http://foo/b 1 http://foo/top "top" http://foo/a 0 http://foo/top "top" http://foo/c 1 http://foo/top "top" ########################################## # Variable graph version 1 - incorrect prefix d: <http://foo/> select * where { graph ?g { ?item d:value ?value. ?item d:in+ ?top. ?top d:level ?level. } } returns: (INCORRECT) http://foo http://foo/a 0 http://foo/top "top" http://foo http://foo/a 0 http://foo/top "top" ########################################## # Variable graph version 2 - incorrect prefix d: <http://foo/> select * where { graph ?g { ?item d:value ?value. ?item d:in{2} ?top. ?top d:level ?level. } } returns: (INCORRECT) http://foo http://foo/a 0 http://foo/top "top" ########################################## # Variable graph version 3 - correct prefix d: <http://foo/> select * where { graph ?g { ?item d:value ?value. ?item d:in/d:in ?top. ?top d:level ?level. } } returns: (CORRECT) http://foo http://foo/a 0 http://foo/top "top" http://foo http://foo/b 1 http://foo/top "top" http://foo http://foo/c 1 http://foo/top "top" The three different variations on the property path all seem to work when the graph is not specified or when it is specified explicitly. Best regards Dominic Robinson ------------------------------------------------------------------------------ "Accelerate Dev Cycles with Automated Cross-Browser Testing - For FREE Instantly run your Selenium tests across 300+ browser/OS combos. Get unparalleled scalability from the best Selenium testing platform available. Simple to use. Nothing to install. Get started now for free." http://p.sf.net/sfu/SauceLabs _______________________________________________ Virtuoso-users mailing list Virtuoso-users@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/virtuoso-users