From: <tho...@us...> - 2012-04-09 10:28:55
|
Revision: 6261 http://bigdata.svn.sourceforge.net/bigdata/?rev=6261&view=rev Author: thompsonbry Date: 2012-04-09 10:28:48 +0000 (Mon, 09 Apr 2012) Log Message: ----------- Added a variant of a query to show the correctly rewritten structure. Modified Paths: -------------- branches/BIGDATA_RELEASE_1_2_0/bigdata-rdf/src/test/com/bigdata/rdf/sparql/ast/eval/TestTCK.java Added Paths: ----------- branches/BIGDATA_RELEASE_1_2_0/bigdata-rdf/src/test/com/bigdata/rdf/sparql/ast/eval/two-nested-opt2.rq Modified: branches/BIGDATA_RELEASE_1_2_0/bigdata-rdf/src/test/com/bigdata/rdf/sparql/ast/eval/TestTCK.java =================================================================== --- branches/BIGDATA_RELEASE_1_2_0/bigdata-rdf/src/test/com/bigdata/rdf/sparql/ast/eval/TestTCK.java 2012-04-09 10:27:43 UTC (rev 6260) +++ branches/BIGDATA_RELEASE_1_2_0/bigdata-rdf/src/test/com/bigdata/rdf/sparql/ast/eval/TestTCK.java 2012-04-09 10:28:48 UTC (rev 6261) @@ -243,7 +243,24 @@ ).runTest(); } + + /** + * This is the same query, except we are running the rewritten version of + * the query (that is, the version that we have to produce for the query + * above with the badly designed left join). + * + */ + public void test_two_nested_opt2() throws Exception { + new TestHelper( + "two-nested-opt", // testURI, + "two-nested-opt2.rq",// queryFileURL + "two-nested-opt.ttl",// dataFileURL + "two-nested-opt.srx"// resultFileURL + ).runTest(); + + } + /** * This case is not a problem. It provides a contrast to * {@link #test_filter_nested_2()} Added: branches/BIGDATA_RELEASE_1_2_0/bigdata-rdf/src/test/com/bigdata/rdf/sparql/ast/eval/two-nested-opt2.rq =================================================================== --- branches/BIGDATA_RELEASE_1_2_0/bigdata-rdf/src/test/com/bigdata/rdf/sparql/ast/eval/two-nested-opt2.rq (rev 0) +++ branches/BIGDATA_RELEASE_1_2_0/bigdata-rdf/src/test/com/bigdata/rdf/sparql/ast/eval/two-nested-opt2.rq 2012-04-09 10:28:48 UTC (rev 6261) @@ -0,0 +1,16 @@ +PREFIX : <http://example/> + +SELECT * +WITH { + SELECT ?w ?v { + :x3 :q ?w . + OPTIONAL { :x2 :p ?v } + } +} as %namedSet1 +{ + :x1 :p ?v . + OPTIONAL + { + INCLUDE %namedSet1 + } +} This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <mrp...@us...> - 2012-08-06 15:49:12
|
Revision: 6418 http://bigdata.svn.sourceforge.net/bigdata/?rev=6418&view=rev Author: mrpersonick Date: 2012-08-06 15:49:05 +0000 (Mon, 06 Aug 2012) Log Message: ----------- added a test to see if join vars are set correctly when a named subquery include is the first operator and there are exogenous bindings Modified Paths: -------------- branches/BIGDATA_RELEASE_1_2_0/bigdata-rdf/src/test/com/bigdata/rdf/sparql/ast/eval/TestNamedSubQuery.java Added Paths: ----------- branches/BIGDATA_RELEASE_1_2_0/bigdata-rdf/src/test/com/bigdata/rdf/sparql/ast/eval/named-subquery-bindings-2.rq branches/BIGDATA_RELEASE_1_2_0/bigdata-rdf/src/test/com/bigdata/rdf/sparql/ast/eval/named-subquery-bindings-2.srx branches/BIGDATA_RELEASE_1_2_0/bigdata-rdf/src/test/com/bigdata/rdf/sparql/ast/eval/named-subquery-bindings-2.trig Modified: branches/BIGDATA_RELEASE_1_2_0/bigdata-rdf/src/test/com/bigdata/rdf/sparql/ast/eval/TestNamedSubQuery.java =================================================================== --- branches/BIGDATA_RELEASE_1_2_0/bigdata-rdf/src/test/com/bigdata/rdf/sparql/ast/eval/TestNamedSubQuery.java 2012-08-06 15:47:41 UTC (rev 6417) +++ branches/BIGDATA_RELEASE_1_2_0/bigdata-rdf/src/test/com/bigdata/rdf/sparql/ast/eval/TestNamedSubQuery.java 2012-08-06 15:49:05 UTC (rev 6418) @@ -156,4 +156,32 @@ } + /** + * Unit test verifies that the named subquery is considering the + * exogenous variables when it's the first operator in the query and + * choosing the appropriate join variables to build the hash index. You + * need to enable logging to verify that the JOIN_VARS are set correctly + * on the include (you should see VarNode(x)). + * + * <pre> + * select ?x ?o + * with { + * select ?x where { ?x rdf:type foaf:Person } + * } AS %namedSet1 + * where { + * INCLUDE %namedSet1 + * ?x rdfs:label ?o + * } + * bindings ?x + * { + * ( <http://www.bigdata.com/Mike> ) + * } + * </pre> + */ + public void test_named_subquery_bindings_2() throws Exception { + + new TestHelper("named-subquery-bindings-2").runTest(); + + } + } Added: branches/BIGDATA_RELEASE_1_2_0/bigdata-rdf/src/test/com/bigdata/rdf/sparql/ast/eval/named-subquery-bindings-2.rq =================================================================== --- branches/BIGDATA_RELEASE_1_2_0/bigdata-rdf/src/test/com/bigdata/rdf/sparql/ast/eval/named-subquery-bindings-2.rq (rev 0) +++ branches/BIGDATA_RELEASE_1_2_0/bigdata-rdf/src/test/com/bigdata/rdf/sparql/ast/eval/named-subquery-bindings-2.rq 2012-08-06 15:49:05 UTC (rev 6418) @@ -0,0 +1,15 @@ +PREFIX rdf: <http://www.w3.org/1999/02/22-rdf-syntax-ns#> +PREFIX rdfs: <http://www.w3.org/2000/01/rdf-schema#> +PREFIX foaf: <http://xmlns.com/foaf/0.1/> +select ?x ?o + with { + select ?x where { ?x rdf:type foaf:Person } + } AS %namedSet1 +where { + INCLUDE %namedSet1 + ?x rdfs:label ?o +} +bindings ?x +{ + ( <http://www.bigdata.com/Mike> ) +} \ No newline at end of file Added: branches/BIGDATA_RELEASE_1_2_0/bigdata-rdf/src/test/com/bigdata/rdf/sparql/ast/eval/named-subquery-bindings-2.srx =================================================================== --- branches/BIGDATA_RELEASE_1_2_0/bigdata-rdf/src/test/com/bigdata/rdf/sparql/ast/eval/named-subquery-bindings-2.srx (rev 0) +++ branches/BIGDATA_RELEASE_1_2_0/bigdata-rdf/src/test/com/bigdata/rdf/sparql/ast/eval/named-subquery-bindings-2.srx 2012-08-06 15:49:05 UTC (rev 6418) @@ -0,0 +1,29 @@ +<?xml version="1.0"?> +<sparql + xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" + xmlns:xs="http://www.w3.org/2001/XMLSchema#" + xmlns="http://www.w3.org/2005/sparql-results#" > + <head> + <variable name="x"/> + <variable name="o"/> + </head> + <results> + <result> + <binding name="x"> + <uri>http://www.bigdata.com/Mike</uri> + </binding> + <binding name="o"> + <literal>Mike</literal> + </binding> + </result> +<!-- + <result> + <binding name="x"> + <uri>http://www.bigdata.com/Bryan</uri> + </binding> + <binding name="o"> + <literal>Bryan</literal> + </binding> + </result> --> + </results> +</sparql> Added: branches/BIGDATA_RELEASE_1_2_0/bigdata-rdf/src/test/com/bigdata/rdf/sparql/ast/eval/named-subquery-bindings-2.trig =================================================================== --- branches/BIGDATA_RELEASE_1_2_0/bigdata-rdf/src/test/com/bigdata/rdf/sparql/ast/eval/named-subquery-bindings-2.trig (rev 0) +++ branches/BIGDATA_RELEASE_1_2_0/bigdata-rdf/src/test/com/bigdata/rdf/sparql/ast/eval/named-subquery-bindings-2.trig 2012-08-06 15:49:05 UTC (rev 6418) @@ -0,0 +1,12 @@ +@prefix : <http://www.bigdata.com/> . +@prefix rdf: <http://www.w3.org/1999/02/22-rdf-syntax-ns#> . +@prefix rdfs: <http://www.w3.org/2000/01/rdf-schema#> . +@prefix foaf: <http://xmlns.com/foaf/0.1/> . + +:named-subquery{ + :Mike rdf:type foaf:Person . + :Bryan rdf:type foaf:Person . + :Mike rdfs:label "Mike" . + :Bryan rdfs:label "Bryan" . + :DC rdfs:label "DC" . +} This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <jer...@us...> - 2013-08-21 21:05:46
|
Revision: 7307 http://bigdata.svn.sourceforge.net/bigdata/?rev=7307&view=rev Author: jeremy_carroll Date: 2013-08-21 21:05:38 +0000 (Wed, 21 Aug 2013) Log Message: ----------- tests for 709 and 429 select ?g { graph ?g {} } Added Paths: ----------- branches/BIGDATA_RELEASE_1_2_0/bigdata-rdf/src/test/com/bigdata/rdf/sparql/ast/eval/TestGraphEmptyPattern709_429.java branches/BIGDATA_RELEASE_1_2_0/bigdata-rdf/src/test/com/bigdata/rdf/sparql/ast/eval/trac429.rq branches/BIGDATA_RELEASE_1_2_0/bigdata-rdf/src/test/com/bigdata/rdf/sparql/ast/eval/trac429.srx branches/BIGDATA_RELEASE_1_2_0/bigdata-rdf/src/test/com/bigdata/rdf/sparql/ast/eval/trac429.trig branches/BIGDATA_RELEASE_1_2_0/bigdata-rdf/src/test/com/bigdata/rdf/sparql/ast/eval/trac709.rq branches/BIGDATA_RELEASE_1_2_0/bigdata-rdf/src/test/com/bigdata/rdf/sparql/ast/eval/trac709.srx branches/BIGDATA_RELEASE_1_2_0/bigdata-rdf/src/test/com/bigdata/rdf/sparql/ast/eval/trac709.trig branches/BIGDATA_RELEASE_1_2_0/bigdata-rdf/src/test/com/bigdata/rdf/sparql/ast/eval/trac709empty.rq branches/BIGDATA_RELEASE_1_2_0/bigdata-rdf/src/test/com/bigdata/rdf/sparql/ast/eval/trac709empty.srx branches/BIGDATA_RELEASE_1_2_0/bigdata-rdf/src/test/com/bigdata/rdf/sparql/ast/eval/trac709empty.trig branches/BIGDATA_RELEASE_1_2_0/bigdata-rdf/src/test/com/bigdata/rdf/sparql/ast/eval/trac709workaround.rq Added: branches/BIGDATA_RELEASE_1_2_0/bigdata-rdf/src/test/com/bigdata/rdf/sparql/ast/eval/TestGraphEmptyPattern709_429.java =================================================================== --- branches/BIGDATA_RELEASE_1_2_0/bigdata-rdf/src/test/com/bigdata/rdf/sparql/ast/eval/TestGraphEmptyPattern709_429.java (rev 0) +++ branches/BIGDATA_RELEASE_1_2_0/bigdata-rdf/src/test/com/bigdata/rdf/sparql/ast/eval/TestGraphEmptyPattern709_429.java 2013-08-21 21:05:38 UTC (rev 7307) @@ -0,0 +1,69 @@ +/** + +Copyright (C) SYSTAP, LLC 2013. All rights reserved. + +Contact: + SYSTAP, LLC + 4501 Tower Road + Greensboro, NC 27410 + lic...@bi... + +This program is free software; you can redistribute it and/or modify +it under the terms of the GNU General Public License as published by +the Free Software Foundation; version 2 of the License. + +This program is distributed in the hope that it will be useful, +but WITHOUT ANY WARRANTY; without even the implied warranty of +MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +GNU General Public License for more details. + +You should have received a copy of the GNU General Public License +along with this program; if not, write to the Free Software +Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA +*/ + +package com.bigdata.rdf.sparql.ast.eval; + + +/** + * Tests concerning "SELECT GRAPH XXXX {}" with XXXX and the dataset varying. + * + */ +public class TestGraphEmptyPattern709_429 extends AbstractDataDrivenSPARQLTestCase { + + /** + * + */ + public TestGraphEmptyPattern709_429() { + } + + /** + * @param name + */ + public TestGraphEmptyPattern709_429(String name) { + super(name); + } + + public void test_graph_var() throws Exception { + + new TestHelper("trac709").runTest(); + + } + + public void test_empty_graph_matches() throws Exception { + + new TestHelper("trac709empty").runTest(); + + } + public void test_graph_uri() throws Exception { + + new TestHelper("trac429").runTest(); + + } + public void test_work_around_graph_var() throws Exception { + + new TestHelper("trac709workaround", "trac709workaround.rq", "trac709.trig", "trac709.srx").runTest(); + + } + +} Added: branches/BIGDATA_RELEASE_1_2_0/bigdata-rdf/src/test/com/bigdata/rdf/sparql/ast/eval/trac429.rq =================================================================== --- branches/BIGDATA_RELEASE_1_2_0/bigdata-rdf/src/test/com/bigdata/rdf/sparql/ast/eval/trac429.rq (rev 0) +++ branches/BIGDATA_RELEASE_1_2_0/bigdata-rdf/src/test/com/bigdata/rdf/sparql/ast/eval/trac429.rq 2013-08-21 21:05:38 UTC (rev 7307) @@ -0,0 +1,4 @@ +prefix : <http://www.bigdata.com/> +prefix rdf: <http://www.w3.org/1999/02/22-rdf-syntax-ns#> + +select ?g where { BIND ("1080" as ?g) . graph <http://www.bigdata.com/> {} } Added: branches/BIGDATA_RELEASE_1_2_0/bigdata-rdf/src/test/com/bigdata/rdf/sparql/ast/eval/trac429.srx =================================================================== --- branches/BIGDATA_RELEASE_1_2_0/bigdata-rdf/src/test/com/bigdata/rdf/sparql/ast/eval/trac429.srx (rev 0) +++ branches/BIGDATA_RELEASE_1_2_0/bigdata-rdf/src/test/com/bigdata/rdf/sparql/ast/eval/trac429.srx 2013-08-21 21:05:38 UTC (rev 7307) @@ -0,0 +1,16 @@ +<?xml version="1.0"?> +<sparql + xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" + xmlns:xs="http://www.w3.org/2001/XMLSchema#" + xmlns="http://www.w3.org/2005/sparql-results#" > + <head> + <variable name="g"/> + </head> + <results> + <result> + <binding name="g"> + <literal>1080</literal> + </binding> + </result> + </results> +</sparql> \ No newline at end of file Added: branches/BIGDATA_RELEASE_1_2_0/bigdata-rdf/src/test/com/bigdata/rdf/sparql/ast/eval/trac429.trig =================================================================== --- branches/BIGDATA_RELEASE_1_2_0/bigdata-rdf/src/test/com/bigdata/rdf/sparql/ast/eval/trac429.trig (rev 0) +++ branches/BIGDATA_RELEASE_1_2_0/bigdata-rdf/src/test/com/bigdata/rdf/sparql/ast/eval/trac429.trig 2013-08-21 21:05:38 UTC (rev 7307) @@ -0,0 +1,11 @@ +@prefix : <http://www.bigdata.com/> . +@prefix rdf: <http://www.w3.org/1999/02/22-rdf-syntax-ns#> . + +: { +:x rdf:type :C . +} + +:a { +:y rdf:type :B . +:z rdf:type :A . +} Added: branches/BIGDATA_RELEASE_1_2_0/bigdata-rdf/src/test/com/bigdata/rdf/sparql/ast/eval/trac709.rq =================================================================== --- branches/BIGDATA_RELEASE_1_2_0/bigdata-rdf/src/test/com/bigdata/rdf/sparql/ast/eval/trac709.rq (rev 0) +++ branches/BIGDATA_RELEASE_1_2_0/bigdata-rdf/src/test/com/bigdata/rdf/sparql/ast/eval/trac709.rq 2013-08-21 21:05:38 UTC (rev 7307) @@ -0,0 +1,4 @@ +prefix : <http://www.bigdata.com/> +prefix rdf: <http://www.w3.org/1999/02/22-rdf-syntax-ns#> + +select ?g where { graph ?g {} } Added: branches/BIGDATA_RELEASE_1_2_0/bigdata-rdf/src/test/com/bigdata/rdf/sparql/ast/eval/trac709.srx =================================================================== --- branches/BIGDATA_RELEASE_1_2_0/bigdata-rdf/src/test/com/bigdata/rdf/sparql/ast/eval/trac709.srx (rev 0) +++ branches/BIGDATA_RELEASE_1_2_0/bigdata-rdf/src/test/com/bigdata/rdf/sparql/ast/eval/trac709.srx 2013-08-21 21:05:38 UTC (rev 7307) @@ -0,0 +1,21 @@ +<?xml version="1.0"?> +<sparql + xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" + xmlns:xs="http://www.w3.org/2001/XMLSchema#" + xmlns="http://www.w3.org/2005/sparql-results#" > + <head> + <variable name="g"/> + </head> + <results> + <result> + <binding name="g"> + <uri>http://www.bigdata.com/</uri> + </binding> + </result> + <result> + <binding name="g"> + <uri>http://www.bigdata.com/a</uri> + </binding> + </result> + </results> +</sparql> \ No newline at end of file Added: branches/BIGDATA_RELEASE_1_2_0/bigdata-rdf/src/test/com/bigdata/rdf/sparql/ast/eval/trac709.trig =================================================================== --- branches/BIGDATA_RELEASE_1_2_0/bigdata-rdf/src/test/com/bigdata/rdf/sparql/ast/eval/trac709.trig (rev 0) +++ branches/BIGDATA_RELEASE_1_2_0/bigdata-rdf/src/test/com/bigdata/rdf/sparql/ast/eval/trac709.trig 2013-08-21 21:05:38 UTC (rev 7307) @@ -0,0 +1,11 @@ +@prefix : <http://www.bigdata.com/> . +@prefix rdf: <http://www.w3.org/1999/02/22-rdf-syntax-ns#> . + +: { +:x rdf:type :C . +} + +:a { +:y rdf:type :B . +:z rdf:type :A . +} Added: branches/BIGDATA_RELEASE_1_2_0/bigdata-rdf/src/test/com/bigdata/rdf/sparql/ast/eval/trac709empty.rq =================================================================== --- branches/BIGDATA_RELEASE_1_2_0/bigdata-rdf/src/test/com/bigdata/rdf/sparql/ast/eval/trac709empty.rq (rev 0) +++ branches/BIGDATA_RELEASE_1_2_0/bigdata-rdf/src/test/com/bigdata/rdf/sparql/ast/eval/trac709empty.rq 2013-08-21 21:05:38 UTC (rev 7307) @@ -0,0 +1,4 @@ +prefix : <http://www.bigdata.com/> +prefix rdf: <http://www.w3.org/1999/02/22-rdf-syntax-ns#> + +select ?g where { graph ?g {} } Added: branches/BIGDATA_RELEASE_1_2_0/bigdata-rdf/src/test/com/bigdata/rdf/sparql/ast/eval/trac709empty.srx =================================================================== --- branches/BIGDATA_RELEASE_1_2_0/bigdata-rdf/src/test/com/bigdata/rdf/sparql/ast/eval/trac709empty.srx (rev 0) +++ branches/BIGDATA_RELEASE_1_2_0/bigdata-rdf/src/test/com/bigdata/rdf/sparql/ast/eval/trac709empty.srx 2013-08-21 21:05:38 UTC (rev 7307) @@ -0,0 +1,21 @@ +<?xml version="1.0"?> +<sparql + xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" + xmlns:xs="http://www.w3.org/2001/XMLSchema#" + xmlns="http://www.w3.org/2005/sparql-results#" > + <head> + <variable name="g"/> + </head> + <results> + <result> + <binding name="g"> + <uri>http://www.bigdata.com/</uri> + </binding> + </result> + <result> + <binding name="g"> + <uri>http://www.bigdata.com/a</uri> + </binding> + </result> + </results> +</sparql> \ No newline at end of file Added: branches/BIGDATA_RELEASE_1_2_0/bigdata-rdf/src/test/com/bigdata/rdf/sparql/ast/eval/trac709empty.trig =================================================================== --- branches/BIGDATA_RELEASE_1_2_0/bigdata-rdf/src/test/com/bigdata/rdf/sparql/ast/eval/trac709empty.trig (rev 0) +++ branches/BIGDATA_RELEASE_1_2_0/bigdata-rdf/src/test/com/bigdata/rdf/sparql/ast/eval/trac709empty.trig 2013-08-21 21:05:38 UTC (rev 7307) @@ -0,0 +1,9 @@ +@prefix : <http://www.bigdata.com/> . +@prefix rdf: <http://www.w3.org/1999/02/22-rdf-syntax-ns#> . + +: { +:x rdf:type :C . +} + +:a { +} Added: branches/BIGDATA_RELEASE_1_2_0/bigdata-rdf/src/test/com/bigdata/rdf/sparql/ast/eval/trac709workaround.rq =================================================================== --- branches/BIGDATA_RELEASE_1_2_0/bigdata-rdf/src/test/com/bigdata/rdf/sparql/ast/eval/trac709workaround.rq (rev 0) +++ branches/BIGDATA_RELEASE_1_2_0/bigdata-rdf/src/test/com/bigdata/rdf/sparql/ast/eval/trac709workaround.rq 2013-08-21 21:05:38 UTC (rev 7307) @@ -0,0 +1,8 @@ +prefix : <http://www.bigdata.com/> +prefix rdf: <http://www.w3.org/1999/02/22-rdf-syntax-ns#> + +select ?g where { + { select distinct ?g + { graph ?g { ?s ?p ?o } } + } +} This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <jer...@us...> - 2013-08-21 21:19:16
|
Revision: 7308 http://bigdata.svn.sourceforge.net/bigdata/?rev=7308&view=rev Author: jeremy_carroll Date: 2013-08-21 21:19:09 +0000 (Wed, 21 Aug 2013) Log Message: ----------- further trac429 tests Modified Paths: -------------- branches/BIGDATA_RELEASE_1_2_0/bigdata-rdf/src/test/com/bigdata/rdf/sparql/ast/eval/TestGraphEmptyPattern709_429.java Added Paths: ----------- branches/BIGDATA_RELEASE_1_2_0/bigdata-rdf/src/test/com/bigdata/rdf/sparql/ast/eval/trac429empty.trig branches/BIGDATA_RELEASE_1_2_0/bigdata-rdf/src/test/com/bigdata/rdf/sparql/ast/eval/trac429neg.rq branches/BIGDATA_RELEASE_1_2_0/bigdata-rdf/src/test/com/bigdata/rdf/sparql/ast/eval/trac429neg.srx branches/BIGDATA_RELEASE_1_2_0/bigdata-rdf/src/test/com/bigdata/rdf/sparql/ast/eval/trac429neg.trig Modified: branches/BIGDATA_RELEASE_1_2_0/bigdata-rdf/src/test/com/bigdata/rdf/sparql/ast/eval/TestGraphEmptyPattern709_429.java =================================================================== --- branches/BIGDATA_RELEASE_1_2_0/bigdata-rdf/src/test/com/bigdata/rdf/sparql/ast/eval/TestGraphEmptyPattern709_429.java 2013-08-21 21:05:38 UTC (rev 7307) +++ branches/BIGDATA_RELEASE_1_2_0/bigdata-rdf/src/test/com/bigdata/rdf/sparql/ast/eval/TestGraphEmptyPattern709_429.java 2013-08-21 21:19:09 UTC (rev 7308) @@ -60,6 +60,16 @@ new TestHelper("trac429").runTest(); } + public void test_notgraph_uri() throws Exception { + + new TestHelper("trac429neg").runTest(); + + } + public void test_work_empty_graph_matches_by_uri() throws Exception { + + new TestHelper("trac429empty", "trac429.rq", "trac429empty.trig", "trac429.srx").runTest(); + + } public void test_work_around_graph_var() throws Exception { new TestHelper("trac709workaround", "trac709workaround.rq", "trac709.trig", "trac709.srx").runTest(); Added: branches/BIGDATA_RELEASE_1_2_0/bigdata-rdf/src/test/com/bigdata/rdf/sparql/ast/eval/trac429empty.trig =================================================================== --- branches/BIGDATA_RELEASE_1_2_0/bigdata-rdf/src/test/com/bigdata/rdf/sparql/ast/eval/trac429empty.trig (rev 0) +++ branches/BIGDATA_RELEASE_1_2_0/bigdata-rdf/src/test/com/bigdata/rdf/sparql/ast/eval/trac429empty.trig 2013-08-21 21:19:09 UTC (rev 7308) @@ -0,0 +1,10 @@ +@prefix : <http://www.bigdata.com/> . +@prefix rdf: <http://www.w3.org/1999/02/22-rdf-syntax-ns#> . + +: { +} + +:a { +:y rdf:type :B . +:z rdf:type :A . +} Added: branches/BIGDATA_RELEASE_1_2_0/bigdata-rdf/src/test/com/bigdata/rdf/sparql/ast/eval/trac429neg.rq =================================================================== --- branches/BIGDATA_RELEASE_1_2_0/bigdata-rdf/src/test/com/bigdata/rdf/sparql/ast/eval/trac429neg.rq (rev 0) +++ branches/BIGDATA_RELEASE_1_2_0/bigdata-rdf/src/test/com/bigdata/rdf/sparql/ast/eval/trac429neg.rq 2013-08-21 21:19:09 UTC (rev 7308) @@ -0,0 +1,4 @@ +prefix : <http://www.bigdata.com/> +prefix rdf: <http://www.w3.org/1999/02/22-rdf-syntax-ns#> + +select ?g where { BIND ("1080" as ?g) . graph <http://www.bigdata.com/> {} } Added: branches/BIGDATA_RELEASE_1_2_0/bigdata-rdf/src/test/com/bigdata/rdf/sparql/ast/eval/trac429neg.srx =================================================================== --- branches/BIGDATA_RELEASE_1_2_0/bigdata-rdf/src/test/com/bigdata/rdf/sparql/ast/eval/trac429neg.srx (rev 0) +++ branches/BIGDATA_RELEASE_1_2_0/bigdata-rdf/src/test/com/bigdata/rdf/sparql/ast/eval/trac429neg.srx 2013-08-21 21:19:09 UTC (rev 7308) @@ -0,0 +1,11 @@ +<?xml version="1.0"?> +<sparql + xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" + xmlns:xs="http://www.w3.org/2001/XMLSchema#" + xmlns="http://www.w3.org/2005/sparql-results#" > + <head> + <variable name="g"/> + </head> + <results> + </results> +</sparql> \ No newline at end of file Added: branches/BIGDATA_RELEASE_1_2_0/bigdata-rdf/src/test/com/bigdata/rdf/sparql/ast/eval/trac429neg.trig =================================================================== --- branches/BIGDATA_RELEASE_1_2_0/bigdata-rdf/src/test/com/bigdata/rdf/sparql/ast/eval/trac429neg.trig (rev 0) +++ branches/BIGDATA_RELEASE_1_2_0/bigdata-rdf/src/test/com/bigdata/rdf/sparql/ast/eval/trac429neg.trig 2013-08-21 21:19:09 UTC (rev 7308) @@ -0,0 +1,11 @@ +@prefix : <http://www.bigdata.com/> . +@prefix rdf: <http://www.w3.org/1999/02/22-rdf-syntax-ns#> . + +:b { +:x rdf:type :C . +} + +:a { +:y rdf:type :B . +:z rdf:type :A . +} This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <jer...@us...> - 2013-08-21 21:51:44
|
Revision: 7309 http://bigdata.svn.sourceforge.net/bigdata/?rev=7309&view=rev Author: jeremy_carroll Date: 2013-08-21 21:51:37 +0000 (Wed, 21 Aug 2013) Log Message: ----------- test for heisenbug concerning bind. Test demonstrates heisen effect on my quad core machine Added Paths: ----------- branches/BIGDATA_RELEASE_1_2_0/bigdata-rdf/src/test/com/bigdata/rdf/sparql/ast/eval/TestBindHeisenbug708.java branches/BIGDATA_RELEASE_1_2_0/bigdata-rdf/src/test/com/bigdata/rdf/sparql/ast/eval/heisenbug-708.rq branches/BIGDATA_RELEASE_1_2_0/bigdata-rdf/src/test/com/bigdata/rdf/sparql/ast/eval/heisenbug-708.srx branches/BIGDATA_RELEASE_1_2_0/bigdata-rdf/src/test/com/bigdata/rdf/sparql/ast/eval/heisenbug-708.ttl Added: branches/BIGDATA_RELEASE_1_2_0/bigdata-rdf/src/test/com/bigdata/rdf/sparql/ast/eval/TestBindHeisenbug708.java =================================================================== --- branches/BIGDATA_RELEASE_1_2_0/bigdata-rdf/src/test/com/bigdata/rdf/sparql/ast/eval/TestBindHeisenbug708.java (rev 0) +++ branches/BIGDATA_RELEASE_1_2_0/bigdata-rdf/src/test/com/bigdata/rdf/sparql/ast/eval/TestBindHeisenbug708.java 2013-08-21 21:51:37 UTC (rev 7309) @@ -0,0 +1,64 @@ +/** + +Copyright (C) SYSTAP, LLC 2013. All rights reserved. + +Contact: + SYSTAP, LLC + 4501 Tower Road + Greensboro, NC 27410 + lic...@bi... + +This program is free software; you can redistribute it and/or modify +it under the terms of the GNU General Public License as published by +the Free Software Foundation; version 2 of the License. + +This program is distributed in the hope that it will be useful, +but WITHOUT ANY WARRANTY; without even the implied warranty of +MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +GNU General Public License for more details. + +You should have received a copy of the GNU General Public License +along with this program; if not, write to the Free Software +Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA +*/ +package com.bigdata.rdf.sparql.ast.eval; + +import junit.framework.AssertionFailedError; + +/** + * Test suite for a hesienbug involving BIND. + * Unlike the other issues this sometimes happens, and is sometimes OK, + * so we run the test in a loop 20 times. + * + * @version $Id$ + */ +public class TestBindHeisenbug708 extends AbstractDataDrivenSPARQLTestCase { + + public TestBindHeisenbug708() { + } + + public TestBindHeisenbug708(String name) { + super(name); + } + + public void test_heisenbug708() throws Exception { + int cnt = 0; + int max = 10; + for (int i=0; i<max; i++) { + try { + new TestHelper( + "heisenbug-708",// testURI + "heisenbug-708.rq", // queryURI + "heisenbug-708.ttl", // dataURI + "heisenbug-708.srx" // resultURI + ).runTest(); + } + catch (AssertionFailedError e) { + cnt++; + } + } + assertTrue("Test failed " + cnt + "/" + max + " times", cnt==0); + } + + +} Added: branches/BIGDATA_RELEASE_1_2_0/bigdata-rdf/src/test/com/bigdata/rdf/sparql/ast/eval/heisenbug-708.rq =================================================================== --- branches/BIGDATA_RELEASE_1_2_0/bigdata-rdf/src/test/com/bigdata/rdf/sparql/ast/eval/heisenbug-708.rq (rev 0) +++ branches/BIGDATA_RELEASE_1_2_0/bigdata-rdf/src/test/com/bigdata/rdf/sparql/ast/eval/heisenbug-708.rq 2013-08-21 21:51:37 UTC (rev 7309) @@ -0,0 +1,14 @@ +PREFIX : <http://example/> + + +SELECT ?a +{ + { + ?a :label "RNK-16-2B3" + } + UNION + { + BIND ( :bound as ?a ) + } +} + Added: branches/BIGDATA_RELEASE_1_2_0/bigdata-rdf/src/test/com/bigdata/rdf/sparql/ast/eval/heisenbug-708.srx =================================================================== --- branches/BIGDATA_RELEASE_1_2_0/bigdata-rdf/src/test/com/bigdata/rdf/sparql/ast/eval/heisenbug-708.srx (rev 0) +++ branches/BIGDATA_RELEASE_1_2_0/bigdata-rdf/src/test/com/bigdata/rdf/sparql/ast/eval/heisenbug-708.srx 2013-08-21 21:51:37 UTC (rev 7309) @@ -0,0 +1,21 @@ +<?xml version="1.0"?> +<sparql + xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" + xmlns:xs="http://www.w3.org/2001/XMLSchema#" + xmlns="http://www.w3.org/2005/sparql-results#" > + <head> + <variable name="a"/> + </head> + <results> + <result> + <binding name="a"> + <uri>http://example/z</uri> + </binding> + </result> + <result> + <binding name="a"> + <uri>http://example/bound</uri> + </binding> + </result> + </results> +</sparql> Added: branches/BIGDATA_RELEASE_1_2_0/bigdata-rdf/src/test/com/bigdata/rdf/sparql/ast/eval/heisenbug-708.ttl =================================================================== --- branches/BIGDATA_RELEASE_1_2_0/bigdata-rdf/src/test/com/bigdata/rdf/sparql/ast/eval/heisenbug-708.ttl (rev 0) +++ branches/BIGDATA_RELEASE_1_2_0/bigdata-rdf/src/test/com/bigdata/rdf/sparql/ast/eval/heisenbug-708.ttl 2013-08-21 21:51:37 UTC (rev 7309) @@ -0,0 +1,3 @@ +@prefix : <http://example/> . + +:z :label "RNK-16-2B3" . This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <jer...@us...> - 2013-08-21 22:08:46
|
Revision: 7310 http://bigdata.svn.sourceforge.net/bigdata/?rev=7310&view=rev Author: jeremy_carroll Date: 2013-08-21 22:08:39 +0000 (Wed, 21 Aug 2013) Log Message: ----------- "Bigdata does not distinguish between an empty named graph and a named graph that does not exist" Modified Paths: -------------- branches/BIGDATA_RELEASE_1_2_0/bigdata-rdf/src/test/com/bigdata/rdf/sparql/ast/eval/TestGraphEmptyPattern709_429.java branches/BIGDATA_RELEASE_1_2_0/bigdata-rdf/src/test/com/bigdata/rdf/sparql/ast/eval/trac709empty.srx Added Paths: ----------- branches/BIGDATA_RELEASE_1_2_0/bigdata-rdf/src/test/com/bigdata/rdf/sparql/ast/eval/trac429empty.srx Modified: branches/BIGDATA_RELEASE_1_2_0/bigdata-rdf/src/test/com/bigdata/rdf/sparql/ast/eval/TestGraphEmptyPattern709_429.java =================================================================== --- branches/BIGDATA_RELEASE_1_2_0/bigdata-rdf/src/test/com/bigdata/rdf/sparql/ast/eval/TestGraphEmptyPattern709_429.java 2013-08-21 21:51:37 UTC (rev 7309) +++ branches/BIGDATA_RELEASE_1_2_0/bigdata-rdf/src/test/com/bigdata/rdf/sparql/ast/eval/TestGraphEmptyPattern709_429.java 2013-08-21 22:08:39 UTC (rev 7310) @@ -50,7 +50,7 @@ } - public void test_empty_graph_matches() throws Exception { + public void test_empty_graph_does_not_match() throws Exception { new TestHelper("trac709empty").runTest(); @@ -65,9 +65,9 @@ new TestHelper("trac429neg").runTest(); } - public void test_work_empty_graph_matches_by_uri() throws Exception { + public void test_empty_graph_does_not_match_by_uri() throws Exception { - new TestHelper("trac429empty", "trac429.rq", "trac429empty.trig", "trac429.srx").runTest(); + new TestHelper("trac429empty", "trac429.rq", "trac429empty.trig", "trac429empty.srx").runTest(); } public void test_work_around_graph_var() throws Exception { Copied: branches/BIGDATA_RELEASE_1_2_0/bigdata-rdf/src/test/com/bigdata/rdf/sparql/ast/eval/trac429empty.srx (from rev 7309, branches/BIGDATA_RELEASE_1_2_0/bigdata-rdf/src/test/com/bigdata/rdf/sparql/ast/eval/trac709empty.srx) =================================================================== --- branches/BIGDATA_RELEASE_1_2_0/bigdata-rdf/src/test/com/bigdata/rdf/sparql/ast/eval/trac429empty.srx (rev 0) +++ branches/BIGDATA_RELEASE_1_2_0/bigdata-rdf/src/test/com/bigdata/rdf/sparql/ast/eval/trac429empty.srx 2013-08-21 22:08:39 UTC (rev 7310) @@ -0,0 +1,11 @@ +<?xml version="1.0"?> +<sparql + xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" + xmlns:xs="http://www.w3.org/2001/XMLSchema#" + xmlns="http://www.w3.org/2005/sparql-results#" > + <head> + <variable name="g"/> + </head> + <results> + </results> +</sparql> \ No newline at end of file Modified: branches/BIGDATA_RELEASE_1_2_0/bigdata-rdf/src/test/com/bigdata/rdf/sparql/ast/eval/trac709empty.srx =================================================================== --- branches/BIGDATA_RELEASE_1_2_0/bigdata-rdf/src/test/com/bigdata/rdf/sparql/ast/eval/trac709empty.srx 2013-08-21 21:51:37 UTC (rev 7309) +++ branches/BIGDATA_RELEASE_1_2_0/bigdata-rdf/src/test/com/bigdata/rdf/sparql/ast/eval/trac709empty.srx 2013-08-21 22:08:39 UTC (rev 7310) @@ -12,10 +12,5 @@ <uri>http://www.bigdata.com/</uri> </binding> </result> - <result> - <binding name="g"> - <uri>http://www.bigdata.com/a</uri> - </binding> - </result> </results> </sparql> \ No newline at end of file This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <jer...@us...> - 2013-08-21 22:32:08
|
Revision: 7311 http://bigdata.svn.sourceforge.net/bigdata/?rev=7311&view=rev Author: jeremy_carroll Date: 2013-08-21 22:32:01 +0000 (Wed, 21 Aug 2013) Log Message: ----------- test for filter exist in subselect behavior, trac 725 Added Paths: ----------- branches/BIGDATA_RELEASE_1_2_0/bigdata-rdf/src/test/com/bigdata/rdf/sparql/ast/eval/TestSubSelectFilterExist725.java branches/BIGDATA_RELEASE_1_2_0/bigdata-rdf/src/test/com/bigdata/rdf/sparql/ast/eval/filter-exist-725-no-sub-select.rq branches/BIGDATA_RELEASE_1_2_0/bigdata-rdf/src/test/com/bigdata/rdf/sparql/ast/eval/filter-exist-725-sub-select.rq branches/BIGDATA_RELEASE_1_2_0/bigdata-rdf/src/test/com/bigdata/rdf/sparql/ast/eval/filter-exist-725.srx branches/BIGDATA_RELEASE_1_2_0/bigdata-rdf/src/test/com/bigdata/rdf/sparql/ast/eval/filter-exist-725.ttl Added: branches/BIGDATA_RELEASE_1_2_0/bigdata-rdf/src/test/com/bigdata/rdf/sparql/ast/eval/TestSubSelectFilterExist725.java =================================================================== --- branches/BIGDATA_RELEASE_1_2_0/bigdata-rdf/src/test/com/bigdata/rdf/sparql/ast/eval/TestSubSelectFilterExist725.java (rev 0) +++ branches/BIGDATA_RELEASE_1_2_0/bigdata-rdf/src/test/com/bigdata/rdf/sparql/ast/eval/TestSubSelectFilterExist725.java 2013-08-21 22:32:01 UTC (rev 7311) @@ -0,0 +1,74 @@ +/** + +Copyright (C) SYSTAP, LLC 2013. All rights reserved. + +Contact: + SYSTAP, LLC + 4501 Tower Road + Greensboro, NC 27410 + lic...@bi... + +This program is free software; you can redistribute it and/or modify +it under the terms of the GNU General Public License as published by +the Free Software Foundation; version 2 of the License. + +This program is distributed in the hope that it will be useful, +but WITHOUT ANY WARRANTY; without even the implied warranty of +MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +GNU General Public License for more details. + +You should have received a copy of the GNU General Public License +along with this program; if not, write to the Free Software +Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA +*/ +package com.bigdata.rdf.sparql.ast.eval; + +/** + * Test for trac725 + * <pre> +#select * +#where { +#{ +SELECT ( COUNT(?narrow) as ?countNarrow ) ?scheme +WHERE +{ ?narrow skos:inScheme ?scheme . +FILTER EXISTS { ?narrow skos:broader ?b } +} +GROUP BY ?scheme +#} +#} +</pre> + * + */ +public class TestSubSelectFilterExist725 extends AbstractDataDrivenSPARQLTestCase { + + public TestSubSelectFilterExist725() { + } + + public TestSubSelectFilterExist725(String name) { + super(name); + } + + public void test_without_subselect() throws Exception { + + new TestHelper( + "filter-exist-725-no-sub-select",// testURI + "filter-exist-725-no-sub-select.rq", // queryURI + "filter-exist-725.ttl", // dataURI + "filter-exist-725.srx" // resultURI + ).runTest(); + + } + + public void test_with_subselect() throws Exception { + + new TestHelper( + "filter-exist-725-sub-select",// testURI + "filter-exist-725-sub-select.rq", // queryURI + "filter-exist-725.ttl", // dataURI + "filter-exist-725.srx" // resultURI + ).runTest(); + + } + +} Added: branches/BIGDATA_RELEASE_1_2_0/bigdata-rdf/src/test/com/bigdata/rdf/sparql/ast/eval/filter-exist-725-no-sub-select.rq =================================================================== --- branches/BIGDATA_RELEASE_1_2_0/bigdata-rdf/src/test/com/bigdata/rdf/sparql/ast/eval/filter-exist-725-no-sub-select.rq (rev 0) +++ branches/BIGDATA_RELEASE_1_2_0/bigdata-rdf/src/test/com/bigdata/rdf/sparql/ast/eval/filter-exist-725-no-sub-select.rq 2013-08-21 22:32:01 UTC (rev 7311) @@ -0,0 +1,13 @@ +PREFIX : <http://example/> + +#select * +#where { +#{ +SELECT ( COUNT(?narrow) as ?countNarrow ) ?scheme +WHERE +{ ?narrow :inScheme ?scheme . +FILTER EXISTS { ?narrow :broader ?b } +} +GROUP BY ?scheme +#} +#} \ No newline at end of file Added: branches/BIGDATA_RELEASE_1_2_0/bigdata-rdf/src/test/com/bigdata/rdf/sparql/ast/eval/filter-exist-725-sub-select.rq =================================================================== --- branches/BIGDATA_RELEASE_1_2_0/bigdata-rdf/src/test/com/bigdata/rdf/sparql/ast/eval/filter-exist-725-sub-select.rq (rev 0) +++ branches/BIGDATA_RELEASE_1_2_0/bigdata-rdf/src/test/com/bigdata/rdf/sparql/ast/eval/filter-exist-725-sub-select.rq 2013-08-21 22:32:01 UTC (rev 7311) @@ -0,0 +1,13 @@ +PREFIX : <http://example/> + +select * +where { +{ + SELECT ( COUNT(?narrow) as ?countNarrow ) ?scheme + WHERE + { ?narrow :inScheme ?scheme . + FILTER EXISTS { ?narrow :broader ?b } + } + GROUP BY ?scheme +} +} \ No newline at end of file Added: branches/BIGDATA_RELEASE_1_2_0/bigdata-rdf/src/test/com/bigdata/rdf/sparql/ast/eval/filter-exist-725.srx =================================================================== --- branches/BIGDATA_RELEASE_1_2_0/bigdata-rdf/src/test/com/bigdata/rdf/sparql/ast/eval/filter-exist-725.srx (rev 0) +++ branches/BIGDATA_RELEASE_1_2_0/bigdata-rdf/src/test/com/bigdata/rdf/sparql/ast/eval/filter-exist-725.srx 2013-08-21 22:32:01 UTC (rev 7311) @@ -0,0 +1,20 @@ +<?xml version="1.0"?> +<sparql + xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" + xmlns:xs="http://www.w3.org/2001/XMLSchema#" + xmlns="http://www.w3.org/2005/sparql-results#" > + <head> + <variable name="scheme"/> + <variable name="countNarrow"/> + </head> + <results> + <result> + <binding name="countNarrow"> + <literal datatype="http://www.w3.org/2001/XMLSchema#integer">1</literal> + </binding> + <binding name="scheme"> + <uri>http://example/z</uri> + </binding> + </result> + </results> +</sparql> Added: branches/BIGDATA_RELEASE_1_2_0/bigdata-rdf/src/test/com/bigdata/rdf/sparql/ast/eval/filter-exist-725.ttl =================================================================== --- branches/BIGDATA_RELEASE_1_2_0/bigdata-rdf/src/test/com/bigdata/rdf/sparql/ast/eval/filter-exist-725.ttl (rev 0) +++ branches/BIGDATA_RELEASE_1_2_0/bigdata-rdf/src/test/com/bigdata/rdf/sparql/ast/eval/filter-exist-725.ttl 2013-08-21 22:32:01 UTC (rev 7311) @@ -0,0 +1,6 @@ +@prefix : <http://example/> . + +:x :broader :y . +:x :inScheme :z . + + This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <tho...@us...> - 2013-08-22 18:43:06
|
Revision: 7318 http://bigdata.svn.sourceforge.net/bigdata/?rev=7318&view=rev Author: thompsonbry Date: 2013-08-22 18:42:59 +0000 (Thu, 22 Aug 2013) Log Message: ----------- added a version of the heisenbug for the double-bind Modified Paths: -------------- branches/BIGDATA_RELEASE_1_2_0/bigdata-rdf/src/test/com/bigdata/rdf/sparql/ast/eval/TestBindHeisenbug708.java Added Paths: ----------- branches/BIGDATA_RELEASE_1_2_0/bigdata-rdf/src/test/com/bigdata/rdf/sparql/ast/eval/heisenbug-708-doubleBind.rq branches/BIGDATA_RELEASE_1_2_0/bigdata-rdf/src/test/com/bigdata/rdf/sparql/ast/eval/heisenbug-708-doubleBind.srx branches/BIGDATA_RELEASE_1_2_0/bigdata-rdf/src/test/com/bigdata/rdf/sparql/ast/eval/heisenbug-708-doubleBind.ttl Modified: branches/BIGDATA_RELEASE_1_2_0/bigdata-rdf/src/test/com/bigdata/rdf/sparql/ast/eval/TestBindHeisenbug708.java =================================================================== --- branches/BIGDATA_RELEASE_1_2_0/bigdata-rdf/src/test/com/bigdata/rdf/sparql/ast/eval/TestBindHeisenbug708.java 2013-08-22 18:00:26 UTC (rev 7317) +++ branches/BIGDATA_RELEASE_1_2_0/bigdata-rdf/src/test/com/bigdata/rdf/sparql/ast/eval/TestBindHeisenbug708.java 2013-08-22 18:42:59 UTC (rev 7318) @@ -26,10 +26,13 @@ import junit.framework.AssertionFailedError; /** - * Test suite for a hesienbug involving BIND. - * Unlike the other issues this sometimes happens, and is sometimes OK, - * so we run the test in a loop 20 times. + * Test suite for a hesienbug involving BIND. Unlike the other issues this + * sometimes happens, and is sometimes OK, so we run the test in a loop 20 + * times. * + * @see <a href="https://sourceforge.net/apps/trac/bigdata/ticket/708"> + * Heisenbug </a> + * * @version $Id$ */ public class TestBindHeisenbug708 extends AbstractDataDrivenSPARQLTestCase { @@ -52,13 +55,40 @@ "heisenbug-708.ttl", // dataURI "heisenbug-708.srx" // resultURI ).runTest(); +// return; // stop @ success } catch (AssertionFailedError e) { cnt++; +// throw e;// halt @ 1st failure. } } assertTrue("Test failed " + cnt + "/" + max + " times", cnt==0); } - + + /** + * Demonstrates the same problem using two BIND()s. This rules out the + * JOIN as the problem. + */ + public void test_heisenbug708_doubleBind() throws Exception { + int cnt = 0; + int max = 10; + for (int i=0; i<max; i++) { + try { + new TestHelper( + "heisenbug-708-doubleBind",// testURI + "heisenbug-708-doubleBind.rq", // queryURI + "heisenbug-708-doubleBind.ttl", // dataURI + "heisenbug-708-doubleBind.srx" // resultURI + ).runTest(); +// return; // stop @ success + } + catch (AssertionFailedError e) { + cnt++; +// throw e;// halt @ 1st failure. + } + } + assertTrue("Test failed " + cnt + "/" + max + " times", cnt==0); + } + } Added: branches/BIGDATA_RELEASE_1_2_0/bigdata-rdf/src/test/com/bigdata/rdf/sparql/ast/eval/heisenbug-708-doubleBind.rq =================================================================== --- branches/BIGDATA_RELEASE_1_2_0/bigdata-rdf/src/test/com/bigdata/rdf/sparql/ast/eval/heisenbug-708-doubleBind.rq (rev 0) +++ branches/BIGDATA_RELEASE_1_2_0/bigdata-rdf/src/test/com/bigdata/rdf/sparql/ast/eval/heisenbug-708-doubleBind.rq 2013-08-22 18:42:59 UTC (rev 7318) @@ -0,0 +1,15 @@ +PREFIX : <http://example/> + + +SELECT ?a +{ + { +# ?a :label "RNK-16-2B3" + BIND ( :bound2 as ?a ) + } + UNION + { + BIND ( :bound as ?a ) + } +} + Added: branches/BIGDATA_RELEASE_1_2_0/bigdata-rdf/src/test/com/bigdata/rdf/sparql/ast/eval/heisenbug-708-doubleBind.srx =================================================================== --- branches/BIGDATA_RELEASE_1_2_0/bigdata-rdf/src/test/com/bigdata/rdf/sparql/ast/eval/heisenbug-708-doubleBind.srx (rev 0) +++ branches/BIGDATA_RELEASE_1_2_0/bigdata-rdf/src/test/com/bigdata/rdf/sparql/ast/eval/heisenbug-708-doubleBind.srx 2013-08-22 18:42:59 UTC (rev 7318) @@ -0,0 +1,21 @@ +<?xml version="1.0"?> +<sparql + xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" + xmlns:xs="http://www.w3.org/2001/XMLSchema#" + xmlns="http://www.w3.org/2005/sparql-results#" > + <head> + <variable name="a"/> + </head> + <results> + <result> + <binding name="a"> + <uri>http://example/bound2</uri> + </binding> + </result> + <result> + <binding name="a"> + <uri>http://example/bound</uri> + </binding> + </result> + </results> +</sparql> Added: branches/BIGDATA_RELEASE_1_2_0/bigdata-rdf/src/test/com/bigdata/rdf/sparql/ast/eval/heisenbug-708-doubleBind.ttl =================================================================== --- branches/BIGDATA_RELEASE_1_2_0/bigdata-rdf/src/test/com/bigdata/rdf/sparql/ast/eval/heisenbug-708-doubleBind.ttl (rev 0) +++ branches/BIGDATA_RELEASE_1_2_0/bigdata-rdf/src/test/com/bigdata/rdf/sparql/ast/eval/heisenbug-708-doubleBind.ttl 2013-08-22 18:42:59 UTC (rev 7318) @@ -0,0 +1,3 @@ +@prefix : <http://example/> . + +#:z :label "RNK-16-2B3" . This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <jer...@us...> - 2013-09-04 00:22:44
|
Revision: 7384 http://bigdata.svn.sourceforge.net/bigdata/?rev=7384&view=rev Author: jeremy_carroll Date: 2013-09-04 00:22:35 +0000 (Wed, 04 Sep 2013) Log Message: ----------- new tests for trac734: SELECT ?A WHERE { ?A rdf:type / rdfs:subClassOf * <os:ClassA> ; rdf:value ?B . ?B rdf:type / rdfs:subClassOf * <os:ClassB> } Added Paths: ----------- branches/BIGDATA_RELEASE_1_2_0/bigdata-rdf/src/test/com/bigdata/rdf/sparql/ast/eval/TestTwoPropertyPaths734.java branches/BIGDATA_RELEASE_1_2_0/bigdata-rdf/src/test/com/bigdata/rdf/sparql/ast/eval/property-path-734-both.rq branches/BIGDATA_RELEASE_1_2_0/bigdata-rdf/src/test/com/bigdata/rdf/sparql/ast/eval/property-path-734-first.rq branches/BIGDATA_RELEASE_1_2_0/bigdata-rdf/src/test/com/bigdata/rdf/sparql/ast/eval/property-path-734-none.rq branches/BIGDATA_RELEASE_1_2_0/bigdata-rdf/src/test/com/bigdata/rdf/sparql/ast/eval/property-path-734-second.rq branches/BIGDATA_RELEASE_1_2_0/bigdata-rdf/src/test/com/bigdata/rdf/sparql/ast/eval/property-path-734.srx branches/BIGDATA_RELEASE_1_2_0/bigdata-rdf/src/test/com/bigdata/rdf/sparql/ast/eval/property-path-734.ttl Added: branches/BIGDATA_RELEASE_1_2_0/bigdata-rdf/src/test/com/bigdata/rdf/sparql/ast/eval/TestTwoPropertyPaths734.java =================================================================== --- branches/BIGDATA_RELEASE_1_2_0/bigdata-rdf/src/test/com/bigdata/rdf/sparql/ast/eval/TestTwoPropertyPaths734.java (rev 0) +++ branches/BIGDATA_RELEASE_1_2_0/bigdata-rdf/src/test/com/bigdata/rdf/sparql/ast/eval/TestTwoPropertyPaths734.java 2013-09-04 00:22:35 UTC (rev 7384) @@ -0,0 +1,71 @@ +/** + +Copyright (C) SYSTAP, LLC 2013. All rights reserved. + +Contact: + SYSTAP, LLC + 4501 Tower Road + Greensboro, NC 27410 + lic...@bi... + +This program is free software; you can redistribute it and/or modify +it under the terms of the GNU General Public License as published by +the Free Software Foundation; version 2 of the License. + +This program is distributed in the hope that it will be useful, +but WITHOUT ANY WARRANTY; without even the implied warranty of +MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +GNU General Public License for more details. + +You should have received a copy of the GNU General Public License +along with this program; if not, write to the Free Software +Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA +*/ + +package com.bigdata.rdf.sparql.ast.eval; + +import com.bigdata.rdf.sparql.ast.eval.AbstractDataDrivenSPARQLTestCase.TestHelper; + + +/** + * Tests concerning "SELECT GRAPH XXXX {}" with XXXX and the dataset varying. + * + */ +public class TestTwoPropertyPaths734 extends AbstractDataDrivenSPARQLTestCase { + + /** + * + */ + public TestTwoPropertyPaths734() { + } + + /** + * @param name + */ + public TestTwoPropertyPaths734(String name) { + super(name); + } + + private void property_path_test(String name) throws Exception { + + new TestHelper( + "property-path-734-" + name, // testURI, + "property-path-734-" + name + ".rq",// queryFileURL + "property-path-734.ttl",// dataFileURL + "property-path-734.srx" // resultFileURL, + ).runTest(); + } + + public void test_no_property_paths() throws Exception { + property_path_test("none"); + } + public void test_first_property_path() throws Exception { + property_path_test("first"); + } + public void test_second_property_path() throws Exception { + property_path_test("second"); + } + public void test_both_property_paths() throws Exception { + property_path_test("both"); + } +} Added: branches/BIGDATA_RELEASE_1_2_0/bigdata-rdf/src/test/com/bigdata/rdf/sparql/ast/eval/property-path-734-both.rq =================================================================== --- branches/BIGDATA_RELEASE_1_2_0/bigdata-rdf/src/test/com/bigdata/rdf/sparql/ast/eval/property-path-734-both.rq (rev 0) +++ branches/BIGDATA_RELEASE_1_2_0/bigdata-rdf/src/test/com/bigdata/rdf/sparql/ast/eval/property-path-734-both.rq 2013-09-04 00:22:35 UTC (rev 7384) @@ -0,0 +1,12 @@ + +prefix rdf: <http://www.w3.org/1999/02/22-rdf-syntax-ns#> +prefix rdfs: <http://www.w3.org/2000/01/rdf-schema#> + +SELECT ?A +WHERE { + ?A rdf:type / rdfs:subClassOf * + <os:ClassA> ; + rdf:value ?B . + ?B rdf:type / rdfs:subClassOf * + <os:ClassB> +} Added: branches/BIGDATA_RELEASE_1_2_0/bigdata-rdf/src/test/com/bigdata/rdf/sparql/ast/eval/property-path-734-first.rq =================================================================== --- branches/BIGDATA_RELEASE_1_2_0/bigdata-rdf/src/test/com/bigdata/rdf/sparql/ast/eval/property-path-734-first.rq (rev 0) +++ branches/BIGDATA_RELEASE_1_2_0/bigdata-rdf/src/test/com/bigdata/rdf/sparql/ast/eval/property-path-734-first.rq 2013-09-04 00:22:35 UTC (rev 7384) @@ -0,0 +1,12 @@ + +prefix rdf: <http://www.w3.org/1999/02/22-rdf-syntax-ns#> +prefix rdfs: <http://www.w3.org/2000/01/rdf-schema#> + +SELECT ?A +WHERE { + ?A rdf:type / rdfs:subClassOf * + <os:ClassA> ; + rdf:value ?B . + ?B rdf:type # / rdfs:subClassOf * + <os:ClassB> +} Added: branches/BIGDATA_RELEASE_1_2_0/bigdata-rdf/src/test/com/bigdata/rdf/sparql/ast/eval/property-path-734-none.rq =================================================================== --- branches/BIGDATA_RELEASE_1_2_0/bigdata-rdf/src/test/com/bigdata/rdf/sparql/ast/eval/property-path-734-none.rq (rev 0) +++ branches/BIGDATA_RELEASE_1_2_0/bigdata-rdf/src/test/com/bigdata/rdf/sparql/ast/eval/property-path-734-none.rq 2013-09-04 00:22:35 UTC (rev 7384) @@ -0,0 +1,12 @@ + +prefix rdf: <http://www.w3.org/1999/02/22-rdf-syntax-ns#> +prefix rdfs: <http://www.w3.org/2000/01/rdf-schema#> + +SELECT ?A +WHERE { + ?A rdf:type # / rdfs:subClassOf * + <os:ClassA> ; + rdf:value ?B . + ?B rdf:type # / rdfs:subClassOf * + <os:ClassB> +} Added: branches/BIGDATA_RELEASE_1_2_0/bigdata-rdf/src/test/com/bigdata/rdf/sparql/ast/eval/property-path-734-second.rq =================================================================== --- branches/BIGDATA_RELEASE_1_2_0/bigdata-rdf/src/test/com/bigdata/rdf/sparql/ast/eval/property-path-734-second.rq (rev 0) +++ branches/BIGDATA_RELEASE_1_2_0/bigdata-rdf/src/test/com/bigdata/rdf/sparql/ast/eval/property-path-734-second.rq 2013-09-04 00:22:35 UTC (rev 7384) @@ -0,0 +1,12 @@ + +prefix rdf: <http://www.w3.org/1999/02/22-rdf-syntax-ns#> +prefix rdfs: <http://www.w3.org/2000/01/rdf-schema#> + +SELECT ?A +WHERE { + ?A rdf:type # / rdfs:subClassOf * + <os:ClassA> ; + rdf:value ?B . + ?B rdf:type / rdfs:subClassOf * + <os:ClassB> +} Added: branches/BIGDATA_RELEASE_1_2_0/bigdata-rdf/src/test/com/bigdata/rdf/sparql/ast/eval/property-path-734.srx =================================================================== --- branches/BIGDATA_RELEASE_1_2_0/bigdata-rdf/src/test/com/bigdata/rdf/sparql/ast/eval/property-path-734.srx (rev 0) +++ branches/BIGDATA_RELEASE_1_2_0/bigdata-rdf/src/test/com/bigdata/rdf/sparql/ast/eval/property-path-734.srx 2013-09-04 00:22:35 UTC (rev 7384) @@ -0,0 +1,16 @@ +<?xml version="1.0"?> +<sparql + xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" + xmlns:xs="http://www.w3.org/2001/XMLSchema#" + xmlns="http://www.w3.org/2005/sparql-results#" > + <head> + <variable name="A"/> + </head> + <results> + <result> + <binding name="A"> + <uri>os:0</uri> + </binding> + </result> + </results> +</sparql> Added: branches/BIGDATA_RELEASE_1_2_0/bigdata-rdf/src/test/com/bigdata/rdf/sparql/ast/eval/property-path-734.ttl =================================================================== --- branches/BIGDATA_RELEASE_1_2_0/bigdata-rdf/src/test/com/bigdata/rdf/sparql/ast/eval/property-path-734.ttl (rev 0) +++ branches/BIGDATA_RELEASE_1_2_0/bigdata-rdf/src/test/com/bigdata/rdf/sparql/ast/eval/property-path-734.ttl 2013-09-04 00:22:35 UTC (rev 7384) @@ -0,0 +1,3 @@ +<os:0> <http://www.w3.org/1999/02/22-rdf-syntax-ns#type> <os:ClassA> . +<os:0> <http://www.w3.org/1999/02/22-rdf-syntax-ns#value> <os:1> . +<os:1> <http://www.w3.org/1999/02/22-rdf-syntax-ns#type> <os:ClassB> . \ No newline at end of file This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <jer...@us...> - 2013-09-04 17:00:58
|
Revision: 7386 http://bigdata.svn.sourceforge.net/bigdata/?rev=7386&view=rev Author: jeremy_carroll Date: 2013-09-04 17:00:49 +0000 (Wed, 04 Sep 2013) Log Message: ----------- more tests for trac 734 Modified Paths: -------------- branches/BIGDATA_RELEASE_1_2_0/bigdata-rdf/src/test/com/bigdata/rdf/sparql/ast/eval/TestTwoPropertyPaths734.java Added Paths: ----------- branches/BIGDATA_RELEASE_1_2_0/bigdata-rdf/src/test/com/bigdata/rdf/sparql/ast/eval/property-path-734-B-both.rq branches/BIGDATA_RELEASE_1_2_0/bigdata-rdf/src/test/com/bigdata/rdf/sparql/ast/eval/property-path-734-B-first.rq branches/BIGDATA_RELEASE_1_2_0/bigdata-rdf/src/test/com/bigdata/rdf/sparql/ast/eval/property-path-734-B-none.rq branches/BIGDATA_RELEASE_1_2_0/bigdata-rdf/src/test/com/bigdata/rdf/sparql/ast/eval/property-path-734-B-second.rq branches/BIGDATA_RELEASE_1_2_0/bigdata-rdf/src/test/com/bigdata/rdf/sparql/ast/eval/property-path-734-B-workaround2.rq branches/BIGDATA_RELEASE_1_2_0/bigdata-rdf/src/test/com/bigdata/rdf/sparql/ast/eval/property-path-734-B-workaround3.rq branches/BIGDATA_RELEASE_1_2_0/bigdata-rdf/src/test/com/bigdata/rdf/sparql/ast/eval/property-path-734-B-workaround4.rq branches/BIGDATA_RELEASE_1_2_0/bigdata-rdf/src/test/com/bigdata/rdf/sparql/ast/eval/property-path-734-B.srx branches/BIGDATA_RELEASE_1_2_0/bigdata-rdf/src/test/com/bigdata/rdf/sparql/ast/eval/property-path-734-B.ttl Modified: branches/BIGDATA_RELEASE_1_2_0/bigdata-rdf/src/test/com/bigdata/rdf/sparql/ast/eval/TestTwoPropertyPaths734.java =================================================================== --- branches/BIGDATA_RELEASE_1_2_0/bigdata-rdf/src/test/com/bigdata/rdf/sparql/ast/eval/TestTwoPropertyPaths734.java 2013-09-04 00:26:25 UTC (rev 7385) +++ branches/BIGDATA_RELEASE_1_2_0/bigdata-rdf/src/test/com/bigdata/rdf/sparql/ast/eval/TestTwoPropertyPaths734.java 2013-09-04 17:00:49 UTC (rev 7386) @@ -35,6 +35,40 @@ rdf:value ?B . ?B rdf:type / rdfs:subClassOf * <os:ClassB> . } + +There is a work-around which is to replace a * with a UNION of a zero and a + + + + { + { ?B rdf:type <os:ClassB> } + UNION + { ?B rdf:type / rdfs:subClassOf + <os:ClassB> + } + } + +In property-path-734-B-none.rq, this is taken as the following variant: + + { + { ?A rdf:type / rdfs:subClassOf ? <os:ClassA> } + UNION + { ?A rdf:type / rdfs:subClassOf / rdfs:subClassOf + <os:ClassA> + } + } + +and in property-path-734-B-workaround2.rq it is taken to (the broken): + + + ?A rdf:type / ( rdfs:subClassOf ? | ( rdfs:subClassOf + / rdfs:subClassOf ) ) + <os:ClassA> . + + +and in property-path-734-B-workaround3.rq it is taken to (the working): + + + ?A ( ( rdf:type / rdfs:subClassOf ? ) | ( rdf:type / rdfs:subClassOf + / rdfs:subClassOf ) ) + <os:ClassA> . + + */ public class TestTwoPropertyPaths734 extends AbstractDataDrivenSPARQLTestCase { @@ -54,13 +88,22 @@ private void property_path_test(String name) throws Exception { new TestHelper( - "property-path-734-" + name, // testURI, - "property-path-734-" + name + ".rq",// queryFileURL - "property-path-734.ttl",// dataFileURL - "property-path-734.srx" // resultFileURL, + "property-path-734-" + name, // testURI, + "property-path-734-" + name + ".rq", // queryFileURL + "property-path-734.ttl", // dataFileURL + "property-path-734.srx" // resultFileURL, ).runTest(); } + private void property_path_using_workaround_test(String name) throws Exception { + + new TestHelper( + "property-path-734-B-" + name, // testURI, + "property-path-734-B-" + name + ".rq", // queryFileURL + "property-path-734-B.ttl", // dataFileURL + "property-path-734-B.srx" // resultFileURL, + ).runTest(); + } public void test_no_property_paths() throws Exception { property_path_test("none"); } @@ -73,4 +116,25 @@ public void test_both_property_paths() throws Exception { property_path_test("both"); } + public void test_no_using_workaround_property_paths() throws Exception { + property_path_using_workaround_test("none"); + } + public void test_first_using_workaround_property_path() throws Exception { + property_path_using_workaround_test("first"); + } + public void test_second_using_workaround_property_path() throws Exception { + property_path_using_workaround_test("second"); + } + public void test_both_using_workaround_property_paths() throws Exception { + property_path_using_workaround_test("both"); + } + public void test_both_using_workaround2_property_paths() throws Exception { + property_path_using_workaround_test("workaround2"); + } + public void test_both_using_workaround3_property_paths() throws Exception { + property_path_using_workaround_test("workaround3"); + } + public void test_both_using_workaround4_property_paths() throws Exception { + property_path_using_workaround_test("workaround4"); + } } Added: branches/BIGDATA_RELEASE_1_2_0/bigdata-rdf/src/test/com/bigdata/rdf/sparql/ast/eval/property-path-734-B-both.rq =================================================================== --- branches/BIGDATA_RELEASE_1_2_0/bigdata-rdf/src/test/com/bigdata/rdf/sparql/ast/eval/property-path-734-B-both.rq (rev 0) +++ branches/BIGDATA_RELEASE_1_2_0/bigdata-rdf/src/test/com/bigdata/rdf/sparql/ast/eval/property-path-734-B-both.rq 2013-09-04 17:00:49 UTC (rev 7386) @@ -0,0 +1,12 @@ + +prefix rdf: <http://www.w3.org/1999/02/22-rdf-syntax-ns#> +prefix rdfs: <http://www.w3.org/2000/01/rdf-schema#> + +SELECT ?A ?B +WHERE { + ?A rdf:type / rdfs:subClassOf * + <os:ClassA> ; + rdf:value ?B . + ?B rdf:type / rdfs:subClassOf * + <os:ClassB> +} Added: branches/BIGDATA_RELEASE_1_2_0/bigdata-rdf/src/test/com/bigdata/rdf/sparql/ast/eval/property-path-734-B-first.rq =================================================================== --- branches/BIGDATA_RELEASE_1_2_0/bigdata-rdf/src/test/com/bigdata/rdf/sparql/ast/eval/property-path-734-B-first.rq (rev 0) +++ branches/BIGDATA_RELEASE_1_2_0/bigdata-rdf/src/test/com/bigdata/rdf/sparql/ast/eval/property-path-734-B-first.rq 2013-09-04 17:00:49 UTC (rev 7386) @@ -0,0 +1,16 @@ + +prefix rdf: <http://www.w3.org/1999/02/22-rdf-syntax-ns#> +prefix rdfs: <http://www.w3.org/2000/01/rdf-schema#> + +SELECT ?A ?B +WHERE { + ?A rdf:type / rdfs:subClassOf * + <os:ClassA> ; + rdf:value ?B . + { + { ?B rdf:type <os:ClassB> } + UNION + { ?B rdf:type / rdfs:subClassOf + <os:ClassB> + } + } +} Added: branches/BIGDATA_RELEASE_1_2_0/bigdata-rdf/src/test/com/bigdata/rdf/sparql/ast/eval/property-path-734-B-none.rq =================================================================== --- branches/BIGDATA_RELEASE_1_2_0/bigdata-rdf/src/test/com/bigdata/rdf/sparql/ast/eval/property-path-734-B-none.rq (rev 0) +++ branches/BIGDATA_RELEASE_1_2_0/bigdata-rdf/src/test/com/bigdata/rdf/sparql/ast/eval/property-path-734-B-none.rq 2013-09-04 17:00:49 UTC (rev 7386) @@ -0,0 +1,20 @@ + +prefix rdf: <http://www.w3.org/1999/02/22-rdf-syntax-ns#> +prefix rdfs: <http://www.w3.org/2000/01/rdf-schema#> + +SELECT ?A ?B +WHERE { + { + { ?A rdf:type / rdfs:subClassOf ? <os:ClassA> } + UNION + { ?A rdf:type / rdfs:subClassOf / rdfs:subClassOf + <os:ClassA> + } + } + ?A rdf:value ?B . + { + { ?B rdf:type / rdfs:subClassOf ? <os:ClassB> } + UNION + { ?B rdf:type / rdfs:subClassOf / rdfs:subClassOf + <os:ClassB> + } + } +} Added: branches/BIGDATA_RELEASE_1_2_0/bigdata-rdf/src/test/com/bigdata/rdf/sparql/ast/eval/property-path-734-B-second.rq =================================================================== --- branches/BIGDATA_RELEASE_1_2_0/bigdata-rdf/src/test/com/bigdata/rdf/sparql/ast/eval/property-path-734-B-second.rq (rev 0) +++ branches/BIGDATA_RELEASE_1_2_0/bigdata-rdf/src/test/com/bigdata/rdf/sparql/ast/eval/property-path-734-B-second.rq 2013-09-04 17:00:49 UTC (rev 7386) @@ -0,0 +1,16 @@ + +prefix rdf: <http://www.w3.org/1999/02/22-rdf-syntax-ns#> +prefix rdfs: <http://www.w3.org/2000/01/rdf-schema#> + +SELECT ?A ?B +WHERE { + { + { ?A rdf:type <os:ClassA> } + UNION + { ?A rdf:type / rdfs:subClassOf + <os:ClassA> + } + } + ?A rdf:value ?B . + ?B rdf:type / rdfs:subClassOf * + <os:ClassB> +} Added: branches/BIGDATA_RELEASE_1_2_0/bigdata-rdf/src/test/com/bigdata/rdf/sparql/ast/eval/property-path-734-B-workaround2.rq =================================================================== --- branches/BIGDATA_RELEASE_1_2_0/bigdata-rdf/src/test/com/bigdata/rdf/sparql/ast/eval/property-path-734-B-workaround2.rq (rev 0) +++ branches/BIGDATA_RELEASE_1_2_0/bigdata-rdf/src/test/com/bigdata/rdf/sparql/ast/eval/property-path-734-B-workaround2.rq 2013-09-04 17:00:49 UTC (rev 7386) @@ -0,0 +1,12 @@ + +prefix rdf: <http://www.w3.org/1999/02/22-rdf-syntax-ns#> +prefix rdfs: <http://www.w3.org/2000/01/rdf-schema#> + +SELECT ?A ?B +WHERE { + ?A rdf:type / ( rdfs:subClassOf ? | ( rdfs:subClassOf + / rdfs:subClassOf ) ) + <os:ClassA> . + ?A rdf:value ?B . + ?B rdf:type / ( rdfs:subClassOf ? | ( rdfs:subClassOf + / rdfs:subClassOf ) ) + <os:ClassB> +} Added: branches/BIGDATA_RELEASE_1_2_0/bigdata-rdf/src/test/com/bigdata/rdf/sparql/ast/eval/property-path-734-B-workaround3.rq =================================================================== --- branches/BIGDATA_RELEASE_1_2_0/bigdata-rdf/src/test/com/bigdata/rdf/sparql/ast/eval/property-path-734-B-workaround3.rq (rev 0) +++ branches/BIGDATA_RELEASE_1_2_0/bigdata-rdf/src/test/com/bigdata/rdf/sparql/ast/eval/property-path-734-B-workaround3.rq 2013-09-04 17:00:49 UTC (rev 7386) @@ -0,0 +1,12 @@ + +prefix rdf: <http://www.w3.org/1999/02/22-rdf-syntax-ns#> +prefix rdfs: <http://www.w3.org/2000/01/rdf-schema#> + +SELECT ?A ?B +WHERE { + ?A ( ( rdf:type / rdfs:subClassOf ? ) | ( rdf:type / rdfs:subClassOf + / rdfs:subClassOf ) ) + <os:ClassA> . + ?A rdf:value ?B . + ?B ( ( rdf:type / rdfs:subClassOf ? ) | ( rdf:type / rdfs:subClassOf + / rdfs:subClassOf ) ) + <os:ClassB> +} Added: branches/BIGDATA_RELEASE_1_2_0/bigdata-rdf/src/test/com/bigdata/rdf/sparql/ast/eval/property-path-734-B-workaround4.rq =================================================================== --- branches/BIGDATA_RELEASE_1_2_0/bigdata-rdf/src/test/com/bigdata/rdf/sparql/ast/eval/property-path-734-B-workaround4.rq (rev 0) +++ branches/BIGDATA_RELEASE_1_2_0/bigdata-rdf/src/test/com/bigdata/rdf/sparql/ast/eval/property-path-734-B-workaround4.rq 2013-09-04 17:00:49 UTC (rev 7386) @@ -0,0 +1,12 @@ + +prefix rdf: <http://www.w3.org/1999/02/22-rdf-syntax-ns#> +prefix rdfs: <http://www.w3.org/2000/01/rdf-schema#> + +SELECT ?A ?B +WHERE { + ?A rdf:type / ( ( rdfs:noSuchProperty ? / rdfs:subClassOf ? ) | ( rdfs:noSuchProperty ? / rdfs:subClassOf / rdfs:subClassOf + ) ) + <os:ClassA> . + ?A rdf:value ?B . + ?B rdf:type / ( ( rdfs:noSuchProperty ? / rdfs:subClassOf ? ) | ( rdfs:noSuchProperty ? / rdfs:subClassOf / rdfs:subClassOf + ) ) + <os:ClassB> +} Added: branches/BIGDATA_RELEASE_1_2_0/bigdata-rdf/src/test/com/bigdata/rdf/sparql/ast/eval/property-path-734-B.srx =================================================================== --- branches/BIGDATA_RELEASE_1_2_0/bigdata-rdf/src/test/com/bigdata/rdf/sparql/ast/eval/property-path-734-B.srx (rev 0) +++ branches/BIGDATA_RELEASE_1_2_0/bigdata-rdf/src/test/com/bigdata/rdf/sparql/ast/eval/property-path-734-B.srx 2013-09-04 17:00:49 UTC (rev 7386) @@ -0,0 +1,88 @@ +<?xml version="1.0"?> +<sparql + xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" + xmlns:xs="http://www.w3.org/2001/XMLSchema#" + xmlns="http://www.w3.org/2005/sparql-results#" > + <head> + <variable name="A"/> + <variable name="B"/> + </head> + <results> + <result> + <binding name="A"> + <uri>os:0</uri> + </binding> + <binding name="B"> + <uri>os:1</uri> + </binding> + </result> + <result> + <binding name="A"> + <uri>os:0</uri> + </binding> + <binding name="B"> + <uri>os:1a</uri> + </binding> + </result> + <result> + <binding name="A"> + <uri>os:0</uri> + </binding> + <binding name="B"> + <uri>os:1b</uri> + </binding> + </result> + + + <result> + <binding name="A"> + <uri>os:0a</uri> + </binding> + <binding name="B"> + <uri>os:1</uri> + </binding> + </result> + <result> + <binding name="A"> + <uri>os:0a</uri> + </binding> + <binding name="B"> + <uri>os:1a</uri> + </binding> + </result> + <result> + <binding name="A"> + <uri>os:0a</uri> + </binding> + <binding name="B"> + <uri>os:1b</uri> + </binding> + </result> + + + <result> + <binding name="A"> + <uri>os:0b</uri> + </binding> + <binding name="B"> + <uri>os:1</uri> + </binding> + </result> + <result> + <binding name="A"> + <uri>os:0b</uri> + </binding> + <binding name="B"> + <uri>os:1a</uri> + </binding> + </result> + <result> + <binding name="A"> + <uri>os:0b</uri> + </binding> + <binding name="B"> + <uri>os:1b</uri> + </binding> + </result> + </results> +</sparql> Added: branches/BIGDATA_RELEASE_1_2_0/bigdata-rdf/src/test/com/bigdata/rdf/sparql/ast/eval/property-path-734-B.ttl =================================================================== --- branches/BIGDATA_RELEASE_1_2_0/bigdata-rdf/src/test/com/bigdata/rdf/sparql/ast/eval/property-path-734-B.ttl (rev 0) +++ branches/BIGDATA_RELEASE_1_2_0/bigdata-rdf/src/test/com/bigdata/rdf/sparql/ast/eval/property-path-734-B.ttl 2013-09-04 17:00:49 UTC (rev 7386) @@ -0,0 +1,24 @@ +@prefix rdf: <http://www.w3.org/1999/02/22-rdf-syntax-ns#> . +@prefix rdfs: <http://www.w3.org/2000/01/rdf-schema#> . + +<os:0> rdf:type <os:ClassA> . +<os:0> rdf:value <os:1> . +<os:0> rdf:value <os:1a> . +<os:0> rdf:value <os:1b> . +<os:1> rdf:type <os:ClassB> . + +<os:0a> rdf:type <os:ClassAa> . +<os:ClassAa> rdfs:subClassOf <os:ClassA> . +<os:0a> rdf:value <os:1> . +<os:0a> rdf:value <os:1a> . +<os:0a> rdf:value <os:1b> . +<os:1a> rdf:type <os:ClassBa> . +<os:ClassBa> rdfs:subClassOf <os:ClassB> . + +<os:0b> rdf:type <os:ClassAb> . +<os:ClassAb> rdfs:subClassOf <os:ClassAa> . +<os:0b> rdf:value <os:1> . +<os:0b> rdf:value <os:1a> . +<os:0b> rdf:value <os:1b> . +<os:1b> rdf:type <os:ClassBb> . +<os:ClassBb> rdfs:subClassOf <os:ClassBa> . \ No newline at end of file This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |