|
From: <jer...@us...> - 2013-09-04 19:56:50
|
Revision: 7388
http://bigdata.svn.sourceforge.net/bigdata/?rev=7388&view=rev
Author: jeremy_carroll
Date: 2013-09-04 19:56:42 +0000 (Wed, 04 Sep 2013)
Log Message:
-----------
various tests for trac 734
e.g.
SELECT ?A ?B
WHERE {
?A rdf:type / rdfs:subClassOf * <os:ClassA> ;
rdf:value ?B .
?B rdf:type / rdfs:subClassOf * <os:ClassB>
}
and
SELECT (<os:0> as ?A)
WHERE {
<eg:a> <eg:b> ? <eg:a>
}
Added Paths:
-----------
branches/BIGDATA_RELEASE_1_3_0/bigdata-rdf/src/test/com/bigdata/rdf/sparql/ast/eval/TestTwoPropertyPaths734.java
branches/BIGDATA_RELEASE_1_3_0/bigdata-rdf/src/test/com/bigdata/rdf/sparql/ast/eval/property-path-734-B-both.rq
branches/BIGDATA_RELEASE_1_3_0/bigdata-rdf/src/test/com/bigdata/rdf/sparql/ast/eval/property-path-734-B-first.rq
branches/BIGDATA_RELEASE_1_3_0/bigdata-rdf/src/test/com/bigdata/rdf/sparql/ast/eval/property-path-734-B-none.rq
branches/BIGDATA_RELEASE_1_3_0/bigdata-rdf/src/test/com/bigdata/rdf/sparql/ast/eval/property-path-734-B-second.rq
branches/BIGDATA_RELEASE_1_3_0/bigdata-rdf/src/test/com/bigdata/rdf/sparql/ast/eval/property-path-734-B-workaround2.rq
branches/BIGDATA_RELEASE_1_3_0/bigdata-rdf/src/test/com/bigdata/rdf/sparql/ast/eval/property-path-734-B-workaround3.rq
branches/BIGDATA_RELEASE_1_3_0/bigdata-rdf/src/test/com/bigdata/rdf/sparql/ast/eval/property-path-734-B-workaround4.rq
branches/BIGDATA_RELEASE_1_3_0/bigdata-rdf/src/test/com/bigdata/rdf/sparql/ast/eval/property-path-734-B.srx
branches/BIGDATA_RELEASE_1_3_0/bigdata-rdf/src/test/com/bigdata/rdf/sparql/ast/eval/property-path-734-B.ttl
branches/BIGDATA_RELEASE_1_3_0/bigdata-rdf/src/test/com/bigdata/rdf/sparql/ast/eval/property-path-734-C-opt.rq
branches/BIGDATA_RELEASE_1_3_0/bigdata-rdf/src/test/com/bigdata/rdf/sparql/ast/eval/property-path-734-C-plus.rq
branches/BIGDATA_RELEASE_1_3_0/bigdata-rdf/src/test/com/bigdata/rdf/sparql/ast/eval/property-path-734-C-plus.srx
branches/BIGDATA_RELEASE_1_3_0/bigdata-rdf/src/test/com/bigdata/rdf/sparql/ast/eval/property-path-734-C-star.rq
branches/BIGDATA_RELEASE_1_3_0/bigdata-rdf/src/test/com/bigdata/rdf/sparql/ast/eval/property-path-734-C.srx
branches/BIGDATA_RELEASE_1_3_0/bigdata-rdf/src/test/com/bigdata/rdf/sparql/ast/eval/property-path-734-C.ttl
branches/BIGDATA_RELEASE_1_3_0/bigdata-rdf/src/test/com/bigdata/rdf/sparql/ast/eval/property-path-734-both.rq
branches/BIGDATA_RELEASE_1_3_0/bigdata-rdf/src/test/com/bigdata/rdf/sparql/ast/eval/property-path-734-first.rq
branches/BIGDATA_RELEASE_1_3_0/bigdata-rdf/src/test/com/bigdata/rdf/sparql/ast/eval/property-path-734-none.rq
branches/BIGDATA_RELEASE_1_3_0/bigdata-rdf/src/test/com/bigdata/rdf/sparql/ast/eval/property-path-734-second.rq
branches/BIGDATA_RELEASE_1_3_0/bigdata-rdf/src/test/com/bigdata/rdf/sparql/ast/eval/property-path-734.srx
branches/BIGDATA_RELEASE_1_3_0/bigdata-rdf/src/test/com/bigdata/rdf/sparql/ast/eval/property-path-734.ttl
Added: branches/BIGDATA_RELEASE_1_3_0/bigdata-rdf/src/test/com/bigdata/rdf/sparql/ast/eval/TestTwoPropertyPaths734.java
===================================================================
--- branches/BIGDATA_RELEASE_1_3_0/bigdata-rdf/src/test/com/bigdata/rdf/sparql/ast/eval/TestTwoPropertyPaths734.java (rev 0)
+++ branches/BIGDATA_RELEASE_1_3_0/bigdata-rdf/src/test/com/bigdata/rdf/sparql/ast/eval/TestTwoPropertyPaths734.java 2013-09-04 19:56:42 UTC (rev 7388)
@@ -0,0 +1,169 @@
+/**
+
+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 ?A
+WHERE {
+ ?A rdf:type / rdfs:subClassOf * <os:ClassA> ;
+ 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 {
+
+ /**
+ *
+ */
+ 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();
+ }
+
+ 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");
+ }
+ 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");
+ }
+ 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");
+ }
+
+
+ public void test_minimal_star_734() throws Exception {
+
+ new TestHelper(
+ "property-path-734-C", // testURI,
+ "property-path-734-C-star.rq", // queryFileURL
+ "property-path-734-C.ttl", // dataFileURL
+ "property-path-734-C.srx" // resultFileURL,
+ ).runTest();
+ }
+ public void test_minimal_opt_734() throws Exception {
+
+ new TestHelper(
+ "property-path-734-C", // testURI,
+ "property-path-734-C-opt.rq", // queryFileURL
+ "property-path-734-C.ttl", // dataFileURL
+ "property-path-734-C.srx" // resultFileURL,
+ ).runTest();
+ }
+ public void test_minimal_plus_734() throws Exception {
+
+ new TestHelper(
+ "property-path-734-C", // testURI,
+ "property-path-734-C-plus.rq", // queryFileURL
+ "property-path-734-C.ttl", // dataFileURL
+ "property-path-734-C-plus.srx" // resultFileURL,
+ ).runTest();
+ }
+}
Added: branches/BIGDATA_RELEASE_1_3_0/bigdata-rdf/src/test/com/bigdata/rdf/sparql/ast/eval/property-path-734-B-both.rq
===================================================================
--- branches/BIGDATA_RELEASE_1_3_0/bigdata-rdf/src/test/com/bigdata/rdf/sparql/ast/eval/property-path-734-B-both.rq (rev 0)
+++ branches/BIGDATA_RELEASE_1_3_0/bigdata-rdf/src/test/com/bigdata/rdf/sparql/ast/eval/property-path-734-B-both.rq 2013-09-04 19:56:42 UTC (rev 7388)
@@ -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_3_0/bigdata-rdf/src/test/com/bigdata/rdf/sparql/ast/eval/property-path-734-B-first.rq
===================================================================
--- branches/BIGDATA_RELEASE_1_3_0/bigdata-rdf/src/test/com/bigdata/rdf/sparql/ast/eval/property-path-734-B-first.rq (rev 0)
+++ branches/BIGDATA_RELEASE_1_3_0/bigdata-rdf/src/test/com/bigdata/rdf/sparql/ast/eval/property-path-734-B-first.rq 2013-09-04 19:56:42 UTC (rev 7388)
@@ -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_3_0/bigdata-rdf/src/test/com/bigdata/rdf/sparql/ast/eval/property-path-734-B-none.rq
===================================================================
--- branches/BIGDATA_RELEASE_1_3_0/bigdata-rdf/src/test/com/bigdata/rdf/sparql/ast/eval/property-path-734-B-none.rq (rev 0)
+++ branches/BIGDATA_RELEASE_1_3_0/bigdata-rdf/src/test/com/bigdata/rdf/sparql/ast/eval/property-path-734-B-none.rq 2013-09-04 19:56:42 UTC (rev 7388)
@@ -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_3_0/bigdata-rdf/src/test/com/bigdata/rdf/sparql/ast/eval/property-path-734-B-second.rq
===================================================================
--- branches/BIGDATA_RELEASE_1_3_0/bigdata-rdf/src/test/com/bigdata/rdf/sparql/ast/eval/property-path-734-B-second.rq (rev 0)
+++ branches/BIGDATA_RELEASE_1_3_0/bigdata-rdf/src/test/com/bigdata/rdf/sparql/ast/eval/property-path-734-B-second.rq 2013-09-04 19:56:42 UTC (rev 7388)
@@ -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_3_0/bigdata-rdf/src/test/com/bigdata/rdf/sparql/ast/eval/property-path-734-B-workaround2.rq
===================================================================
--- branches/BIGDATA_RELEASE_1_3_0/bigdata-rdf/src/test/com/bigdata/rdf/sparql/ast/eval/property-path-734-B-workaround2.rq (rev 0)
+++ branches/BIGDATA_RELEASE_1_3_0/bigdata-rdf/src/test/com/bigdata/rdf/sparql/ast/eval/property-path-734-B-workaround2.rq 2013-09-04 19:56:42 UTC (rev 7388)
@@ -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_3_0/bigdata-rdf/src/test/com/bigdata/rdf/sparql/ast/eval/property-path-734-B-workaround3.rq
===================================================================
--- branches/BIGDATA_RELEASE_1_3_0/bigdata-rdf/src/test/com/bigdata/rdf/sparql/ast/eval/property-path-734-B-workaround3.rq (rev 0)
+++ branches/BIGDATA_RELEASE_1_3_0/bigdata-rdf/src/test/com/bigdata/rdf/sparql/ast/eval/property-path-734-B-workaround3.rq 2013-09-04 19:56:42 UTC (rev 7388)
@@ -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_3_0/bigdata-rdf/src/test/com/bigdata/rdf/sparql/ast/eval/property-path-734-B-workaround4.rq
===================================================================
--- branches/BIGDATA_RELEASE_1_3_0/bigdata-rdf/src/test/com/bigdata/rdf/sparql/ast/eval/property-path-734-B-workaround4.rq (rev 0)
+++ branches/BIGDATA_RELEASE_1_3_0/bigdata-rdf/src/test/com/bigdata/rdf/sparql/ast/eval/property-path-734-B-workaround4.rq 2013-09-04 19:56:42 UTC (rev 7388)
@@ -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_3_0/bigdata-rdf/src/test/com/bigdata/rdf/sparql/ast/eval/property-path-734-B.srx
===================================================================
--- branches/BIGDATA_RELEASE_1_3_0/bigdata-rdf/src/test/com/bigdata/rdf/sparql/ast/eval/property-path-734-B.srx (rev 0)
+++ branches/BIGDATA_RELEASE_1_3_0/bigdata-rdf/src/test/com/bigdata/rdf/sparql/ast/eval/property-path-734-B.srx 2013-09-04 19:56:42 UTC (rev 7388)
@@ -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_3_0/bigdata-rdf/src/test/com/bigdata/rdf/sparql/ast/eval/property-path-734-B.ttl
===================================================================
--- branches/BIGDATA_RELEASE_1_3_0/bigdata-rdf/src/test/com/bigdata/rdf/sparql/ast/eval/property-path-734-B.ttl (rev 0)
+++ branches/BIGDATA_RELEASE_1_3_0/bigdata-rdf/src/test/com/bigdata/rdf/sparql/ast/eval/property-path-734-B.ttl 2013-09-04 19:56:42 UTC (rev 7388)
@@ -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
Added: branches/BIGDATA_RELEASE_1_3_0/bigdata-rdf/src/test/com/bigdata/rdf/sparql/ast/eval/property-path-734-C-opt.rq
===================================================================
--- branches/BIGDATA_RELEASE_1_3_0/bigdata-rdf/src/test/com/bigdata/rdf/sparql/ast/eval/property-path-734-C-opt.rq (rev 0)
+++ branches/BIGDATA_RELEASE_1_3_0/bigdata-rdf/src/test/com/bigdata/rdf/sparql/ast/eval/property-path-734-C-opt.rq 2013-09-04 19:56:42 UTC (rev 7388)
@@ -0,0 +1,5 @@
+
+SELECT (<os:0> as ?A)
+WHERE {
+ <eg:a> <eg:b> ? <eg:a>
+}
Added: branches/BIGDATA_RELEASE_1_3_0/bigdata-rdf/src/test/com/bigdata/rdf/sparql/ast/eval/property-path-734-C-plus.rq
===================================================================
--- branches/BIGDATA_RELEASE_1_3_0/bigdata-rdf/src/test/com/bigdata/rdf/sparql/ast/eval/property-path-734-C-plus.rq (rev 0)
+++ branches/BIGDATA_RELEASE_1_3_0/bigdata-rdf/src/test/com/bigdata/rdf/sparql/ast/eval/property-path-734-C-plus.rq 2013-09-04 19:56:42 UTC (rev 7388)
@@ -0,0 +1,5 @@
+
+SELECT (<os:0> as ?A)
+WHERE {
+ <eg:a> <eg:b> + <eg:a>
+}
Added: branches/BIGDATA_RELEASE_1_3_0/bigdata-rdf/src/test/com/bigdata/rdf/sparql/ast/eval/property-path-734-C-plus.srx
===================================================================
--- branches/BIGDATA_RELEASE_1_3_0/bigdata-rdf/src/test/com/bigdata/rdf/sparql/ast/eval/property-path-734-C-plus.srx (rev 0)
+++ branches/BIGDATA_RELEASE_1_3_0/bigdata-rdf/src/test/com/bigdata/rdf/sparql/ast/eval/property-path-734-C-plus.srx 2013-09-04 19:56:42 UTC (rev 7388)
@@ -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="A"/>
+ </head>
+ <results>
+ </results>
+</sparql>
Added: branches/BIGDATA_RELEASE_1_3_0/bigdata-rdf/src/test/com/bigdata/rdf/sparql/ast/eval/property-path-734-C-star.rq
===================================================================
--- branches/BIGDATA_RELEASE_1_3_0/bigdata-rdf/src/test/com/bigdata/rdf/sparql/ast/eval/property-path-734-C-star.rq (rev 0)
+++ branches/BIGDATA_RELEASE_1_3_0/bigdata-rdf/src/test/com/bigdata/rdf/sparql/ast/eval/property-path-734-C-star.rq 2013-09-04 19:56:42 UTC (rev 7388)
@@ -0,0 +1,5 @@
+
+SELECT (<os:0> as ?A)
+WHERE {
+ <eg:a> <eg:b> * <eg:a>
+}
Added: branches/BIGDATA_RELEASE_1_3_0/bigdata-rdf/src/test/com/bigdata/rdf/sparql/ast/eval/property-path-734-C.srx
===================================================================
--- branches/BIGDATA_RELEASE_1_3_0/bigdata-rdf/src/test/com/bigdata/rdf/sparql/ast/eval/property-path-734-C.srx (rev 0)
+++ branches/BIGDATA_RELEASE_1_3_0/bigdata-rdf/src/test/com/bigdata/rdf/sparql/ast/eval/property-path-734-C.srx 2013-09-04 19:56:42 UTC (rev 7388)
@@ -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_3_0/bigdata-rdf/src/test/com/bigdata/rdf/sparql/ast/eval/property-path-734-C.ttl
===================================================================
--- branches/BIGDATA_RELEASE_1_3_0/bigdata-rdf/src/test/com/bigdata/rdf/sparql/ast/eval/property-path-734-C.ttl (rev 0)
+++ branches/BIGDATA_RELEASE_1_3_0/bigdata-rdf/src/test/com/bigdata/rdf/sparql/ast/eval/property-path-734-C.ttl 2013-09-04 19:56:42 UTC (rev 7388)
@@ -0,0 +1 @@
+# no data
\ No newline at end of file
Added: branches/BIGDATA_RELEASE_1_3_0/bigdata-rdf/src/test/com/bigdata/rdf/sparql/ast/eval/property-path-734-both.rq
===================================================================
--- branches/BIGDATA_RELEASE_1_3_0/bigdata-rdf/src/test/com/bigdata/rdf/sparql/ast/eval/property-path-734-both.rq (rev 0)
+++ branches/BIGDATA_RELEASE_1_3_0/bigdata-rdf/src/test/com/bigdata/rdf/sparql/ast/eval/property-path-734-both.rq 2013-09-04 19:56:42 UTC (rev 7388)
@@ -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_3_0/bigdata-rdf/src/test/com/bigdata/rdf/sparql/ast/eval/property-path-734-first.rq
===================================================================
--- branches/BIGDATA_RELEASE_1_3_0/bigdata-rdf/src/test/com/bigdata/rdf/sparql/ast/eval/property-path-734-first.rq (rev 0)
+++ branches/BIGDATA_RELEASE_1_3_0/bigdata-rdf/src/test/com/bigdata/rdf/sparql/ast/eval/property-path-734-first.rq 2013-09-04 19:56:42 UTC (rev 7388)
@@ -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_3_0/bigdata-rdf/src/test/com/bigdata/rdf/sparql/ast/eval/property-path-734-none.rq
===================================================================
--- branches/BIGDATA_RELEASE_1_3_0/bigdata-rdf/src/test/com/bigdata/rdf/sparql/ast/eval/property-path-734-none.rq (rev 0)
+++ branches/BIGDATA_RELEASE_1_3_0/bigdata-rdf/src/test/com/bigdata/rdf/sparql/ast/eval/property-path-734-none.rq 2013-09-04 19:56:42 UTC (rev 7388)
@@ -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_3_0/bigdata-rdf/src/test/com/bigdata/rdf/sparql/ast/eval/property-path-734-second.rq
===================================================================
--- branches/BIGDATA_RELEASE_1_3_0/bigdata-rdf/src/test/com/bigdata/rdf/sparql/ast/eval/property-path-734-second.rq (rev 0)
+++ branches/BIGDATA_RELEASE_1_3_0/bigdata-rdf/src/test/com/bigdata/rdf/sparql/ast/eval/property-path-734-second.rq 2013-09-04 19:56:42 UTC (rev 7388)
@@ -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_3_0/bigdata-rdf/src/test/com/bigdata/rdf/sparql/ast/eval/property-path-734.srx
===================================================================
--- branches/BIGDATA_RELEASE_1_3_0/bigdata-rdf/src/test/com/bigdata/rdf/sparql/ast/eval/property-path-734.srx (rev 0)
+++ branches/BIGDATA_RELEASE_1_3_0/bigdata-rdf/src/test/com/bigdata/rdf/sparql/ast/eval/property-path-734.srx 2013-09-04 19:56:42 UTC (rev 7388)
@@ -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_3_0/bigdata-rdf/src/test/com/bigdata/rdf/sparql/ast/eval/property-path-734.ttl
===================================================================
--- branches/BIGDATA_RELEASE_1_3_0/bigdata-rdf/src/test/com/bigdata/rdf/sparql/ast/eval/property-path-734.ttl (rev 0)
+++ branches/BIGDATA_RELEASE_1_3_0/bigdata-rdf/src/test/com/bigdata/rdf/sparql/ast/eval/property-path-734.ttl 2013-09-04 19:56:42 UTC (rev 7388)
@@ -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-10-01 23:51:23
|
Revision: 7428
http://bigdata.svn.sourceforge.net/bigdata/?rev=7428&view=rev
Author: jeremy_carroll
Date: 2013-10-01 23:51:16 +0000 (Tue, 01 Oct 2013)
Log Message:
-----------
test cases for trac747 involving BOUND
Modified Paths:
--------------
branches/BIGDATA_RELEASE_1_3_0/bigdata-rdf/src/test/com/bigdata/rdf/sparql/ast/eval/TestTickets.java
Added Paths:
-----------
branches/BIGDATA_RELEASE_1_3_0/bigdata-rdf/src/test/com/bigdata/rdf/sparql/ast/eval/ticket747-bound.rq
branches/BIGDATA_RELEASE_1_3_0/bigdata-rdf/src/test/com/bigdata/rdf/sparql/ast/eval/ticket747-bound.srx
branches/BIGDATA_RELEASE_1_3_0/bigdata-rdf/src/test/com/bigdata/rdf/sparql/ast/eval/ticket747-bound.ttl
branches/BIGDATA_RELEASE_1_3_0/bigdata-rdf/src/test/com/bigdata/rdf/sparql/ast/eval/ticket747A-bound.rq
Modified: branches/BIGDATA_RELEASE_1_3_0/bigdata-rdf/src/test/com/bigdata/rdf/sparql/ast/eval/TestTickets.java
===================================================================
--- branches/BIGDATA_RELEASE_1_3_0/bigdata-rdf/src/test/com/bigdata/rdf/sparql/ast/eval/TestTickets.java 2013-10-01 22:14:36 UTC (rev 7427)
+++ branches/BIGDATA_RELEASE_1_3_0/bigdata-rdf/src/test/com/bigdata/rdf/sparql/ast/eval/TestTickets.java 2013-10-01 23:51:16 UTC (rev 7428)
@@ -64,7 +64,28 @@
new TestHelper("test_ticket_384").runTest();
}
+
+ public void test_ticket_747() throws Exception {
+
+ new TestHelper("ticket747-bound",// testURI,
+ "ticket747-bound.rq",// queryFileURL
+ "ticket747-bound.ttl",// dataFileURL
+ "ticket747-bound.srx"// resultFileURL
+ ).runTest();
+
+ }
+
+
+ public void test_ticket_747a() throws Exception {
+
+ new TestHelper("ticket747A-bound",// testURI,
+ "ticket747A-bound.rq",// queryFileURL
+ "ticket747-bound.ttl",// dataFileURL
+ "ticket747-bound.srx"// resultFileURL
+ ).runTest();
+
+ }
/**
* <pre>
* PREFIX ex: <http://example.org/>
Added: branches/BIGDATA_RELEASE_1_3_0/bigdata-rdf/src/test/com/bigdata/rdf/sparql/ast/eval/ticket747-bound.rq
===================================================================
--- branches/BIGDATA_RELEASE_1_3_0/bigdata-rdf/src/test/com/bigdata/rdf/sparql/ast/eval/ticket747-bound.rq (rev 0)
+++ branches/BIGDATA_RELEASE_1_3_0/bigdata-rdf/src/test/com/bigdata/rdf/sparql/ast/eval/ticket747-bound.rq 2013-10-01 23:51:16 UTC (rev 7428)
@@ -0,0 +1,10 @@
+SELECT *
+WHERE {
+ BIND ( "y" as $Y ) .
+ {
+ BIND ( "x" as $X )
+ FILTER( BOUND($Y)
+# && True
+ )
+ }
+}
\ No newline at end of file
Added: branches/BIGDATA_RELEASE_1_3_0/bigdata-rdf/src/test/com/bigdata/rdf/sparql/ast/eval/ticket747-bound.srx
===================================================================
--- branches/BIGDATA_RELEASE_1_3_0/bigdata-rdf/src/test/com/bigdata/rdf/sparql/ast/eval/ticket747-bound.srx (rev 0)
+++ branches/BIGDATA_RELEASE_1_3_0/bigdata-rdf/src/test/com/bigdata/rdf/sparql/ast/eval/ticket747-bound.srx 2013-10-01 23:51:16 UTC (rev 7428)
@@ -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="X"/>
+ <variable name="Y"/>
+ </head>
+ <results>
+ <result>
+ <binding name="X">
+ <literal>x</literal>
+ </binding>
+ <binding name="Y">
+ <literal>y</literal>
+ </binding>
+ </result>
+ </results>
+</sparql>
Added: branches/BIGDATA_RELEASE_1_3_0/bigdata-rdf/src/test/com/bigdata/rdf/sparql/ast/eval/ticket747-bound.ttl
===================================================================
--- branches/BIGDATA_RELEASE_1_3_0/bigdata-rdf/src/test/com/bigdata/rdf/sparql/ast/eval/ticket747-bound.ttl (rev 0)
+++ branches/BIGDATA_RELEASE_1_3_0/bigdata-rdf/src/test/com/bigdata/rdf/sparql/ast/eval/ticket747-bound.ttl 2013-10-01 23:51:16 UTC (rev 7428)
@@ -0,0 +1 @@
+
Added: branches/BIGDATA_RELEASE_1_3_0/bigdata-rdf/src/test/com/bigdata/rdf/sparql/ast/eval/ticket747A-bound.rq
===================================================================
--- branches/BIGDATA_RELEASE_1_3_0/bigdata-rdf/src/test/com/bigdata/rdf/sparql/ast/eval/ticket747A-bound.rq (rev 0)
+++ branches/BIGDATA_RELEASE_1_3_0/bigdata-rdf/src/test/com/bigdata/rdf/sparql/ast/eval/ticket747A-bound.rq 2013-10-01 23:51:16 UTC (rev 7428)
@@ -0,0 +1,16 @@
+# The query in ticket747 can be addressed by reordering the optimizers
+# However, it is a 'false' fix, and this more difficult variant requires fixing
+# some other faulty logic
+
+SELECT *
+WHERE {
+ { BIND ( "y" as $Y )
+ }
+ UNION {
+ FILTER (false)
+ }
+ BIND ( "x" as $X )
+ FILTER( BOUND($Y)
+# && True
+ )
+}
\ 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-10-02 01:44:24
|
Revision: 7430
http://bigdata.svn.sourceforge.net/bigdata/?rev=7430&view=rev
Author: jeremy_carroll
Date: 2013-10-02 01:44:18 +0000 (Wed, 02 Oct 2013)
Log Message:
-----------
yet another variant of this test to block incorrect fixes
Modified Paths:
--------------
branches/BIGDATA_RELEASE_1_3_0/bigdata-rdf/src/test/com/bigdata/rdf/sparql/ast/eval/TestTickets.java
branches/BIGDATA_RELEASE_1_3_0/bigdata-rdf/src/test/com/bigdata/rdf/sparql/ast/eval/ticket747-bound.rq
branches/BIGDATA_RELEASE_1_3_0/bigdata-rdf/src/test/com/bigdata/rdf/sparql/ast/eval/ticket747A-bound.rq
Added Paths:
-----------
branches/BIGDATA_RELEASE_1_3_0/bigdata-rdf/src/test/com/bigdata/rdf/sparql/ast/eval/ticket747B-bound.rq
Modified: branches/BIGDATA_RELEASE_1_3_0/bigdata-rdf/src/test/com/bigdata/rdf/sparql/ast/eval/TestTickets.java
===================================================================
--- branches/BIGDATA_RELEASE_1_3_0/bigdata-rdf/src/test/com/bigdata/rdf/sparql/ast/eval/TestTickets.java 2013-10-02 01:43:58 UTC (rev 7429)
+++ branches/BIGDATA_RELEASE_1_3_0/bigdata-rdf/src/test/com/bigdata/rdf/sparql/ast/eval/TestTickets.java 2013-10-02 01:44:18 UTC (rev 7430)
@@ -86,6 +86,16 @@
).runTest();
}
+
+ public void test_ticket_747b() throws Exception {
+
+ new TestHelper("ticket747B-bound",// testURI,
+ "ticket747B-bound.rq",// queryFileURL
+ "ticket747-bound.ttl",// dataFileURL
+ "ticket747-bound.srx"// resultFileURL
+ ).runTest();
+
+ }
/**
* <pre>
* PREFIX ex: <http://example.org/>
Modified: branches/BIGDATA_RELEASE_1_3_0/bigdata-rdf/src/test/com/bigdata/rdf/sparql/ast/eval/ticket747-bound.rq
===================================================================
--- branches/BIGDATA_RELEASE_1_3_0/bigdata-rdf/src/test/com/bigdata/rdf/sparql/ast/eval/ticket747-bound.rq 2013-10-02 01:43:58 UTC (rev 7429)
+++ branches/BIGDATA_RELEASE_1_3_0/bigdata-rdf/src/test/com/bigdata/rdf/sparql/ast/eval/ticket747-bound.rq 2013-10-02 01:44:18 UTC (rev 7430)
@@ -7,4 +7,4 @@
# && True
)
}
-}
\ No newline at end of file
+}
Modified: branches/BIGDATA_RELEASE_1_3_0/bigdata-rdf/src/test/com/bigdata/rdf/sparql/ast/eval/ticket747A-bound.rq
===================================================================
--- branches/BIGDATA_RELEASE_1_3_0/bigdata-rdf/src/test/com/bigdata/rdf/sparql/ast/eval/ticket747A-bound.rq 2013-10-02 01:43:58 UTC (rev 7429)
+++ branches/BIGDATA_RELEASE_1_3_0/bigdata-rdf/src/test/com/bigdata/rdf/sparql/ast/eval/ticket747A-bound.rq 2013-10-02 01:44:18 UTC (rev 7430)
@@ -13,4 +13,4 @@
FILTER( BOUND($Y)
# && True
)
-}
\ No newline at end of file
+}
Added: branches/BIGDATA_RELEASE_1_3_0/bigdata-rdf/src/test/com/bigdata/rdf/sparql/ast/eval/ticket747B-bound.rq
===================================================================
--- branches/BIGDATA_RELEASE_1_3_0/bigdata-rdf/src/test/com/bigdata/rdf/sparql/ast/eval/ticket747B-bound.rq (rev 0)
+++ branches/BIGDATA_RELEASE_1_3_0/bigdata-rdf/src/test/com/bigdata/rdf/sparql/ast/eval/ticket747B-bound.rq 2013-10-02 01:44:18 UTC (rev 7430)
@@ -0,0 +1,19 @@
+SELECT *
+WHERE {
+ { BIND ( "y" as $Y ) .
+ }
+ UNION
+ {
+ FILTER (false)
+ }
+ {
+ BIND ( "x" as $X )
+ FILTER( BOUND($Y)
+# && True
+ )
+ }
+ UNION
+ {
+ FILTER (false)
+ }
+}
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|
|
From: <jer...@us...> - 2013-10-04 21:49:36
|
Revision: 7434
http://bigdata.svn.sourceforge.net/bigdata/?rev=7434&view=rev
Author: jeremy_carroll
Date: 2013-10-04 21:49:28 +0000 (Fri, 04 Oct 2013)
Log Message:
-----------
New test case showing factor of 6 performance issue in BlockingBuffer
Added Paths:
-----------
branches/BIGDATA_RELEASE_1_3_0/bigdata-rdf/src/test/com/bigdata/rdf/sparql/ast/eval/TestBlockingBufferPerformance740.java
branches/BIGDATA_RELEASE_1_3_0/bigdata-rdf/src/test/com/bigdata/rdf/sparql/ast/eval/blocking-buffer-740.rdf
branches/BIGDATA_RELEASE_1_3_0/bigdata-rdf/src/test/com/bigdata/rdf/sparql/ast/eval/blocking-buffer-740.rq
branches/BIGDATA_RELEASE_1_3_0/bigdata-rdf/src/test/com/bigdata/rdf/sparql/ast/eval/blocking-buffer-740.srx
Added: branches/BIGDATA_RELEASE_1_3_0/bigdata-rdf/src/test/com/bigdata/rdf/sparql/ast/eval/TestBlockingBufferPerformance740.java
===================================================================
--- branches/BIGDATA_RELEASE_1_3_0/bigdata-rdf/src/test/com/bigdata/rdf/sparql/ast/eval/TestBlockingBufferPerformance740.java (rev 0)
+++ branches/BIGDATA_RELEASE_1_3_0/bigdata-rdf/src/test/com/bigdata/rdf/sparql/ast/eval/TestBlockingBufferPerformance740.java 2013-10-04 21:49:28 UTC (rev 7434)
@@ -0,0 +1,66 @@
+package com.bigdata.rdf.sparql.ast.eval;
+
+import java.lang.management.ManagementFactory;
+import java.lang.management.ThreadMXBean;
+
+import junit.framework.TestCase;
+
+import org.openrdf.query.algebra.evaluation.QueryBindingSet;
+
+import com.bigdata.rdf.sparql.ast.ASTContainer;
+import com.bigdata.rdf.sparql.ast.eval.AbstractDataDrivenSPARQLTestCase.TestHelper;
+
+public class TestBlockingBufferPerformance740 extends AbstractDataDrivenSPARQLTestCase {
+
+ public TestBlockingBufferPerformance740() {
+ }
+
+ public TestBlockingBufferPerformance740(String name) {
+ super(name);
+ }
+
+ public void test_ticket_747a() throws Exception {
+
+ new TestHelper("blocking-buffer-740",// testURI,
+ "blocking-buffer-740.rq",// queryFileURL
+ "blocking-buffer-740.rdf",// dataFileURL
+ "blocking-buffer-740.srx"// resultFileURL
+ ){
+ @Override
+
+ public ASTContainer runTest() throws Exception {
+ ThreadMXBean mgmt = ManagementFactory.getThreadMXBean();
+ // mgmt.getThreadCPUTime() ;
+ long totalThreadTime = sumForAllThreads(mgmt);
+ long milli = System.currentTimeMillis();
+ try {
+ return super.runTest();
+ }
+ finally {
+ //totalThreadTime -= sumForAllThreads(mgmt);
+ long cpuTime = sumForAllThreads(mgmt) - totalThreadTime;
+ long clockTime = System.currentTimeMillis() - milli;
+ cpuTime /= 1000000;
+ //System.err.println(clockTime+":"+cpuTime);
+ double percentUtilization = cpuTime * 1.0 / clockTime;
+ TestCase.assertTrue("Performance was poor: "+(int)(percentUtilization*100)+"% [< 80%]",percentUtilization>0.8);
+ System.out.println("BlockingBuffer: performance was good: "+(int)(percentUtilization*100)+"%");
+ }
+ }
+
+ private long sumForAllThreads(ThreadMXBean mgmt) {
+ long rslt = 0;
+ for (long tid:mgmt.getAllThreadIds()) {
+ long t = mgmt.getThreadCpuTime(tid);
+ if (t != -1)
+ rslt += t;
+ }
+ return rslt;
+ }
+
+
+
+ }.runTest();
+
+ }
+}
Added: branches/BIGDATA_RELEASE_1_3_0/bigdata-rdf/src/test/com/bigdata/rdf/sparql/ast/eval/blocking-buffer-740.rdf
===================================================================
--- branches/BIGDATA_RELEASE_1_3_0/bigdata-rdf/src/test/com/bigdata/rdf/sparql/ast/eval/blocking-buffer-740.rdf (rev 0)
+++ branches/BIGDATA_RELEASE_1_3_0/bigdata-rdf/src/test/com/bigdata/rdf/sparql/ast/eval/blocking-buffer-740.rdf 2013-10-04 21:49:28 UTC (rev 7434)
@@ -0,0 +1,920 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<rdf:RDF
+ xmlns:owl="http://www.w3.org/2002/07/owl#"
+ xmlns:dc="http://purl.org/dc/elements/1.1/"
+ xmlns:sys="http://example.com/a0"
+ xmlns:base="http://example.com/a1"
+ xmlns:sysd="http://example.com/a2"
+ xmlns:skos="http://www.w3.org/2004/02/skos/core#"
+ xmlns:syapse="http://example.com/a3"
+ xmlns:based="http://example.com/a4"
+ xmlns:rdfs="http://www.w3.org/2000/01/rdf-schema#"
+ xmlns:s="http://example.com/a5"
+ xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#"
+ xmlns:xsd="http://www.w3.org/2001/XMLSchema#"
+ xmlns:sd="http://www.w3.org/ns/sparql-service-description#"
+ xmlns:c2="http://example.com/a6"
+ xmlns:c2d="http://example.com/a7"
+ xmlns:bigdata="http://www.bigdata.com/rdf#">
+
+<rdf:Description rdf:about="http://example.com/a8">
+ <rdfs:subClassOf rdf:resource="http://example.com/a9"/>
+</rdf:Description>
+
+<rdf:Description rdf:about="http://example.com/a10">
+ <rdfs:subClassOf rdf:resource="http://example.com/a9"/>
+</rdf:Description>
+
+<rdf:Description rdf:about="http://example.com/a11">
+ <rdfs:subClassOf rdf:resource="http://example.com/a9"/>
+</rdf:Description>
+
+<rdf:Description rdf:about="http://example.com/a9">
+ <rdfs:subClassOf rdf:resource="http://example.com/a12"/>
+</rdf:Description>
+
+<rdf:Description rdf:about="http://example.com/a13">
+ <rdfs:subClassOf rdf:resource="http://example.com/a12"/>
+</rdf:Description>
+
+<rdf:Description rdf:about="http://example.com/a14">
+ <rdfs:subClassOf rdf:resource="http://example.com/a12"/>
+</rdf:Description>
+
+<rdf:Description rdf:about="http://example.com/a15">
+ <rdfs:subClassOf rdf:resource="http://example.com/a12"/>
+</rdf:Description>
+
+<rdf:Description rdf:about="http://example.com/a16">
+ <rdfs:subClassOf rdf:resource="http://example.com/a12"/>
+</rdf:Description>
+
+<rdf:Description rdf:about="http://example.com/a17">
+ <rdfs:subClassOf rdf:resource="http://example.com/a12"/>
+</rdf:Description>
+
+<rdf:Description rdf:about="http://example.com/a18">
+ <rdfs:subClassOf rdf:resource="http://example.com/a12"/>
+</rdf:Description>
+
+<rdf:Description rdf:about="http://example.com/a19">
+ <rdf:type rdf:resource="http://example.com/a14"/>
+</rdf:Description>
+
+<rdf:Description rdf:about="http://example.com/a20">
+ <rdf:type rdf:resource="http://example.com/a14"/>
+</rdf:Description>
+
+<rdf:Description rdf:about="http://example.com/a21">
+ <rdf:type rdf:resource="http://example.com/a14"/>
+</rdf:Description>
+
+<rdf:Description rdf:about="http://example.com/a22">
+ <rdf:type rdf:resource="http://example.com/a14"/>
+</rdf:Description>
+
+<rdf:Description rdf:about="http://example.com/a23">
+ <rdf:type rdf:resource="http://example.com/a14"/>
+</rdf:Description>
+
+<rdf:Description rdf:about="http://example.com/a24">
+ <rdf:type rdf:resource="http://example.com/a14"/>
+</rdf:Description>
+
+<rdf:Description rdf:about="http://example.com/a25">
+ <rdf:type rdf:resource="http://example.com/a14"/>
+</rdf:Description>
+
+<rdf:Description rdf:about="http://example.com/a26">
+ <rdf:type rdf:resource="http://example.com/a14"/>
+</rdf:Description>
+
+<rdf:Description rdf:about="http://example.com/a27">
+ <rdf:type rdf:resource="http://example.com/a14"/>
+</rdf:Description>
+
+<rdf:Description rdf:about="http://example.com/a28">
+ <rdf:type rdf:resource="http://example.com/a14"/>
+</rdf:Description>
+
+<rdf:Description rdf:about="http://example.com/a29">
+ <rdf:type rdf:resource="http://example.com/a14"/>
+</rdf:Description>
+
+<rdf:Description rdf:about="http://example.com/a30">
+ <rdf:type rdf:resource="http://example.com/a14"/>
+</rdf:Description>
+
+<rdf:Description rdf:about="http://example.com/a31">
+ <rdf:type rdf:resource="http://example.com/a14"/>
+</rdf:Description>
+
+<rdf:Description rdf:about="http://example.com/a32">
+ <rdf:type rdf:resource="http://example.com/a14"/>
+</rdf:Description>
+
+<rdf:Description rdf:about="http://example.com/a33">
+ <rdf:type rdf:resource="http://example.com/a14"/>
+</rdf:Description>
+
+<rdf:Description rdf:about="http://example.com/a34">
+ <rdf:type rdf:resource="http://example.com/a35"/>
+</rdf:Description>
+
+<rdf:Description rdf:about="http://example.com/a36">
+ <rdf:type rdf:resource="http://example.com/a35"/>
+</rdf:Description>
+
+<rdf:Description rdf:about="http://example.com/a37">
+ <rdf:type rdf:resource="http://example.com/a35"/>
+</rdf:Description>
+
+<rdf:Description rdf:about="http://example.com/a38">
+ <rdf:type rdf:resource="http://example.com/a35"/>
+</rdf:Description>
+
+<rdf:Description rdf:about="http://example.com/a39">
+ <rdf:type rdf:resource="http://example.com/a35"/>
+</rdf:Description>
+
+<rdf:Description rdf:about="http://example.com/a40">
+ <rdf:type rdf:resource="http://example.com/a35"/>
+</rdf:Description>
+
+<rdf:Description rdf:about="http://example.com/a41">
+ <rdf:type rdf:resource="http://example.com/a35"/>
+</rdf:Description>
+
+<rdf:Description rdf:about="http://example.com/a42">
+ <rdf:type rdf:resource="http://example.com/a35"/>
+</rdf:Description>
+
+<rdf:Description rdf:about="http://example.com/a43">
+ <rdf:type rdf:resource="http://example.com/a35"/>
+</rdf:Description>
+
+<rdf:Description rdf:about="http://example.com/a44">
+ <rdf:type rdf:resource="http://example.com/a35"/>
+</rdf:Description>
+
+<rdf:Description rdf:about="http://example.com/a45">
+ <rdf:type rdf:resource="http://example.com/a35"/>
+</rdf:Description>
+
+<rdf:Description rdf:about="http://example.com/a46">
+ <rdf:type rdf:resource="http://example.com/a35"/>
+</rdf:Description>
+
+<rdf:Description rdf:about="http://example.com/a47">
+ <rdf:type rdf:resource="http://example.com/a35"/>
+</rdf:Description>
+
+<rdf:Description rdf:about="http://example.com/a48">
+ <rdf:type rdf:resource="http://example.com/a35"/>
+</rdf:Description>
+
+<rdf:Description rdf:about="http://example.com/a49">
+ <rdf:type rdf:resource="http://example.com/a35"/>
+</rdf:Description>
+
+<rdf:Description rdf:about="http://example.com/a50">
+ <rdf:type rdf:resource="http://example.com/a35"/>
+</rdf:Description>
+
+<rdf:Description rdf:about="http://example.com/a51">
+ <rdf:type rdf:resource="http://example.com/a35"/>
+</rdf:Description>
+
+<rdf:Description rdf:about="http://example.com/a52">
+ <rdf:type rdf:resource="http://example.com/a35"/>
+</rdf:Description>
+
+<rdf:Description rdf:about="http://example.com/a53">
+ <rdf:type rdf:resource="http://example.com/a8"/>
+</rdf:Description>
+
+<rdf:Description rdf:about="http://example.com/a54">
+ <rdf:type rdf:resource="http://example.com/a8"/>
+</rdf:Description>
+
+<rdf:Description rdf:about="http://example.com/a55">
+ <rdf:type rdf:resource="http://example.com/a8"/>
+</rdf:Description>
+
+<rdf:Description rdf:about="http://example.com/a56">
+ <rdf:type rdf:resource="http://example.com/a18"/>
+</rdf:Description>
+
+<rdf:Description rdf:about="http://example.com/a57">
+ <rdf:type rdf:resource="http://example.com/a18"/>
+</rdf:Description>
+
+<rdf:Description rdf:about="http://example.com/a58">
+ <rdf:type rdf:resource="http://example.com/a18"/>
+</rdf:Description>
+
+<rdf:Description rdf:about="http://example.com/a59">
+ <rdf:type rdf:resource="http://example.com/a18"/>
+</rdf:Description>
+
+<rdf:Description rdf:about="http://example.com/a60">
+ <rdf:type rdf:resource="http://example.com/a18"/>
+</rdf:Description>
+
+<rdf:Description rdf:about="http://example.com/a61">
+ <rdf:type rdf:resource="http://example.com/a18"/>
+</rdf:Description>
+
+<rdf:Description rdf:about="http://example.com/a62">
+ <rdf:type rdf:resource="http://example.com/a18"/>
+</rdf:Description>
+
+<rdf:Description rdf:about="http://example.com/a63">
+ <rdf:type rdf:resource="http://example.com/a18"/>
+</rdf:Description>
+
+<rdf:Description rdf:about="http://example.com/a64">
+ <rdf:type rdf:resource="http://example.com/a18"/>
+</rdf:Description>
+
+<rdf:Description rdf:about="http://example.com/a65">
+ <rdf:type rdf:resource="http://example.com/a18"/>
+</rdf:Description>
+
+<rdf:Description rdf:about="http://example.com/a66">
+ <rdf:type rdf:resource="http://example.com/a18"/>
+</rdf:Description>
+
+<rdf:Description rdf:about="http://example.com/a67">
+ <rdf:type rdf:resource="http://example.com/a18"/>
+</rdf:Description>
+
+<rdf:Description rdf:about="http://example.com/a68">
+ <rdf:type rdf:resource="http://example.com/a18"/>
+</rdf:Description>
+
+<rdf:Description rdf:about="http://example.com/a69">
+ <rdf:type rdf:resource="http://example.com/a18"/>
+</rdf:Description>
+
+<rdf:Description rdf:about="http://example.com/a70">
+ <rdf:type rdf:resource="http://example.com/a18"/>
+</rdf:Description>
+
+<rdf:Description rdf:about="http://example.com/a71">
+ <rdf:type rdf:resource="http://example.com/a18"/>
+</rdf:Description>
+
+<rdf:Description rdf:about="http://example.com/a72">
+ <rdf:type rdf:resource="http://example.com/a18"/>
+</rdf:Description>
+
+<rdf:Description rdf:about="http://example.com/a73">
+ <rdf:type rdf:resource="http://example.com/a18"/>
+</rdf:Description>
+
+<rdf:Description rdf:about="http://example.com/a74">
+ <rdf:type rdf:resource="http://example.com/a18"/>
+</rdf:Description>
+
+<rdf:Description rdf:about="http://example.com/a75">
+ <rdf:type rdf:resource="http://example.com/a18"/>
+</rdf:Description>
+
+<rdf:Description rdf:about="http://example.com/a76">
+ <rdf:type rdf:resource="http://example.com/a18"/>
+</rdf:Description>
+
+<rdf:Description rdf:about="http://example.com/a77">
+ <rdf:type rdf:resource="http://example.com/a18"/>
+</rdf:Description>
+
+<rdf:Description rdf:about="http://example.com/a78">
+ <rdf:type rdf:resource="http://example.com/a18"/>
+</rdf:Description>
+
+<rdf:Description rdf:about="http://example.com/a79">
+ <rdf:type rdf:resource="http://example.com/a18"/>
+</rdf:Description>
+
+<rdf:Description rdf:about="http://example.com/a80">
+ <rdf:type rdf:resource="http://example.com/a18"/>
+</rdf:Description>
+
+<rdf:Description rdf:about="http://example.com/a81">
+ <rdf:type rdf:resource="http://example.com/a18"/>
+</rdf:Description>
+
+<rdf:Description rdf:about="http://example.com/a82">
+ <rdf:type rdf:resource="http://example.com/a18"/>
+</rdf:Description>
+
+<rdf:Description rdf:about="http://example.com/a83">
+ <rdf:type rdf:resource="http://example.com/a18"/>
+</rdf:Description>
+
+<rdf:Description rdf:about="http://example.com/a84">
+ <rdf:type rdf:resource="http://example.com/a18"/>
+</rdf:Description>
+
+<rdf:Description rdf:about="http://example.com/a85">
+ <rdf:type rdf:resource="http://example.com/a18"/>
+</rdf:Description>
+
+<rdf:Description rdf:about="http://example.com/a86">
+ <rdf:type rdf:resource="http://example.com/a18"/>
+</rdf:Description>
+
+<rdf:Description rdf:about="http://example.com/a87">
+ <rdf:type rdf:resource="http://example.com/a18"/>
+</rdf:Description>
+
+<rdf:Description rdf:about="http://example.com/a88">
+ <rdf:type rdf:resource="http://example.com/a18"/>
+</rdf:Description>
+
+<rdf:Description rdf:about="http://example.com/a89">
+ <rdf:type rdf:resource="http://example.com/a18"/>
+</rdf:Description>
+
+<rdf:Description rdf:about="http://example.com/a90">
+ <rdf:type rdf:resource="http://example.com/a18"/>
+</rdf:Description>
+
+<rdf:Description rdf:about="http://example.com/a91">
+ <rdf:type rdf:resource="http://example.com/a18"/>
+</rdf:Description>
+
+<rdf:Description rdf:about="http://example.com/a92">
+ <rdf:type rdf:resource="http://example.com/a18"/>
+</rdf:Description>
+
+<rdf:Description rdf:about="http://example.com/a19">
+ <syapse:part rdf:nodeID="t71749"/>
+ <syapse:part rdf:nodeID="t71759"/>
+ <syapse:part rdf:nodeID="t71649"/>
+ <syapse:part rdf:nodeID="t71664"/>
+</rdf:Description>
+
+<rdf:Description rdf:about="http://example.com/a53">
+ <syapse:part rdf:nodeID="t71676"/>
+ <syapse:part rdf:nodeID="t72698"/>
+ <syapse:part rdf:nodeID="t72705"/>
+ <syapse:part rdf:nodeID="t72749"/>
+</rdf:Description>
+
+<rdf:Description rdf:about="http://example.com/a20">
+ <sys:uniqueId>FS-10</sys:uniqueId>
+</rdf:Description>
+
+<rdf:Description rdf:about="http://example.com/a53">
+ <syapse:part rdf:nodeID="t72801"/>
+ <syapse:part rdf:nodeID="t72811"/>
+ <syapse:part rdf:nodeID="t72843"/>
+ <syapse:part rdf:nodeID="t72878"/>
+</rdf:Description>
+
+<rdf:Description rdf:about="http://example.com/a22">
+ <sys:uniqueId>FS-12</sys:uniqueId>
+</rdf:Description>
+
+<rdf:Description rdf:about="http://example.com/a53">
+ <syapse:part rdf:nodeID="t71645"/>
+ <syapse:part rdf:nodeID="t71653"/>
+ <syapse:part rdf:nodeID="t71670"/>
+ <syapse:part rdf:nodeID="t71672"/>
+ <syapse:part rdf:nodeID="t72897"/>
+ <syapse:part rdf:nodeID="t71673"/>
+ <syapse:part rdf:nodeID="t71674"/>
+ <syapse:part rdf:nodeID="t71675"/>
+</rdf:Description>
+
+<rdf:Description rdf:about="http://example.com/a21">
+ <sys:uniqueId>FS-11</sys:uniqueId>
+</rdf:Description>
+
+<rdf:Description rdf:about="http://example.com/a54">
+ <syapse:part rdf:nodeID="t71651"/>
+</rdf:Description>
+
+<rdf:Description rdf:about="http://example.com/a23">
+ <sys:uniqueId>FS-13</sys:uniqueId>
+</rdf:Description>
+
+<rdf:Description rdf:about="http://example.com/a54">
+ <syapse:part rdf:nodeID="t71655"/>
+ <syapse:part rdf:nodeID="t71659"/>
+ <syapse:part rdf:nodeID="t71661"/>
+ <syapse:part rdf:nodeID="t71662"/>
+ <syapse:part rdf:nodeID="t72720"/>
+ <syapse:part rdf:nodeID="t72813"/>
+ <syapse:part rdf:nodeID="t72888"/>
+</rdf:Description>
+
+<rdf:Description rdf:about="http://example.com/a29">
+ <sys:uniqueId>FS-0</sys:uniqueId>
+</rdf:Description>
+
+<rdf:Description rdf:about="http://example.com/a30">
+ <sys:uniqueId>FS-1</sys:uniqueId>
+</rdf:Description>
+
+<rdf:Description rdf:about="http://example.com/a54">
+ <syapse:part rdf:nodeID="t72786"/>
+ <syapse:part rdf:nodeID="t72796"/>
+</rdf:Description>
+
+<rdf:Description rdf:about="http://example.com/a31">
+ <sys:uniqueId>FS-2</sys:uniqueId>
+</rdf:Description>
+
+<rdf:Description rdf:about="http://example.com/a26">
+ <sys:uniqueId>FS-3</sys:uniqueId>
+</rdf:Description>
+
+<rdf:Description rdf:about="http://example.com/a28">
+ <sys:uniqueId>FS-5</sys:uniqueId>
+</rdf:Description>
+
+<rdf:Description rdf:about="http://example.com/a27">
+ <sys:uniqueId>FS-4</sys:uniqueId>
+</rdf:Description>
+
+<rdf:Description rdf:about="http://example.com/a61">
+ <syapse:part rdf:nodeID="t71667"/>
+ <syapse:part rdf:nodeID="t71685"/>
+</rdf:Description>
+
+<rdf:Description rdf:about="http://example.com/a55">
+ <syapse:part rdf:nodeID="t71646"/>
+ <syapse:part rdf:nodeID="t71648"/>
+ <syapse:part rdf:nodeID="t71656"/>
+ <syapse:part rdf:nodeID="t72709"/>
+ <syapse:part rdf:nodeID="t72734"/>
+ <syapse:part rdf:nodeID="t72760"/>
+ <syapse:part rdf:nodeID="t72841"/>
+</rdf:Description>
+
+<rdf:Description rdf:about="http://example.com/a66">
+ <sys:uniqueId>TS-12</sys:uniqueId>
+</rdf:Description>
+
+<rdf:Description rdf:about="http://example.com/a55">
+ <syapse:part rdf:nodeID="t71644"/>
+</rdf:Description>
+
+<rdf:Description rdf:about="http://example.com/a67">
+ <sys:uniqueId>TS-13</sys:uniqueId>
+</rdf:Description>
+
+<rdf:Description rdf:about="http://example.com/a24">
+ <sys:uniqueId>FS-6</sys:uniqueId>
+</rdf:Description>
+
+<rdf:Description rdf:about="http://example.com/a62">
+ <syapse:part rdf:nodeID="t71650"/>
+</rdf:Description>
+
+<rdf:Description rdf:about="http://example.com/a63">
+ <sys:uniqueId>TS-5</sys:uniqueId>
+ <syapse:part rdf:nodeID="t71647"/>
+ <syapse:part rdf:nodeID="t71665"/>
+ <syapse:part rdf:nodeID="t71668"/>
+ <syapse:part rdf:nodeID="t72716"/>
+ <syapse:part rdf:nodeID="t72833"/>
+ <syapse:part rdf:nodeID="t72852"/>
+</rdf:Description>
+
+<rdf:Description rdf:about="http://example.com/a62">
+ <syapse:part rdf:nodeID="t71666"/>
+ <syapse:part rdf:nodeID="t71669"/>
+ <syapse:part rdf:nodeID="t71691"/>
+ <syapse:part rdf:nodeID="t71702"/>
+</rdf:Description>
+
+<rdf:Description rdf:about="http://example.com/a79">
+ <sys:uniqueId>TS-14</sys:uniqueId>
+</rdf:Description>
+
+<rdf:Description rdf:about="http://example.com/a62">
+ <syapse:part rdf:nodeID="t71671"/>
+ <syapse:part rdf:nodeID="t71680"/>
+ <syapse:part rdf:nodeID="t71683"/>
+</rdf:Description>
+
+<rdf:Description rdf:about="http://example.com/a25">
+ <sys:uniqueId>FS-7</sys:uniqueId>
+</rdf:Description>
+
+<rdf:Description rdf:about="http://example.com/a62">
+ <syapse:part rdf:nodeID="t71652"/>
+ <syapse:part rdf:nodeID="t71654"/>
+ <syapse:part rdf:nodeID="t71657"/>
+ <syapse:part rdf:nodeID="t71658"/>
+ <syapse:part rdf:nodeID="t71660"/>
+</rdf:Description>
+
+<rdf:Description rdf:about="http://example.com/a33">
+ <sys:uniqueId>FS-9</sys:uniqueId>
+</rdf:Description>
+
+<rdf:Description rdf:about="http://example.com/a62">
+ <syapse:part rdf:nodeID="t71707"/>
+ <syapse:part rdf:nodeID="t71739"/>
+ <syapse:part rdf:nodeID="t71747"/>
+</rdf:Description>
+
+<rdf:Description rdf:about="http://example.com/a81">
+ <sys:uniqueId>TS-16</sys:uniqueId>
+</rdf:Description>
+
+<rdf:Description rdf:about="http://example.com/a80">
+ <sys:uniqueId>TS-15</sys:uniqueId>
+</rdf:Description>
+
+<rdf:Description rdf:about="http://example.com/a62">
+ <syapse:part rdf:nodeID="t71757"/>
+ <syapse:part rdf:nodeID="t71760"/>
+</rdf:Description>
+
+<rdf:Description rdf:about="http://example.com/a32">
+ <sys:uniqueId>FS-8</sys:uniqueId>
+</rdf:Description>
+
+<rdf:Description rdf:about="http://example.com/a89">
+ <sys:uniqueId>TS-17</sys:uniqueId>
+</rdf:Description>
+
+<rdf:Description rdf:about="http://example.com/a90">
+ <sys:uniqueId>TS-18</sys:uniqueId>
+</rdf:Description>
+
+<rdf:Description rdf:about="http://example.com/a64">
+ <sys:uniqueId>TS-4</sys:uniqueId>
+</rdf:Description>
+
+<rdf:Description rdf:about="http://example.com/a65">
+ <sys:uniqueId>TS-2</sys:uniqueId>
+</rdf:Description>
+
+<rdf:Description rdf:about="http://example.com/a84">
+ <sys:uniqueId>TS-19</sys:uniqueId>
+</rdf:Description>
+
+<rdf:Description rdf:about="http://example.com/a58">
+ <sys:uniqueId>TS-0</sys:uniqueId>
+</rdf:Description>
+
+<rdf:Description rdf:about="http://example.com/a85">
+ <sys:uniqueId>TS-20</sys:uniqueId>
+</rdf:Description>
+
+<rdf:Description rdf:about="http://example.com/a86">
+ <sys:uniqueId>TS-21</sys:uniqueId>
+</rdf:Description>
+
+<rdf:Description rdf:about="http://example.com/a59">
+ <sys:uniqueId>TS-3</sys:uniqueId>
+</rdf:Description>
+
+<rdf:Description rdf:about="http://example.com/a60">
+ <sys:uniqueId>TS-1</sys:uniqueId>
+</rdf:Description>
+
+<rdf:Description rdf:about="http://example.com/a56">
+ <sys:uniqueId>TS-25</sys:uniqueId>
+</rdf:Description>
+
+<rdf:Description rdf:about="http://example.com/a74">
+ <sys:uniqueId>TS-22</sys:uniqueId>
+</rdf:Description>
+
+<rdf:Description rdf:about="http://example.com/a75">
+ <sys:uniqueId>TS-23</sys:uniqueId>
+</rdf:Description>
+
+<rdf:Description rdf:about="http://example.com/a57">
+ <sys:uniqueId>TS-26</sys:uniqueId>
+</rdf:Description>
+
+<rdf:Description rdf:about="http://example.com/a76">
+ <sys:uniqueId>TS-27</sys:uniqueId>
+</rdf:Description>
+
+<rdf:Description rdf:about="http://example.com/a92">
+ <sys:uniqueId>TS-6</sys:uniqueId>
+</rdf:Description>
+
+<rdf:Description rdf:about="http://example.com/a91">
+ <sys:uniqueId>TS-24</sys:uniqueId>
+</rdf:Description>
+
+<rdf:Description rdf:about="http://example.com/a78">
+ <sys:uniqueId>TS-29</sys:uniqueId>
+</rdf:Description>
+
+<rdf:Description rdf:about="http://example.com/a77">
+ <sys:uniqueId>TS-28</sys:uniqueId>
+</rdf:Description>
+
+<rdf:Description rdf:about="http://example.com/a82">
+ <sys:uniqueId>TS-30</sys:uniqueId>
+</rdf:Description>
+
+<rdf:Description rdf:about="http://example.com/a83">
+ <sys:uniqueId>TS-31</sys:uniqueId>
+</rdf:Description>
+
+<rdf:Description rdf:about="http://example.com/a71">
+ <sys:uniqueId>TS-32</sys:uniqueId>
+</rdf:Description>
+
+<rdf:Description rdf:about="http://example.com/a72">
+ <sys:uniqueId>TS-33</sys:uniqueId>
+</rdf:Description>
+
+<rdf:Description rdf:about="http://example.com/a73">
+ <sys:uniqueId>TS-34</sys:uniqueId>
+</rdf:Description>
+
+<rdf:Description rdf:about="http://example.com/a87">
+ <sys:uniqueId>TS-7</sys:uniqueId>
+</rdf:Description>
+
+<rdf:Description rdf:about="http://example.com/a88">
+ <sys:uniqueId>TS-8</sys:uniqueId>
+</rdf:Description>
+
+<rdf:Description rdf:about="http://example.com/a68">
+ <sys:uniqueId>TS-9</sys:uniqueId>
+</rdf:Description>
+
+<rdf:Description rdf:about="http://example.com/a69">
+ <sys:uniqueId>TS-10</sys:uniqueId>
+</rdf:Description>
+
+<rdf:Description rdf:about="http://example.com/a70">
+ <sys:uniqueId>TS-11</sys:uniqueId>
+</rdf:Description>
+
+<rdf:Description rdf:about="http://example.com/a62">
+ <base:hasSubject rdf:resource="http://example.com/a34"/>
+</rdf:Description>
+
+<rdf:Description rdf:nodeID="t71709">
+ <base:hasSubject rdf:resource="http://example.com/a36"/>
+</rdf:Description>
+
+<rdf:Description rdf:nodeID="t71663">
+ <base:hasSubject rdf:resource="http://example.com/a36"/>
+</rdf:Description>
+
+<rdf:Description rdf:about="http://example.com/a93">
+ <base:hasSubject rdf:resource="http://example.com/a41"/>
+</rdf:Description>
+
+<rdf:Description rdf:about="http://example.com/a63">
+ <base:hasSubject rdf:resource="http://example.com/a41"/>
+</rdf:Description>
+
+<rdf:Description rdf:about="http://example.com/a64">
+ <base:hasSubject rdf:resource="http://example.com/a41"/>
+</rdf:Description>
+
+<rdf:Description rdf:about="http://example.com/a65">
+ <base:hasSubject rdf:resource="http://example.com/a41"/>
+</rdf:Description>
+
+<rdf:Description rdf:about="http://example.com/a58">
+ <base:hasSubject rdf:resource="http://example.com/a41"/>
+</rdf:Description>
+
+<rdf:Description rdf:about="http://example.com/a94">
+ <base:hasSubject rdf:resource="http://example.com/a42"/>
+</rdf:Description>
+
+<rdf:Description rdf:about="http://example.com/a24">
+ <base:hasSubject rdf:resource="http://example.com/a42"/>
+</rdf:Description>
+
+<rdf:Description rdf:about="http://example.com/a89">
+ <base:hasSubject rdf:resource="http://example.com/a42"/>
+</rdf:Description>
+
+<rdf:Description rdf:about="http://example.com/a90">
+ <base:hasSubject rdf:resource="http://example.com/a42"/>
+</rdf:Description>
+
+<rdf:Description rdf:about="http://example.com/a94">
+ <base:hasSubject rdf:resource="http://example.com/a43"/>
+</rdf:Description>
+
+<rdf:Description rdf:about="http://example.com/a22">
+ <base:hasSubject rdf:resource="http://example.com/a43"/>
+</rdf:Description>
+
+<rdf:Description rdf:about="http://example.com/a78">
+ <base:hasSubject rdf:resource="http://example.com/a43"/>
+</rdf:Description>
+
+<rdf:Description rdf:about="http://example.com/a82">
+ <base:hasSubject rdf:resource="http://example.com/a43"/>
+</rdf:Description>
+
+<rdf:Description rdf:about="http://example.com/a94">
+ <base:hasSubject rdf:resource="http://example.com/a44"/>
+</rdf:Description>
+
+<rdf:Description rdf:about="http://example.com/a31">
+ <base:hasSubject rdf:resource="http://example.com/a44"/>
+</rdf:Description>
+
+<rdf:Description rdf:about="http://example.com/a88">
+ <base:hasSubject rdf:resource="http://example.com/a44"/>
+</rdf:Description>
+
+<rdf:Description rdf:about="http://example.com/a68">
+ <base:hasSubject rdf:resource="http://example.com/a44"/>
+</rdf:Description>
+
+<rdf:Description rdf:about="http://example.com/a94">
+ <base:hasSubject rdf:resource="http://example.com/a51"/>
+</rdf:Description>
+
+<rdf:Description rdf:about="http://example.com/a30">
+ <base:hasSubject rdf:resource="http://example.com/a51"/>
+</rdf:Description>
+
+<rdf:Description rdf:about="http://example.com/a73">
+ <base:hasSubject rdf:resource="http://example.com/a51"/>
+</rdf:Description>
+
+<rdf:Description rdf:about="http://example.com/a87">
+ <base:hasSubject rdf:resource="http://example.com/a51"/>
+</rdf:Description>
+
+<rdf:Description rdf:about="http://example.com/a95">
+ <base:hasSubject rdf:resource="http://example.com/a52"/>
+</rdf:Description>
+
+<rdf:Description rdf:about="http://example.com/a33">
+ <base:hasSubject rdf:resource="http://example.com/a52"/>
+</rdf:Description>
+
+<rdf:Description rdf:about="http://example.com/a75">
+ <base:hasSubject rdf:resource="http://example.com/a52"/>
+</rdf:Description>
+
+<rdf:Description rdf:about="http://example.com/a91">
+ <base:hasSubject rdf:resource="http://example.com/a52"/>
+</rdf:Description>
+
+<rdf:Description rdf:about="http://example.com/a95">
+ <base:hasSubject rdf:resource="http://example.com/a45"/>
+</rdf:Description>
+
+<rdf:Description rdf:about="http://example.com/a32">
+ <base:hasSubject rdf:resource="http://example.com/a45"/>
+</rdf:Description>
+
+<rdf:Description rdf:about="http://example.com/a86">
+ <base:hasSubject rdf:resource="http://example.com/a45"/>
+</rdf:Description>
+
+<rdf:Description rdf:about="http://example.com/a74">
+ <base:hasSubject rdf:resource="http://example.com/a45"/>
+</rdf:Description>
+
+<rdf:Description rdf:about="http://example.com/a95">
+ <base:hasSubject rdf:resource="http://example.com/a46"/>
+</rdf:Description>
+
+<rdf:Description rdf:about="http://example.com/a21">
+ <base:hasSubject rdf:resource="http://example.com/a46"/>
+</rdf:Description>
+
+<rdf:Description rdf:about="http://example.com/a76">
+ <base:hasSubject rdf:resource="http://example.com/a46"/>
+</rdf:Description>
+
+<rdf:Description rdf:about="http://example.com/a77">
+ <base:hasSubject rdf:resource="http://example.com/a46"/>
+</rdf:Description>
+
+<rdf:Description rdf:about="http://example.com/a95">
+ <base:hasSubject rdf:resource="http://example.com/a47"/>
+</rdf:Description>
+
+<rdf:Description rdf:about="http://example.com/a28">
+ <base:hasSubject rdf:resource="http://example.com/a47"/>
+</rdf:Description>
+
+<rdf:Description rdf:about="http://example.com/a80">
+ <base:hasSubject rdf:resource="http://example.com/a47"/>
+</rdf:Description>
+
+<rdf:Description rdf:about="http://example.com/a81">
+ <base:hasSubject rdf:resource="http://example.com/a47"/>
+</rdf:Description>
+
+<rdf:Description rdf:about="http://example.com/a95">
+ <base:hasSubject rdf:resource="http://example.com/a38"/>
+</rdf:Description>
+
+<rdf:Description rdf:about="http://example.com/a27">
+ <base:hasSubject rdf:resource="http://example.com/a38"/>
+</rdf:Description>
+
+<rdf:Description rdf:about="http://example.com/a67">
+ <base:hasSubject rdf:resource="http://example.com/a38"/>
+</rdf:Description>
+
+<rdf:Descriptio...
[truncated message content] |
|
From: <jer...@us...> - 2013-10-07 20:27:25
|
Revision: 7437
http://bigdata.svn.sourceforge.net/bigdata/?rev=7437&view=rev
Author: jeremy_carroll
Date: 2013-10-07 20:27:15 +0000 (Mon, 07 Oct 2013)
Log Message:
-----------
added tests concerning 739 optional property path and bind
Modified Paths:
--------------
branches/BIGDATA_RELEASE_1_3_0/bigdata-rdf/src/test/com/bigdata/rdf/sparql/ast/eval/TestTickets.java
Added Paths:
-----------
branches/BIGDATA_RELEASE_1_3_0/bigdata-rdf/src/test/com/bigdata/rdf/sparql/ast/eval/ticket739-optpp.rq
branches/BIGDATA_RELEASE_1_3_0/bigdata-rdf/src/test/com/bigdata/rdf/sparql/ast/eval/ticket739-optpp.srx
branches/BIGDATA_RELEASE_1_3_0/bigdata-rdf/src/test/com/bigdata/rdf/sparql/ast/eval/ticket739-optpp.ttl
branches/BIGDATA_RELEASE_1_3_0/bigdata-rdf/src/test/com/bigdata/rdf/sparql/ast/eval/ticket739A-optpp.rq
branches/BIGDATA_RELEASE_1_3_0/bigdata-rdf/src/test/com/bigdata/rdf/sparql/ast/eval/ticket739B-optpp.rq
branches/BIGDATA_RELEASE_1_3_0/bigdata-rdf/src/test/com/bigdata/rdf/sparql/ast/eval/ticket739C-optpp.rq
Modified: branches/BIGDATA_RELEASE_1_3_0/bigdata-rdf/src/test/com/bigdata/rdf/sparql/ast/eval/TestTickets.java
===================================================================
--- branches/BIGDATA_RELEASE_1_3_0/bigdata-rdf/src/test/com/bigdata/rdf/sparql/ast/eval/TestTickets.java 2013-10-07 17:26:15 UTC (rev 7436)
+++ branches/BIGDATA_RELEASE_1_3_0/bigdata-rdf/src/test/com/bigdata/rdf/sparql/ast/eval/TestTickets.java 2013-10-07 20:27:15 UTC (rev 7437)
@@ -66,6 +66,49 @@
}
+ public void test_ticket_739() throws Exception {
+
+ new TestHelper("ticket739-optpp",// testURI,
+ "ticket739-optpp.rq",// queryFileURL
+ "ticket739-optpp.ttl",// dataFileURL
+ "ticket739-optpp.srx"// resultFileURL
+ ).runTest();
+
+ }
+
+
+ public void xtest_ticket_739a() throws Exception {
+
+ new TestHelper("ticket739A-optpp",// testURI,
+ "ticket739A-optpp.rq",// queryFileURL
+ "ticket739-optpp.ttl",// dataFileURL
+ "ticket739-optpp.srx"// resultFileURL
+ ).runTest();
+
+ }
+
+
+
+ public void xtest_ticket_739b() throws Exception {
+
+ new TestHelper("ticket739B-optpp",// testURI,
+ "ticket739B-optpp.rq",// queryFileURL
+ "ticket739-optpp.ttl",// dataFileURL
+ "ticket739-optpp.srx"// resultFileURL
+ ).runTest();
+
+ }
+
+ public void test_ticket_739c() throws Exception {
+
+ new TestHelper("ticket739B-optpp",// testURI,
+ "ticket739C-optpp.rq",// queryFileURL
+ "ticket739-optpp.ttl",// dataFileURL
+ "ticket739-optpp.srx"// resultFileURL
+ ).runTest();
+
+ }
+
public void xtest_ticket_747() throws Exception {
new TestHelper("ticket747-bound",// testURI,
Added: branches/BIGDATA_RELEASE_1_3_0/bigdata-rdf/src/test/com/bigdata/rdf/sparql/ast/eval/ticket739-optpp.rq
===================================================================
--- branches/BIGDATA_RELEASE_1_3_0/bigdata-rdf/src/test/com/bigdata/rdf/sparql/ast/eval/ticket739-optpp.rq (rev 0)
+++ branches/BIGDATA_RELEASE_1_3_0/bigdata-rdf/src/test/com/bigdata/rdf/sparql/ast/eval/ticket739-optpp.rq 2013-10-07 20:27:15 UTC (rev 7437)
@@ -0,0 +1,12 @@
+
+SELECT ?X
+WHERE {
+{
+?X <eg:part> ?part .
+?part ?predicate <eg:o> .
+}
+UNION
+{
+?X ?predicate <eg:o> .
+}
+}
\ No newline at end of file
Added: branches/BIGDATA_RELEASE_1_3_0/bigdata-rdf/src/test/com/bigdata/rdf/sparql/ast/eval/ticket739-optpp.srx
===================================================================
--- branches/BIGDATA_RELEASE_1_3_0/bigdata-rdf/src/test/com/bigdata/rdf/sparql/ast/eval/ticket739-optpp.srx (rev 0)
+++ branches/BIGDATA_RELEASE_1_3_0/bigdata-rdf/src/test/com/bigdata/rdf/sparql/ast/eval/ticket739-optpp.srx 2013-10-07 20:27:15 UTC (rev 7437)
@@ -0,0 +1,26 @@
+<?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"/>
+ </head>
+ <results>
+ <result>
+ <binding name="X">
+ <uri>eg:s</uri>
+ </binding>
+ </result>
+ <result>
+ <binding name="X">
+ <uri>eg:mid</uri>
+ </binding>
+ </result>
+ <result>
+ <binding name="X">
+ <uri>eg:b</uri>
+ </binding>
+ </result>
+ </results>
+</sparql>
Added: branches/BIGDATA_RELEASE_1_3_0/bigdata-rdf/src/test/com/bigdata/rdf/sparql/ast/eval/ticket739-optpp.ttl
===================================================================
--- branches/BIGDATA_RELEASE_1_3_0/bigdata-rdf/src/test/com/bigdata/rdf/sparql/ast/eval/ticket739-optpp.ttl (rev 0)
+++ branches/BIGDATA_RELEASE_1_3_0/bigdata-rdf/src/test/com/bigdata/rdf/sparql/ast/eval/ticket739-optpp.ttl 2013-10-07 20:27:15 UTC (rev 7437)
@@ -0,0 +1,5 @@
+
+<eg:s> <eg:p> <eg:o> .
+
+<eg:b> <eg:part> <eg:mid> .
+<eg:mid> <eg:q> <eg:o> .
\ No newline at end of file
Added: branches/BIGDATA_RELEASE_1_3_0/bigdata-rdf/src/test/com/bigdata/rdf/sparql/ast/eval/ticket739A-optpp.rq
===================================================================
--- branches/BIGDATA_RELEASE_1_3_0/bigdata-rdf/src/test/com/bigdata/rdf/sparql/ast/eval/ticket739A-optpp.rq (rev 0)
+++ branches/BIGDATA_RELEASE_1_3_0/bigdata-rdf/src/test/com/bigdata/rdf/sparql/ast/eval/ticket739A-optpp.rq 2013-10-07 20:27:15 UTC (rev 7437)
@@ -0,0 +1,6 @@
+
+SELECT ?X
+WHERE {
+?X <eg:part>? ?part .
+?part ?predicate <eg:o> .
+}
\ No newline at end of file
Added: branches/BIGDATA_RELEASE_1_3_0/bigdata-rdf/src/test/com/bigdata/rdf/sparql/ast/eval/ticket739B-optpp.rq
===================================================================
--- branches/BIGDATA_RELEASE_1_3_0/bigdata-rdf/src/test/com/bigdata/rdf/sparql/ast/eval/ticket739B-optpp.rq (rev 0)
+++ branches/BIGDATA_RELEASE_1_3_0/bigdata-rdf/src/test/com/bigdata/rdf/sparql/ast/eval/ticket739B-optpp.rq 2013-10-07 20:27:15 UTC (rev 7437)
@@ -0,0 +1,6 @@
+SELECT ?X
+WHERE {
+BIND ( <eg:o> as ?Z )
+?X <eg:part>? ?part .
+?part ?predicate ?Z .
+}
\ No newline at end of file
Added: branches/BIGDATA_RELEASE_1_3_0/bigdata-rdf/src/test/com/bigdata/rdf/sparql/ast/eval/ticket739C-optpp.rq
===================================================================
--- branches/BIGDATA_RELEASE_1_3_0/bigdata-rdf/src/test/com/bigdata/rdf/sparql/ast/eval/ticket739C-optpp.rq (rev 0)
+++ branches/BIGDATA_RELEASE_1_3_0/bigdata-rdf/src/test/com/bigdata/rdf/sparql/ast/eval/ticket739C-optpp.rq 2013-10-07 20:27:15 UTC (rev 7437)
@@ -0,0 +1,14 @@
+
+
+SELECT ?X
+WHERE {
+BIND ( <eg:o> as ?Z )
+{
+?X <eg:part> ?part .
+?part ?predicate ?Z .
+}
+UNION
+{
+?X ?predicate ?Z .
+}
+}
\ 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-10-07 20:58:07
|
Revision: 7438
http://bigdata.svn.sourceforge.net/bigdata/?rev=7438&view=rev
Author: jeremy_carroll
Date: 2013-10-07 20:58:00 +0000 (Mon, 07 Oct 2013)
Log Message:
-----------
More tests for trac739
Modified Paths:
--------------
branches/BIGDATA_RELEASE_1_3_0/bigdata-rdf/src/test/com/bigdata/rdf/sparql/ast/eval/TestTickets.java
Added Paths:
-----------
branches/BIGDATA_RELEASE_1_3_0/bigdata-rdf/src/test/com/bigdata/rdf/sparql/ast/eval/ticket739D-optpp.rq
branches/BIGDATA_RELEASE_1_3_0/bigdata-rdf/src/test/com/bigdata/rdf/sparql/ast/eval/ticket739D-optpp.srx
branches/BIGDATA_RELEASE_1_3_0/bigdata-rdf/src/test/com/bigdata/rdf/sparql/ast/eval/ticket739D-optpp.ttl
branches/BIGDATA_RELEASE_1_3_0/bigdata-rdf/src/test/com/bigdata/rdf/sparql/ast/eval/ticket739E-optpp.rq
Modified: branches/BIGDATA_RELEASE_1_3_0/bigdata-rdf/src/test/com/bigdata/rdf/sparql/ast/eval/TestTickets.java
===================================================================
--- branches/BIGDATA_RELEASE_1_3_0/bigdata-rdf/src/test/com/bigdata/rdf/sparql/ast/eval/TestTickets.java 2013-10-07 20:27:15 UTC (rev 7437)
+++ branches/BIGDATA_RELEASE_1_3_0/bigdata-rdf/src/test/com/bigdata/rdf/sparql/ast/eval/TestTickets.java 2013-10-07 20:58:00 UTC (rev 7438)
@@ -109,6 +109,24 @@
}
+ public void test_ticket_739d() throws Exception {
+
+ new TestHelper("ticket739D-optpp",// testURI,
+ "ticket739D-optpp.rq",// queryFileURL
+ "ticket739D-optpp.ttl",// dataFileURL
+ "ticket739D-optpp.srx"// resultFileURL
+ ).runTest();
+
+ }
+ public void xtest_ticket_739e() throws Exception {
+
+ new TestHelper("ticket739E-optpp",// testURI,
+ "ticket739E-optpp.rq",// queryFileURL
+ "ticket739D-optpp.ttl",// dataFileURL
+ "ticket739D-optpp.srx"// resultFileURL
+ ).runTest();
+
+ }
public void xtest_ticket_747() throws Exception {
new TestHelper("ticket747-bound",// testURI,
Added: branches/BIGDATA_RELEASE_1_3_0/bigdata-rdf/src/test/com/bigdata/rdf/sparql/ast/eval/ticket739D-optpp.rq
===================================================================
--- branches/BIGDATA_RELEASE_1_3_0/bigdata-rdf/src/test/com/bigdata/rdf/sparql/ast/eval/ticket739D-optpp.rq (rev 0)
+++ branches/BIGDATA_RELEASE_1_3_0/bigdata-rdf/src/test/com/bigdata/rdf/sparql/ast/eval/ticket739D-optpp.rq 2013-10-07 20:58:00 UTC (rev 7438)
@@ -0,0 +1,6 @@
+
+SELECT ?X
+WHERE {
+?X <eg:part>? ?part .
+?part ?predicate <eg:o> .
+}
\ No newline at end of file
Added: branches/BIGDATA_RELEASE_1_3_0/bigdata-rdf/src/test/com/bigdata/rdf/sparql/ast/eval/ticket739D-optpp.srx
===================================================================
--- branches/BIGDATA_RELEASE_1_3_0/bigdata-rdf/src/test/com/bigdata/rdf/sparql/ast/eval/ticket739D-optpp.srx (rev 0)
+++ branches/BIGDATA_RELEASE_1_3_0/bigdata-rdf/src/test/com/bigdata/rdf/sparql/ast/eval/ticket739D-optpp.srx 2013-10-07 20:58:00 UTC (rev 7438)
@@ -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="X"/>
+ </head>
+ <results>
+ <result>
+ <binding name="X">
+ <uri>eg:s</uri>
+ </binding>
+ </result>
+ </results>
+</sparql>
Added: branches/BIGDATA_RELEASE_1_3_0/bigdata-rdf/src/test/com/bigdata/rdf/sparql/ast/eval/ticket739D-optpp.ttl
===================================================================
--- branches/BIGDATA_RELEASE_1_3_0/bigdata-rdf/src/test/com/bigdata/rdf/sparql/ast/eval/ticket739D-optpp.ttl (rev 0)
+++ branches/BIGDATA_RELEASE_1_3_0/bigdata-rdf/src/test/com/bigdata/rdf/sparql/ast/eval/ticket739D-optpp.ttl 2013-10-07 20:58:00 UTC (rev 7438)
@@ -0,0 +1,4 @@
+
+<eg:s> <eg:p> <eg:o> .
+
+<eg:b> <eg:part> <eg:mid> .
\ No newline at end of file
Added: branches/BIGDATA_RELEASE_1_3_0/bigdata-rdf/src/test/com/bigdata/rdf/sparql/ast/eval/ticket739E-optpp.rq
===================================================================
--- branches/BIGDATA_RELEASE_1_3_0/bigdata-rdf/src/test/com/bigdata/rdf/sparql/ast/eval/ticket739E-optpp.rq (rev 0)
+++ branches/BIGDATA_RELEASE_1_3_0/bigdata-rdf/src/test/com/bigdata/rdf/sparql/ast/eval/ticket739E-optpp.rq 2013-10-07 20:58:00 UTC (rev 7438)
@@ -0,0 +1,6 @@
+SELECT ?X
+WHERE {
+BIND ( <eg:o> as ?Z )
+?X <eg:part>? ?part .
+?part ?predicate ?Z .
+}
\ 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-10-07 20:58:28
|
Revision: 7439
http://bigdata.svn.sourceforge.net/bigdata/?rev=7439&view=rev
Author: jeremy_carroll
Date: 2013-10-07 20:58:21 +0000 (Mon, 07 Oct 2013)
Log Message:
-----------
Tests for subclass queries from trac725
Modified Paths:
--------------
branches/BIGDATA_RELEASE_1_3_0/bigdata-rdf/src/test/com/bigdata/rdf/sparql/ast/eval/TestSubSelectFilterExist725.java
Added Paths:
-----------
branches/BIGDATA_RELEASE_1_3_0/bigdata-rdf/src/test/com/bigdata/rdf/sparql/ast/eval/subclass-725.rq
branches/BIGDATA_RELEASE_1_3_0/bigdata-rdf/src/test/com/bigdata/rdf/sparql/ast/eval/subclass-725.srx
branches/BIGDATA_RELEASE_1_3_0/bigdata-rdf/src/test/com/bigdata/rdf/sparql/ast/eval/subclass-725.ttl
Modified: branches/BIGDATA_RELEASE_1_3_0/bigdata-rdf/src/test/com/bigdata/rdf/sparql/ast/eval/TestSubSelectFilterExist725.java
===================================================================
--- branches/BIGDATA_RELEASE_1_3_0/bigdata-rdf/src/test/com/bigdata/rdf/sparql/ast/eval/TestSubSelectFilterExist725.java 2013-10-07 20:58:00 UTC (rev 7438)
+++ branches/BIGDATA_RELEASE_1_3_0/bigdata-rdf/src/test/com/bigdata/rdf/sparql/ast/eval/TestSubSelectFilterExist725.java 2013-10-07 20:58:21 UTC (rev 7439)
@@ -71,4 +71,22 @@
}
+
+ /**
+ * I fear that this test may not be in the right logical location.
+ * The test case was filed with defect trac725, which is why the test
+ * is here; bit it seems more related to other issues.
+ * @throws Exception
+ */
+ public void test_class_hierarchy() throws Exception {
+
+ new TestHelper(
+ "subclass-725",// testURI
+ "subclass-725.rq", // queryURI
+ "subclass-725.ttl", // dataURI
+ "subclass-725.srx" // resultURI
+ ).runTest();
+
+ }
+
}
Added: branches/BIGDATA_RELEASE_1_3_0/bigdata-rdf/src/test/com/bigdata/rdf/sparql/ast/eval/subclass-725.rq
===================================================================
--- branches/BIGDATA_RELEASE_1_3_0/bigdata-rdf/src/test/com/bigdata/rdf/sparql/ast/eval/subclass-725.rq (rev 0)
+++ branches/BIGDATA_RELEASE_1_3_0/bigdata-rdf/src/test/com/bigdata/rdf/sparql/ast/eval/subclass-725.rq 2013-10-07 20:58:21 UTC (rev 7439)
@@ -0,0 +1,13 @@
+
+prefix rdfs: <http://www.w3.org/2000/01/rdf-schema#>
+prefix rdf: <http://www.w3.org/1999/02/22-rdf-syntax-ns#>
+
+SELECT ?s ?p ?o
+{
+ { SELECT (rdf:type as ?p) ?s ?o {
+ ?s rdf:type ?o .
+ ?o rdfs:subClassOf * ?sup .
+ FILTER ( ?sup = <eg:C> )
+ }
+ }
+}
\ No newline at end of file
Added: branches/BIGDATA_RELEASE_1_3_0/bigdata-rdf/src/test/com/bigdata/rdf/sparql/ast/eval/subclass-725.srx
===================================================================
--- branches/BIGDATA_RELEASE_1_3_0/bigdata-rdf/src/test/com/bigdata/rdf/sparql/ast/eval/subclass-725.srx (rev 0)
+++ branches/BIGDATA_RELEASE_1_3_0/bigdata-rdf/src/test/com/bigdata/rdf/sparql/ast/eval/subclass-725.srx 2013-10-07 20:58:21 UTC (rev 7439)
@@ -0,0 +1,47 @@
+<?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="s"/>
+ <variable name="p"/>
+ <variable name="o"/>
+ </head>
+ <results>
+ <result>
+ <binding name="s">
+ <uri>eg:a</uri>
+ </binding>
+ <binding name="o">
+ <uri>eg:A</uri>
+ </binding>
+ <binding name="p">
+ <uri>http://www.w3.org/1999/02/22-rdf-syntax-ns#type</uri>
+ </binding>
+ </result>
+ <result>
+ <binding name="s">
+ <uri>eg:b</uri>
+ </binding>
+ <binding name="o">
+ <uri>eg:B</uri>
+ </binding>
+ <binding name="p">
+ <uri>http://www.w3.org/1999/02/22-rdf-syntax-ns#type</uri>
+ </binding>
+ </result>
+ <result>
+ <binding name="s">
+ <uri>eg:c</uri>
+ </binding>
+
+ <binding name="o">
+ <uri>eg:C</uri>
+ </binding>
+ <binding name="p">
+ <uri>http://www.w3.org/1999/02/22-rdf-syntax-ns#type</uri>
+ </binding>
+ </result>
+ </results>
+</sparql>
Added: branches/BIGDATA_RELEASE_1_3_0/bigdata-rdf/src/test/com/bigdata/rdf/sparql/ast/eval/subclass-725.ttl
===================================================================
--- branches/BIGDATA_RELEASE_1_3_0/bigdata-rdf/src/test/com/bigdata/rdf/sparql/ast/eval/subclass-725.ttl (rev 0)
+++ branches/BIGDATA_RELEASE_1_3_0/bigdata-rdf/src/test/com/bigdata/rdf/sparql/ast/eval/subclass-725.ttl 2013-10-07 20:58:21 UTC (rev 7439)
@@ -0,0 +1,8 @@
+
+@prefix rdfs: <http://www.w3.org/2000/01/rdf-schema#> .
+@prefix rdf: <http://www.w3.org/1999/02/22-rdf-syntax-ns#> .
+<eg:a> rdf:type <eg:A> .
+<eg:b> rdf:type <eg:B> .
+<eg:c> rdf:type <eg:C> .
+<eg:A> rdfs:subClassOf <eg:B> .
+<eg:B> rdfs:subClassOf <eg:C> .
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|
|
From: <jer...@us...> - 2013-10-10 00:34:11
|
Revision: 7445
http://bigdata.svn.sourceforge.net/bigdata/?rev=7445&view=rev
Author: jeremy_carroll
Date: 2013-10-10 00:34:02 +0000 (Thu, 10 Oct 2013)
Log Message:
-----------
further tests for min and max to check for materialization issues
Modified Paths:
--------------
branches/BIGDATA_RELEASE_1_3_0/bigdata-rdf/src/test/com/bigdata/rdf/sparql/ast/eval/TestTickets.java
branches/BIGDATA_RELEASE_1_3_0/bigdata-rdf/src/test/com/bigdata/rdf/sparql/ast/eval/aggregate-max.rq
branches/BIGDATA_RELEASE_1_3_0/bigdata-rdf/src/test/com/bigdata/rdf/sparql/ast/eval/aggregate-min-max.ttl
branches/BIGDATA_RELEASE_1_3_0/bigdata-rdf/src/test/com/bigdata/rdf/sparql/ast/eval/aggregate-min.rq
Added Paths:
-----------
branches/BIGDATA_RELEASE_1_3_0/bigdata-rdf/src/test/com/bigdata/rdf/sparql/ast/eval/aggregate-max1.rq
branches/BIGDATA_RELEASE_1_3_0/bigdata-rdf/src/test/com/bigdata/rdf/sparql/ast/eval/aggregate-max1.srx
branches/BIGDATA_RELEASE_1_3_0/bigdata-rdf/src/test/com/bigdata/rdf/sparql/ast/eval/aggregate-max2.rq
branches/BIGDATA_RELEASE_1_3_0/bigdata-rdf/src/test/com/bigdata/rdf/sparql/ast/eval/aggregate-max2.srx
branches/BIGDATA_RELEASE_1_3_0/bigdata-rdf/src/test/com/bigdata/rdf/sparql/ast/eval/aggregate-min1.rq
branches/BIGDATA_RELEASE_1_3_0/bigdata-rdf/src/test/com/bigdata/rdf/sparql/ast/eval/aggregate-min1.srx
branches/BIGDATA_RELEASE_1_3_0/bigdata-rdf/src/test/com/bigdata/rdf/sparql/ast/eval/aggregate-min2.rq
branches/BIGDATA_RELEASE_1_3_0/bigdata-rdf/src/test/com/bigdata/rdf/sparql/ast/eval/aggregate-min2.srx
Modified: branches/BIGDATA_RELEASE_1_3_0/bigdata-rdf/src/test/com/bigdata/rdf/sparql/ast/eval/TestTickets.java
===================================================================
--- branches/BIGDATA_RELEASE_1_3_0/bigdata-rdf/src/test/com/bigdata/rdf/sparql/ast/eval/TestTickets.java 2013-10-09 23:22:40 UTC (rev 7444)
+++ branches/BIGDATA_RELEASE_1_3_0/bigdata-rdf/src/test/com/bigdata/rdf/sparql/ast/eval/TestTickets.java 2013-10-10 00:34:02 UTC (rev 7445)
@@ -277,4 +277,52 @@
).runTest();
}
+
+ public void test_ticket_min736_1() throws Exception {
+
+ new TestHelper("aggregate-min1",// testURI,
+ "aggregate-min1.rq",// queryFileURL
+ "aggregate-min-max.ttl",// dataFileURL
+ "aggregate-min1.srx",// resultFileURL
+ false, // laxCardinality
+ true // checkOrder
+ ).runTest();
+
+ }
+
+ public void test_ticket_max736_1() throws Exception {
+
+ new TestHelper("aggregate-max1",// testURI,
+ "aggregate-max1.rq",// queryFileURL
+ "aggregate-min-max.ttl",// dataFileURL
+ "aggregate-max1.srx",// resultFileURL
+ false, // laxCardinality
+ true // checkOrder
+ ).runTest();
+
+ }
+
+ public void test_ticket_min736_2() throws Exception {
+
+ new TestHelper("aggregate-min2",// testURI,
+ "aggregate-min2.rq",// queryFileURL
+ "aggregate-min-max.ttl",// dataFileURL
+ "aggregate-min2.srx",// resultFileURL
+ false, // laxCardinality
+ true // checkOrder
+ ).runTest();
+
+ }
+
+ public void test_ticket_max736_2() throws Exception {
+
+ new TestHelper("aggregate-max2",// testURI,
+ "aggregate-max2.rq",// queryFileURL
+ "aggregate-min-max.ttl",// dataFileURL
+ "aggregate-max2.srx",// resultFileURL
+ false, // laxCardinality
+ true // checkOrder
+ ).runTest();
+
+ }
}
Modified: branches/BIGDATA_RELEASE_1_3_0/bigdata-rdf/src/test/com/bigdata/rdf/sparql/ast/eval/aggregate-max.rq
===================================================================
--- branches/BIGDATA_RELEASE_1_3_0/bigdata-rdf/src/test/com/bigdata/rdf/sparql/ast/eval/aggregate-max.rq 2013-10-09 23:22:40 UTC (rev 7444)
+++ branches/BIGDATA_RELEASE_1_3_0/bigdata-rdf/src/test/com/bigdata/rdf/sparql/ast/eval/aggregate-max.rq 2013-10-10 00:34:02 UTC (rev 7445)
@@ -1,5 +1,8 @@
+
+prefix : <http://example/>
+
SELECT (MAX(?o) AS ?m)
WHERE {
- ?s ?p ?o
+ ?s :p ?o
}
Added: branches/BIGDATA_RELEASE_1_3_0/bigdata-rdf/src/test/com/bigdata/rdf/sparql/ast/eval/aggregate-max1.rq
===================================================================
--- branches/BIGDATA_RELEASE_1_3_0/bigdata-rdf/src/test/com/bigdata/rdf/sparql/ast/eval/aggregate-max1.rq (rev 0)
+++ branches/BIGDATA_RELEASE_1_3_0/bigdata-rdf/src/test/com/bigdata/rdf/sparql/ast/eval/aggregate-max1.rq 2013-10-10 00:34:02 UTC (rev 7445)
@@ -0,0 +1,8 @@
+
+prefix : <http://example/>
+
+SELECT (MAX(?o) AS ?m)
+WHERE {
+ ?s :q ?o
+}
+
Added: branches/BIGDATA_RELEASE_1_3_0/bigdata-rdf/src/test/com/bigdata/rdf/sparql/ast/eval/aggregate-max1.srx
===================================================================
--- branches/BIGDATA_RELEASE_1_3_0/bigdata-rdf/src/test/com/bigdata/rdf/sparql/ast/eval/aggregate-max1.srx (rev 0)
+++ branches/BIGDATA_RELEASE_1_3_0/bigdata-rdf/src/test/com/bigdata/rdf/sparql/ast/eval/aggregate-max1.srx 2013-10-10 00:34:02 UTC (rev 7445)
@@ -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="m"/>
+ </head>
+ <results>
+ <result>
+ <binding name="m">
+ <literal xml:lang="en">bigdata</literal>
+ </binding>
+ </result>
+ </results>
+</sparql>
Copied: branches/BIGDATA_RELEASE_1_3_0/bigdata-rdf/src/test/com/bigdata/rdf/sparql/ast/eval/aggregate-max2.rq (from rev 7444, branches/BIGDATA_RELEASE_1_3_0/bigdata-rdf/src/test/com/bigdata/rdf/sparql/ast/eval/aggregate-max.rq)
===================================================================
--- branches/BIGDATA_RELEASE_1_3_0/bigdata-rdf/src/test/com/bigdata/rdf/sparql/ast/eval/aggregate-max2.rq (rev 0)
+++ branches/BIGDATA_RELEASE_1_3_0/bigdata-rdf/src/test/com/bigdata/rdf/sparql/ast/eval/aggregate-max2.rq 2013-10-10 00:34:02 UTC (rev 7445)
@@ -0,0 +1,8 @@
+
+prefix : <http://example/>
+
+SELECT (MAX(?o) AS ?m)
+WHERE {
+ ?s ?p ?o
+}
+
Added: branches/BIGDATA_RELEASE_1_3_0/bigdata-rdf/src/test/com/bigdata/rdf/sparql/ast/eval/aggregate-max2.srx
===================================================================
--- branches/BIGDATA_RELEASE_1_3_0/bigdata-rdf/src/test/com/bigdata/rdf/sparql/ast/eval/aggregate-max2.srx (rev 0)
+++ branches/BIGDATA_RELEASE_1_3_0/bigdata-rdf/src/test/com/bigdata/rdf/sparql/ast/eval/aggregate-max2.srx 2013-10-10 00:34:02 UTC (rev 7445)
@@ -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="m"/>
+ </head>
+ <results>
+ <result>
+ <binding name="m">
+ <literal datatype="http://www.w3.org/2001/XMLSchema#integer">3</literal>
+ </binding>
+ </result>
+ </results>
+</sparql>
Modified: branches/BIGDATA_RELEASE_1_3_0/bigdata-rdf/src/test/com/bigdata/rdf/sparql/ast/eval/aggregate-min-max.ttl
===================================================================
--- branches/BIGDATA_RELEASE_1_3_0/bigdata-rdf/src/test/com/bigdata/rdf/sparql/ast/eval/aggregate-min-max.ttl 2013-10-09 23:22:40 UTC (rev 7444)
+++ branches/BIGDATA_RELEASE_1_3_0/bigdata-rdf/src/test/com/bigdata/rdf/sparql/ast/eval/aggregate-min-max.ttl 2013-10-10 00:34:02 UTC (rev 7445)
@@ -3,5 +3,8 @@
:x1 :p 1.5 .
:x1 :p 3 .
:x1 :p :x2 .
+:x1 :q "bigdata"@en.
+:x1 :q "bigdata"@de.
+:x1 :r <http://www.bigdata.com/blog/> .
Modified: branches/BIGDATA_RELEASE_1_3_0/bigdata-rdf/src/test/com/bigdata/rdf/sparql/ast/eval/aggregate-min.rq
===================================================================
--- branches/BIGDATA_RELEASE_1_3_0/bigdata-rdf/src/test/com/bigdata/rdf/sparql/ast/eval/aggregate-min.rq 2013-10-09 23:22:40 UTC (rev 7444)
+++ branches/BIGDATA_RELEASE_1_3_0/bigdata-rdf/src/test/com/bigdata/rdf/sparql/ast/eval/aggregate-min.rq 2013-10-10 00:34:02 UTC (rev 7445)
@@ -1,4 +1,6 @@
+prefix : <http://example/>
+
SELECT (MIN(?o) AS ?m)
WHERE {
- ?s ?p ?o
+ ?s :p ?o
}
Added: branches/BIGDATA_RELEASE_1_3_0/bigdata-rdf/src/test/com/bigdata/rdf/sparql/ast/eval/aggregate-min1.rq
===================================================================
--- branches/BIGDATA_RELEASE_1_3_0/bigdata-rdf/src/test/com/bigdata/rdf/sparql/ast/eval/aggregate-min1.rq (rev 0)
+++ branches/BIGDATA_RELEASE_1_3_0/bigdata-rdf/src/test/com/bigdata/rdf/sparql/ast/eval/aggregate-min1.rq 2013-10-10 00:34:02 UTC (rev 7445)
@@ -0,0 +1,6 @@
+prefix : <http://example/>
+
+SELECT (MIN(?o) AS ?m)
+WHERE {
+ ?s :q ?o
+}
Added: branches/BIGDATA_RELEASE_1_3_0/bigdata-rdf/src/test/com/bigdata/rdf/sparql/ast/eval/aggregate-min1.srx
===================================================================
--- branches/BIGDATA_RELEASE_1_3_0/bigdata-rdf/src/test/com/bigdata/rdf/sparql/ast/eval/aggregate-min1.srx (rev 0)
+++ branches/BIGDATA_RELEASE_1_3_0/bigdata-rdf/src/test/com/bigdata/rdf/sparql/ast/eval/aggregate-min1.srx 2013-10-10 00:34:02 UTC (rev 7445)
@@ -0,0 +1,17 @@
+<?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="m"/>
+ </head>
+ <results>
+ <result>
+ <binding name="m">
+ <literal
+ xml:lang="de">bigdata</literal>
+ </binding>
+ </result>
+ </results>
+</sparql>
Copied: branches/BIGDATA_RELEASE_1_3_0/bigdata-rdf/src/test/com/bigdata/rdf/sparql/ast/eval/aggregate-min2.rq (from rev 7444, branches/BIGDATA_RELEASE_1_3_0/bigdata-rdf/src/test/com/bigdata/rdf/sparql/ast/eval/aggregate-min.rq)
===================================================================
--- branches/BIGDATA_RELEASE_1_3_0/bigdata-rdf/src/test/com/bigdata/rdf/sparql/ast/eval/aggregate-min2.rq (rev 0)
+++ branches/BIGDATA_RELEASE_1_3_0/bigdata-rdf/src/test/com/bigdata/rdf/sparql/ast/eval/aggregate-min2.rq 2013-10-10 00:34:02 UTC (rev 7445)
@@ -0,0 +1,6 @@
+prefix : <http://example/>
+
+SELECT (MIN(?o) AS ?m)
+WHERE {
+ ?s ?p ?o
+}
Added: branches/BIGDATA_RELEASE_1_3_0/bigdata-rdf/src/test/com/bigdata/rdf/sparql/ast/eval/aggregate-min2.srx
===================================================================
--- branches/BIGDATA_RELEASE_1_3_0/bigdata-rdf/src/test/com/bigdata/rdf/sparql/ast/eval/aggregate-min2.srx (rev 0)
+++ branches/BIGDATA_RELEASE_1_3_0/bigdata-rdf/src/test/com/bigdata/rdf/sparql/ast/eval/aggregate-min2.srx 2013-10-10 00:34:02 UTC (rev 7445)
@@ -0,0 +1,14 @@
+<?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="m"/>
+ </head>
+ <results>
+ <result>
+ <binding name="m"><uri>http://example/x2</uri></binding>
+ </result>
+ </results>
+</sparql>
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|
|
From: <jer...@us...> - 2013-10-11 23:08:09
|
Revision: 7454
http://bigdata.svn.sourceforge.net/bigdata/?rev=7454&view=rev
Author: jeremy_carroll
Date: 2013-10-11 23:08:01 +0000 (Fri, 11 Oct 2013)
Log Message:
-----------
More tests for 736
Modified Paths:
--------------
branches/BIGDATA_RELEASE_1_3_0/bigdata-rdf/src/test/com/bigdata/rdf/sparql/ast/eval/TestTickets.java
Added Paths:
-----------
branches/BIGDATA_RELEASE_1_3_0/bigdata-rdf/src/test/com/bigdata/rdf/sparql/ast/eval/aggregate-max.rq
branches/BIGDATA_RELEASE_1_3_0/bigdata-rdf/src/test/com/bigdata/rdf/sparql/ast/eval/aggregate-max.srx
branches/BIGDATA_RELEASE_1_3_0/bigdata-rdf/src/test/com/bigdata/rdf/sparql/ast/eval/aggregate-max1.rq
branches/BIGDATA_RELEASE_1_3_0/bigdata-rdf/src/test/com/bigdata/rdf/sparql/ast/eval/aggregate-max1.srx
branches/BIGDATA_RELEASE_1_3_0/bigdata-rdf/src/test/com/bigdata/rdf/sparql/ast/eval/aggregate-max2.rq
branches/BIGDATA_RELEASE_1_3_0/bigdata-rdf/src/test/com/bigdata/rdf/sparql/ast/eval/aggregate-max2.srx
branches/BIGDATA_RELEASE_1_3_0/bigdata-rdf/src/test/com/bigdata/rdf/sparql/ast/eval/aggregate-min-max.ttl
branches/BIGDATA_RELEASE_1_3_0/bigdata-rdf/src/test/com/bigdata/rdf/sparql/ast/eval/aggregate-min.rq
branches/BIGDATA_RELEASE_1_3_0/bigdata-rdf/src/test/com/bigdata/rdf/sparql/ast/eval/aggregate-min.srx
branches/BIGDATA_RELEASE_1_3_0/bigdata-rdf/src/test/com/bigdata/rdf/sparql/ast/eval/aggregate-min1.rq
branches/BIGDATA_RELEASE_1_3_0/bigdata-rdf/src/test/com/bigdata/rdf/sparql/ast/eval/aggregate-min1.srx
branches/BIGDATA_RELEASE_1_3_0/bigdata-rdf/src/test/com/bigdata/rdf/sparql/ast/eval/aggregate-min2.rq
branches/BIGDATA_RELEASE_1_3_0/bigdata-rdf/src/test/com/bigdata/rdf/sparql/ast/eval/aggregate-min2.srx
Modified: branches/BIGDATA_RELEASE_1_3_0/bigdata-rdf/src/test/com/bigdata/rdf/sparql/ast/eval/TestTickets.java
===================================================================
--- branches/BIGDATA_RELEASE_1_3_0/bigdata-rdf/src/test/com/bigdata/rdf/sparql/ast/eval/TestTickets.java 2013-10-11 18:44:06 UTC (rev 7453)
+++ branches/BIGDATA_RELEASE_1_3_0/bigdata-rdf/src/test/com/bigdata/rdf/sparql/ast/eval/TestTickets.java 2013-10-11 23:08:01 UTC (rev 7454)
@@ -253,4 +253,76 @@
}
+
+ public void test_ticket_min736() throws Exception {
+
+ new TestHelper("aggregate-min",// testURI,
+ "aggregate-min.rq",// queryFileURL
+ "aggregate-min-max.ttl",// dataFileURL
+ "aggregate-min.srx",// resultFileURL
+ false, // laxCardinality
+ true // checkOrder
+ ).runTest();
+
+ }
+
+ public void test_ticket_max736() throws Exception {
+
+ new TestHelper("aggregate-max",// testURI,
+ "aggregate-max.rq",// queryFileURL
+ "aggregate-min-max.ttl",// dataFileURL
+ "aggregate-max.srx",// resultFileURL
+ false, // laxCardinality
+ true // checkOrder
+ ).runTest();
+
+ }
+
+ public void test_ticket_min736_1() throws Exception {
+
+ new TestHelper("aggregate-min1",// testURI,
+ "aggregate-min1.rq",// queryFileURL
+ "aggregate-min-max.ttl",// dataFileURL
+ "aggregate-min1.srx",// resultFileURL
+ false, // laxCardinality
+ true // checkOrder
+ ).runTest();
+
+ }
+
+ public void test_ticket_max736_1() throws Exception {
+
+ new TestHelper("aggregate-max1",// testURI,
+ "aggregate-max1.rq",// queryFileURL
+ "aggregate-min-max.ttl",// dataFileURL
+ "aggregate-max1.srx",// resultFileURL
+ false, // laxCardinality
+ true // checkOrder
+ ).runTest();
+
+ }
+
+ public void test_ticket_min736_2() throws Exception {
+
+ new TestHelper("aggregate-min2",// testURI,
+ "aggregate-min2.rq",// queryFileURL
+ "aggregate-min-max.ttl",// dataFileURL
+ "aggregate-min2.srx",// resultFileURL
+ false, // laxCardinality
+ true // checkOrder
+ ).runTest();
+
+ }
+
+ public void test_ticket_max736_2() throws Exception {
+
+ new TestHelper("aggregate-max2",// testURI,
+ "aggregate-max2.rq",// queryFileURL
+ "aggregate-min-max.ttl",// dataFileURL
+ "aggregate-max2.srx",// resultFileURL
+ false, // laxCardinality
+ true // checkOrder
+ ).runTest();
+
+ }
}
Added: branches/BIGDATA_RELEASE_1_3_0/bigdata-rdf/src/test/com/bigdata/rdf/sparql/ast/eval/aggregate-max.rq
===================================================================
--- branches/BIGDATA_RELEASE_1_3_0/bigdata-rdf/src/test/com/bigdata/rdf/sparql/ast/eval/aggregate-max.rq (rev 0)
+++ branches/BIGDATA_RELEASE_1_3_0/bigdata-rdf/src/test/com/bigdata/rdf/sparql/ast/eval/aggregate-max.rq 2013-10-11 23:08:01 UTC (rev 7454)
@@ -0,0 +1,8 @@
+
+prefix : <http://example/>
+
+SELECT (MAX(?o) AS ?m)
+WHERE {
+ ?s :p ?o
+}
+
Added: branches/BIGDATA_RELEASE_1_3_0/bigdata-rdf/src/test/com/bigdata/rdf/sparql/ast/eval/aggregate-max.srx
===================================================================
--- branches/BIGDATA_RELEASE_1_3_0/bigdata-rdf/src/test/com/bigdata/rdf/sparql/ast/eval/aggregate-max.srx (rev 0)
+++ branches/BIGDATA_RELEASE_1_3_0/bigdata-rdf/src/test/com/bigdata/rdf/sparql/ast/eval/aggregate-max.srx 2013-10-11 23:08:01 UTC (rev 7454)
@@ -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="m"/>
+ </head>
+ <results>
+ <result>
+ <binding name="m">
+ <literal datatype="http://www.w3.org/2001/XMLSchema#integer">3</literal>
+ </binding>
+ </result>
+ </results>
+</sparql>
Added: branches/BIGDATA_RELEASE_1_3_0/bigdata-rdf/src/test/com/bigdata/rdf/sparql/ast/eval/aggregate-max1.rq
===================================================================
--- branches/BIGDATA_RELEASE_1_3_0/bigdata-rdf/src/test/com/bigdata/rdf/sparql/ast/eval/aggregate-max1.rq (rev 0)
+++ branches/BIGDATA_RELEASE_1_3_0/bigdata-rdf/src/test/com/bigdata/rdf/sparql/ast/eval/aggregate-max1.rq 2013-10-11 23:08:01 UTC (rev 7454)
@@ -0,0 +1,8 @@
+
+prefix : <http://example/>
+
+SELECT (MAX(?o) AS ?m)
+WHERE {
+ ?s :q ?o
+}
+
Added: branches/BIGDATA_RELEASE_1_3_0/bigdata-rdf/src/test/com/bigdata/rdf/sparql/ast/eval/aggregate-max1.srx
===================================================================
--- branches/BIGDATA_RELEASE_1_3_0/bigdata-rdf/src/test/com/bigdata/rdf/sparql/ast/eval/aggregate-max1.srx (rev 0)
+++ branches/BIGDATA_RELEASE_1_3_0/bigdata-rdf/src/test/com/bigdata/rdf/sparql/ast/eval/aggregate-max1.srx 2013-10-11 23:08:01 UTC (rev 7454)
@@ -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="m"/>
+ </head>
+ <results>
+ <result>
+ <binding name="m">
+ <literal xml:lang="en">bigdata</literal>
+ </binding>
+ </result>
+ </results>
+</sparql>
Added: branches/BIGDATA_RELEASE_1_3_0/bigdata-rdf/src/test/com/bigdata/rdf/sparql/ast/eval/aggregate-max2.rq
===================================================================
--- branches/BIGDATA_RELEASE_1_3_0/bigdata-rdf/src/test/com/bigdata/rdf/sparql/ast/eval/aggregate-max2.rq (rev 0)
+++ branches/BIGDATA_RELEASE_1_3_0/bigdata-rdf/src/test/com/bigdata/rdf/sparql/ast/eval/aggregate-max2.rq 2013-10-11 23:08:01 UTC (rev 7454)
@@ -0,0 +1,8 @@
+
+prefix : <http://example/>
+
+SELECT (MAX(?o) AS ?m)
+WHERE {
+ ?s ?p ?o
+}
+
Added: branches/BIGDATA_RELEASE_1_3_0/bigdata-rdf/src/test/com/bigdata/rdf/sparql/ast/eval/aggregate-max2.srx
===================================================================
--- branches/BIGDATA_RELEASE_1_3_0/bigdata-rdf/src/test/com/bigdata/rdf/sparql/ast/eval/aggregate-max2.srx (rev 0)
+++ branches/BIGDATA_RELEASE_1_3_0/bigdata-rdf/src/test/com/bigdata/rdf/sparql/ast/eval/aggregate-max2.srx 2013-10-11 23:08:01 UTC (rev 7454)
@@ -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="m"/>
+ </head>
+ <results>
+ <result>
+ <binding name="m">
+ <literal datatype="http://www.w3.org/2001/XMLSchema#integer">3</literal>
+ </binding>
+ </result>
+ </results>
+</sparql>
Added: branches/BIGDATA_RELEASE_1_3_0/bigdata-rdf/src/test/com/bigdata/rdf/sparql/ast/eval/aggregate-min-max.ttl
===================================================================
--- branches/BIGDATA_RELEASE_1_3_0/bigdata-rdf/src/test/com/bigdata/rdf/sparql/ast/eval/aggregate-min-max.ttl (rev 0)
+++ branches/BIGDATA_RELEASE_1_3_0/bigdata-rdf/src/test/com/bigdata/rdf/sparql/ast/eval/aggregate-min-max.ttl 2013-10-11 23:08:01 UTC (rev 7454)
@@ -0,0 +1,10 @@
+@prefix : <http://example/> .
+
+:x1 :p 1.5 .
+:x1 :p 3 .
+:x1 :p :x2 .
+:x1 :q "bigdata"@en.
+:x1 :q "bigdata"@de.
+:x1 :r <http://www.bigdata.com/blog/> .
+
+
Added: branches/BIGDATA_RELEASE_1_3_0/bigdata-rdf/src/test/com/bigdata/rdf/sparql/ast/eval/aggregate-min.rq
===================================================================
--- branches/BIGDATA_RELEASE_1_3_0/bigdata-rdf/src/test/com/bigdata/rdf/sparql/ast/eval/aggregate-min.rq (rev 0)
+++ branches/BIGDATA_RELEASE_1_3_0/bigdata-rdf/src/test/com/bigdata/rdf/sparql/ast/eval/aggregate-min.rq 2013-10-11 23:08:01 UTC (rev 7454)
@@ -0,0 +1,6 @@
+prefix : <http://example/>
+
+SELECT (MIN(?o) AS ?m)
+WHERE {
+ ?s :p ?o
+}
Added: branches/BIGDATA_RELEASE_1_3_0/bigdata-rdf/src/test/com/bigdata/rdf/sparql/ast/eval/aggregate-min.srx
===================================================================
--- branches/BIGDATA_RELEASE_1_3_0/bigdata-rdf/src/test/com/bigdata/rdf/sparql/ast/eval/aggregate-min.srx (rev 0)
+++ branches/BIGDATA_RELEASE_1_3_0/bigdata-rdf/src/test/com/bigdata/rdf/sparql/ast/eval/aggregate-min.srx 2013-10-11 23:08:01 UTC (rev 7454)
@@ -0,0 +1,14 @@
+<?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="m"/>
+ </head>
+ <results>
+ <result>
+ <binding name="m"><uri>http://example/x2</uri></binding>
+ </result>
+ </results>
+</sparql>
Added: branches/BIGDATA_RELEASE_1_3_0/bigdata-rdf/src/test/com/bigdata/rdf/sparql/ast/eval/aggregate-min1.rq
===================================================================
--- branches/BIGDATA_RELEASE_1_3_0/bigdata-rdf/src/test/com/bigdata/rdf/sparql/ast/eval/aggregate-min1.rq (rev 0)
+++ branches/BIGDATA_RELEASE_1_3_0/bigdata-rdf/src/test/com/bigdata/rdf/sparql/ast/eval/aggregate-min1.rq 2013-10-11 23:08:01 UTC (rev 7454)
@@ -0,0 +1,6 @@
+prefix : <http://example/>
+
+SELECT (MIN(?o) AS ?m)
+WHERE {
+ ?s :q ?o
+}
Added: branches/BIGDATA_RELEASE_1_3_0/bigdata-rdf/src/test/com/bigdata/rdf/sparql/ast/eval/aggregate-min1.srx
===================================================================
--- branches/BIGDATA_RELEASE_1_3_0/bigdata-rdf/src/test/com/bigdata/rdf/sparql/ast/eval/aggregate-min1.srx (rev 0)
+++ branches/BIGDATA_RELEASE_1_3_0/bigdata-rdf/src/test/com/bigdata/rdf/sparql/ast/eval/aggregate-min1.srx 2013-10-11 23:08:01 UTC (rev 7454)
@@ -0,0 +1,17 @@
+<?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="m"/>
+ </head>
+ <results>
+ <result>
+ <binding name="m">
+ <literal
+ xml:lang="de">bigdata</literal>
+ </binding>
+ </result>
+ </results>
+</sparql>
Added: branches/BIGDATA_RELEASE_1_3_0/bigdata-rdf/src/test/com/bigdata/rdf/sparql/ast/eval/aggregate-min2.rq
===================================================================
--- branches/BIGDATA_RELEASE_1_3_0/bigdata-rdf/src/test/com/bigdata/rdf/sparql/ast/eval/aggregate-min2.rq (rev 0)
+++ branches/BIGDATA_RELEASE_1_3_0/bigdata-rdf/src/test/com/bigdata/rdf/sparql/ast/eval/aggregate-min2.rq 2013-10-11 23:08:01 UTC (rev 7454)
@@ -0,0 +1,6 @@
+prefix : <http://example/>
+
+SELECT (MIN(?o) AS ?m)
+WHERE {
+ ?s ?p ?o
+}
Added: branches/BIGDATA_RELEASE_1_3_0/bigdata-rdf/src/test/com/bigdata/rdf/sparql/ast/eval/aggregate-min2.srx
===================================================================
--- branches/BIGDATA_RELEASE_1_3_0/bigdata-rdf/src/test/com/bigdata/rdf/sparql/ast/eval/aggregate-min2.srx (rev 0)
+++ branches/BIGDATA_RELEASE_1_3_0/bigdata-rdf/src/test/com/bigdata/rdf/sparql/ast/eval/aggregate-min2.srx 2013-10-11 23:08:01 UTC (rev 7454)
@@ -0,0 +1,14 @@
+<?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="m"/>
+ </head>
+ <results>
+ <result>
+ <binding name="m"><uri>http://example/x2</uri></binding>
+ </result>
+ </results>
+</sparql>
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|
|
From: <tho...@us...> - 2014-01-07 18:28:32
|
Revision: 7743
http://bigdata.svn.sourceforge.net/bigdata/?rev=7743&view=rev
Author: thompsonbry
Date: 2014-01-07 18:28:20 +0000 (Tue, 07 Jan 2014)
Log Message:
-----------
Beginnings of test suite for the RTO. This test suite does not yet run in CI. See #64 (RTO).
Added Paths:
-----------
branches/BIGDATA_RELEASE_1_3_0/bigdata-rdf/src/test/com/bigdata/rdf/sparql/ast/eval/rto/
branches/BIGDATA_RELEASE_1_3_0/bigdata-rdf/src/test/com/bigdata/rdf/sparql/ast/eval/rto/AbstractRTOTestCase.java
branches/BIGDATA_RELEASE_1_3_0/bigdata-rdf/src/test/com/bigdata/rdf/sparql/ast/eval/rto/BAR-Q1.rq
branches/BIGDATA_RELEASE_1_3_0/bigdata-rdf/src/test/com/bigdata/rdf/sparql/ast/eval/rto/BAR-Q1.srx
branches/BIGDATA_RELEASE_1_3_0/bigdata-rdf/src/test/com/bigdata/rdf/sparql/ast/eval/rto/BSBM-Q1.rq
branches/BIGDATA_RELEASE_1_3_0/bigdata-rdf/src/test/com/bigdata/rdf/sparql/ast/eval/rto/BSBM-Q1.srx
branches/BIGDATA_RELEASE_1_3_0/bigdata-rdf/src/test/com/bigdata/rdf/sparql/ast/eval/rto/BSBM-Q10.rq
branches/BIGDATA_RELEASE_1_3_0/bigdata-rdf/src/test/com/bigdata/rdf/sparql/ast/eval/rto/BSBM-Q10.srx
branches/BIGDATA_RELEASE_1_3_0/bigdata-rdf/src/test/com/bigdata/rdf/sparql/ast/eval/rto/BSBM-Q2.rq
branches/BIGDATA_RELEASE_1_3_0/bigdata-rdf/src/test/com/bigdata/rdf/sparql/ast/eval/rto/BSBM-Q2.srx
branches/BIGDATA_RELEASE_1_3_0/bigdata-rdf/src/test/com/bigdata/rdf/sparql/ast/eval/rto/BSBM-Q3.rq
branches/BIGDATA_RELEASE_1_3_0/bigdata-rdf/src/test/com/bigdata/rdf/sparql/ast/eval/rto/BSBM-Q3.srx
branches/BIGDATA_RELEASE_1_3_0/bigdata-rdf/src/test/com/bigdata/rdf/sparql/ast/eval/rto/BSBM-Q4.rq
branches/BIGDATA_RELEASE_1_3_0/bigdata-rdf/src/test/com/bigdata/rdf/sparql/ast/eval/rto/BSBM-Q4.srx
branches/BIGDATA_RELEASE_1_3_0/bigdata-rdf/src/test/com/bigdata/rdf/sparql/ast/eval/rto/BSBM-Q5.rq
branches/BIGDATA_RELEASE_1_3_0/bigdata-rdf/src/test/com/bigdata/rdf/sparql/ast/eval/rto/BSBM-Q5.srx
branches/BIGDATA_RELEASE_1_3_0/bigdata-rdf/src/test/com/bigdata/rdf/sparql/ast/eval/rto/BSBM-Q7.rq
branches/BIGDATA_RELEASE_1_3_0/bigdata-rdf/src/test/com/bigdata/rdf/sparql/ast/eval/rto/BSBM-Q7.srx
branches/BIGDATA_RELEASE_1_3_0/bigdata-rdf/src/test/com/bigdata/rdf/sparql/ast/eval/rto/BSBM-Q8.rq
branches/BIGDATA_RELEASE_1_3_0/bigdata-rdf/src/test/com/bigdata/rdf/sparql/ast/eval/rto/BSBM-Q8.srx
branches/BIGDATA_RELEASE_1_3_0/bigdata-rdf/src/test/com/bigdata/rdf/sparql/ast/eval/rto/LUBM-Q2.rq
branches/BIGDATA_RELEASE_1_3_0/bigdata-rdf/src/test/com/bigdata/rdf/sparql/ast/eval/rto/LUBM-Q2.srx
branches/BIGDATA_RELEASE_1_3_0/bigdata-rdf/src/test/com/bigdata/rdf/sparql/ast/eval/rto/LUBM-Q8.rq
branches/BIGDATA_RELEASE_1_3_0/bigdata-rdf/src/test/com/bigdata/rdf/sparql/ast/eval/rto/LUBM-Q8.srx
branches/BIGDATA_RELEASE_1_3_0/bigdata-rdf/src/test/com/bigdata/rdf/sparql/ast/eval/rto/LUBM-Q9.rq
branches/BIGDATA_RELEASE_1_3_0/bigdata-rdf/src/test/com/bigdata/rdf/sparql/ast/eval/rto/LUBM-Q9.srx
branches/BIGDATA_RELEASE_1_3_0/bigdata-rdf/src/test/com/bigdata/rdf/sparql/ast/eval/rto/LUBM-U1.rdf
branches/BIGDATA_RELEASE_1_3_0/bigdata-rdf/src/test/com/bigdata/rdf/sparql/ast/eval/rto/LUBM-U1.rdf.gz
branches/BIGDATA_RELEASE_1_3_0/bigdata-rdf/src/test/com/bigdata/rdf/sparql/ast/eval/rto/TestAll.java
branches/BIGDATA_RELEASE_1_3_0/bigdata-rdf/src/test/com/bigdata/rdf/sparql/ast/eval/rto/TestRTO_BAR.java
branches/BIGDATA_RELEASE_1_3_0/bigdata-rdf/src/test/com/bigdata/rdf/sparql/ast/eval/rto/TestRTO_BSBM.java
branches/BIGDATA_RELEASE_1_3_0/bigdata-rdf/src/test/com/bigdata/rdf/sparql/ast/eval/rto/TestRTO_LUBM.java
Added: branches/BIGDATA_RELEASE_1_3_0/bigdata-rdf/src/test/com/bigdata/rdf/sparql/ast/eval/rto/AbstractRTOTestCase.java
===================================================================
--- branches/BIGDATA_RELEASE_1_3_0/bigdata-rdf/src/test/com/bigdata/rdf/sparql/ast/eval/rto/AbstractRTOTestCase.java (rev 0)
+++ branches/BIGDATA_RELEASE_1_3_0/bigdata-rdf/src/test/com/bigdata/rdf/sparql/ast/eval/rto/AbstractRTOTestCase.java 2014-01-07 18:28:20 UTC (rev 7743)
@@ -0,0 +1,211 @@
+/**
+
+Copyright (C) SYSTAP, LLC 2006-2011. 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
+*/
+/*
+ * Created on Sep 4, 2011
+ */
+
+package com.bigdata.rdf.sparql.ast.eval.rto;
+
+import java.util.Arrays;
+import java.util.UUID;
+
+import org.apache.log4j.Logger;
+
+import com.bigdata.bop.BOpUtility;
+import com.bigdata.bop.PipelineOp;
+import com.bigdata.bop.engine.IRunningQuery;
+import com.bigdata.bop.engine.QueryEngine;
+import com.bigdata.bop.engine.QueryEngine.IRunningQueryListener;
+import com.bigdata.bop.fed.QueryEngineFactory;
+import com.bigdata.bop.joinGraph.rto.JGraph;
+import com.bigdata.bop.joinGraph.rto.JoinGraph;
+import com.bigdata.bop.joinGraph.rto.Path;
+import com.bigdata.bop.rdf.joinGraph.TestJoinGraphOnLubm;
+import com.bigdata.journal.IBTreeManager;
+import com.bigdata.rdf.sparql.ast.ASTContainer;
+import com.bigdata.rdf.sparql.ast.QueryHints;
+import com.bigdata.rdf.sparql.ast.eval.AbstractDataDrivenSPARQLTestCase;
+import com.bigdata.rdf.sparql.ast.optimizers.IASTOptimizer;
+
+/**
+ * Data driven test suite for the Runtime Query Optimizer (RTO).
+ * <p>
+ * Note: We reduce the stochastic behavior of the algorithm by using non-random
+ * sampling techniques. However, the main correctness issues for the RTO are the
+ * handling of different kinds of join groups, not the specific join orderings
+ * that it produces. The join orderings depend on how the cutoff joins are
+ * sampled.
+ *
+ * @author <a href="mailto:tho...@us...">Bryan Thompson</a>
+ * @version $Id: TestBasicQuery.java 6440 2012-08-14 17:57:33Z thompsonbry $
+ *
+ * @see JGraph
+ * @see JoinGraph
+ * @see <a href="https://sourceforge.net/apps/trac/bigdata/ticket/64">Runtime
+ * Query Optimization</a>
+ * @see <a href="https://sourceforge.net/apps/trac/bigdata/ticket/258">Integrate
+ * RTO into SAIL</a>
+ *
+ * TODO See the stubbed out test suite for the RTO for some examples of
+ * join groups that it should be handling.
+ *
+ * TODO The RTO also needs to handle FILTERs that require materialization.
+ * This should be the subject of a test suite.
+ *
+ * TODO The RTO should be extended (together with test coverage) to handle
+ * more interesting kinds of join groups (optionls, sub-selects, property
+ * paths, SERVICE calls, etc).
+ * <p>
+ * Note: When handling sub-groups, etc., the RTO needs to flow solutions
+ * into the sub-query.
+ *
+ * TODO When adding an {@link IASTOptimizer} for the RTO, modify this class
+ * to test for the inclusion of the JoinGraphNode for the RTO.
+ *
+ * TODO Automate the larger data scale tests on these data sets as part of
+ * CI and provide automated reporting over time on those performance runs.
+ * Once this is done, there will be no more reason to keep the older
+ * {@link TestJoinGraphOnLubm} and related tests.
+ */
+public class AbstractRTOTestCase extends AbstractDataDrivenSPARQLTestCase {
+
+ private final static Logger log = Logger.getLogger(AbstractRTOTestCase.class);
+
+ /**
+ *
+ */
+ public AbstractRTOTestCase() {
+ }
+
+ /**
+ * @param name
+ */
+ public AbstractRTOTestCase(String name) {
+ super(name);
+ }
+
+ /**
+ * Helper class supports inspection of the terminated {@link IRunningQuery}.
+ *
+ * @author <a href="mailto:tho...@us...">Bryan
+ * Thompson</a>
+ */
+ protected static class MyQueryListener implements IRunningQueryListener {
+
+ private final UUID queryId;
+ private volatile IRunningQuery q;
+
+ public MyQueryListener(final UUID queryId) {
+
+ if(queryId == null)
+ throw new IllegalArgumentException();
+
+ this.queryId = queryId;
+
+ }
+
+ @Override
+ public void notify(final IRunningQuery q) {
+
+ if(q.getQueryId().equals(queryId)) {
+
+ this.q = q;
+
+ }
+
+ }
+
+ public IRunningQuery getRunningQuery() {
+
+ final IRunningQuery q = this.q;
+
+ if (q == null)
+ fail("Not found.");
+
+ return q;
+
+ }
+
+ }
+
+ /**
+ * Helper to run the test and examine the RTO determined solution.
+ *
+ * @param expected
+ * The expected join ordering.
+ * @param helper
+ */
+ protected void assertSameJoinOrder(final int[] expected,
+ final TestHelper helper) throws Exception {
+
+ /*
+ * Assign a UUID to this query so we can get at its outcome.
+ */
+ final UUID queryId = UUID.randomUUID();
+
+ helper.getASTContainer().setQueryHint(QueryHints.QUERYID,
+ queryId.toString());
+
+ final QueryEngine queryEngine = QueryEngineFactory
+ .getExistingQueryController((IBTreeManager) helper
+ .getTripleStore().getIndexManager());
+
+ // Hook up our listener and run the test.
+ final ASTContainer astContainer;
+ final MyQueryListener l = new MyQueryListener(queryId);
+ try {
+ // Register the listener.
+ queryEngine.addListener(l);
+ // Run the test.
+ astContainer = helper.runTest();
+ } finally {
+ // Unregister the listener.
+ queryEngine.removeListener(l);
+ }
+
+// final QueryRoot optimizedAST = astContainer.getOptimizedAST();
+
+ final PipelineOp queryPlan = astContainer.getQueryPlan();
+
+ final JoinGraph joinGraph = BOpUtility.getOnly(queryPlan,
+ JoinGraph.class);
+
+ assertNotNull(joinGraph);
+
+ // The join path selected by the RTO.
+ final Path path = joinGraph.getPath(l.getRunningQuery());
+
+ if (log.isInfoEnabled())
+ log.info("path=" + path);
+
+ if (!Arrays.equals(expected, path.getVertexIds()))
+ fail("RTO JOIN ORDER" //
+ + ": expected=" + Arrays.toString(expected)//
+ + ", actual=" + Arrays.toString(path.getVertexIds()));
+
+ // joinGraph.getQueryPlan(q)
+
+ }
+
+}
Added: branches/BIGDATA_RELEASE_1_3_0/bigdata-rdf/src/test/com/bigdata/rdf/sparql/ast/eval/rto/BAR-Q1.rq
===================================================================
--- branches/BIGDATA_RELEASE_1_3_0/bigdata-rdf/src/test/com/bigdata/rdf/sparql/ast/eval/rto/BAR-Q1.rq (rev 0)
+++ branches/BIGDATA_RELEASE_1_3_0/bigdata-rdf/src/test/com/bigdata/rdf/sparql/ast/eval/rto/BAR-Q1.rq 2014-01-07 18:28:20 UTC (rev 7743)
@@ -0,0 +1,17 @@
+PREFIX : <http://test/bar#>
+#SELECT ?employeeNum (COUNT(?type) AS ?total)
+SELECT (COUNT(*) as ?count)
+WHERE {
+ # Control all RTO parameters for repeatable behavior.
+ hint:Group hint:optimizer "Runtime".
+ hint:Group hint:RTO-sampleType "DENSE".
+ hint:Group hint:RTO-limit "100".
+ hint:Group hint:RTO-nedges "1".
+ ?order a <http://test/bar#Order> .
+ ?order <http://test/bar#orderItems> ?item .
+ ?item <http://test/bar#beverageType> "Beer" .
+ ?item <http://test/bar#beverageType> ?type .
+ ?order <http://test/bar#employee> ?employee .
+ ?employee <http://test/bar#employeeNum> ?employeeNum .
+}
+#GROUP BY ?employeeNum
Added: branches/BIGDATA_RELEASE_1_3_0/bigdata-rdf/src/test/com/bigdata/rdf/sparql/ast/eval/rto/BAR-Q1.srx
===================================================================
--- branches/BIGDATA_RELEASE_1_3_0/bigdata-rdf/src/test/com/bigdata/rdf/sparql/ast/eval/rto/BAR-Q1.srx (rev 0)
+++ branches/BIGDATA_RELEASE_1_3_0/bigdata-rdf/src/test/com/bigdata/rdf/sparql/ast/eval/rto/BAR-Q1.srx 2014-01-07 18:28:20 UTC (rev 7743)
@@ -0,0 +1,14 @@
+<?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="count" />
+ </head>
+ <results>
+ <result>
+ <binding name="count">
+ <literal datatype="http://www.w3.org/2001/XMLSchema#integer">8039</literal>
+ </binding>
+ </result>
+ </results>
+</sparql>
Added: branches/BIGDATA_RELEASE_1_3_0/bigdata-rdf/src/test/com/bigdata/rdf/sparql/ast/eval/rto/BSBM-Q1.rq
===================================================================
--- branches/BIGDATA_RELEASE_1_3_0/bigdata-rdf/src/test/com/bigdata/rdf/sparql/ast/eval/rto/BSBM-Q1.rq (rev 0)
+++ branches/BIGDATA_RELEASE_1_3_0/bigdata-rdf/src/test/com/bigdata/rdf/sparql/ast/eval/rto/BSBM-Q1.rq 2014-01-07 18:28:20 UTC (rev 7743)
@@ -0,0 +1,26 @@
+# BSBM Q1 on pc100.
+
+PREFIX bsbm-inst: <http://www4.wiwiss.fu-berlin.de/bizer/bsbm/v01/instances/>
+PREFIX bsbm: <http://www4.wiwiss.fu-berlin.de/bizer/bsbm/v01/vocabulary/>
+PREFIX rdfs: <http://www.w3.org/2000/01/rdf-schema#>
+PREFIX rdf: <http://www.w3.org/1999/02/22-rdf-syntax-ns#>
+
+SELECT (COUNT(DISTINCT *) as ?count)
+#SELECT DISTINCT ?product ?label
+WHERE {
+
+ # Control all RTO parameters for repeatable behavior.
+ hint:Query hint:optimizer "Runtime".
+ hint:Query hint:RTO-sampleType "DENSE".
+ hint:Query hint:RTO-limit "100".
+ hint:Query hint:RTO-nedges "1".
+
+ ?product rdfs:label ?label .
+ ?product a <http://www4.wiwiss.fu-berlin.de/bizer/bsbm/v01/instances/ProductType7> .
+ ?product bsbm:productFeature <http://www4.wiwiss.fu-berlin.de/bizer/bsbm/v01/instances/ProductFeature33> .
+ ?product bsbm:productFeature <http://www4.wiwiss.fu-berlin.de/bizer/bsbm/v01/instances/ProductFeature22> .
+ ?product bsbm:productPropertyNumeric1 ?value1 .
+ FILTER (?value1 > 282)
+ }
+ORDER BY ?label
+LIMIT 10
Added: branches/BIGDATA_RELEASE_1_3_0/bigdata-rdf/src/test/com/bigdata/rdf/sparql/ast/eval/rto/BSBM-Q1.srx
===================================================================
--- branches/BIGDATA_RELEASE_1_3_0/bigdata-rdf/src/test/com/bigdata/rdf/sparql/ast/eval/rto/BSBM-Q1.srx (rev 0)
+++ branches/BIGDATA_RELEASE_1_3_0/bigdata-rdf/src/test/com/bigdata/rdf/sparql/ast/eval/rto/BSBM-Q1.srx 2014-01-07 18:28:20 UTC (rev 7743)
@@ -0,0 +1,14 @@
+<?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="count" />
+ </head>
+ <results>
+ <result>
+ <binding name="count">
+ <literal datatype="http://www.w3.org/2001/XMLSchema#integer">1</literal>
+ </binding>
+ </result>
+ </results>
+</sparql>
Added: branches/BIGDATA_RELEASE_1_3_0/bigdata-rdf/src/test/com/bigdata/rdf/sparql/ast/eval/rto/BSBM-Q10.rq
===================================================================
--- branches/BIGDATA_RELEASE_1_3_0/bigdata-rdf/src/test/com/bigdata/rdf/sparql/ast/eval/rto/BSBM-Q10.rq (rev 0)
+++ branches/BIGDATA_RELEASE_1_3_0/bigdata-rdf/src/test/com/bigdata/rdf/sparql/ast/eval/rto/BSBM-Q10.rq 2014-01-07 18:28:20 UTC (rev 7743)
@@ -0,0 +1,27 @@
+# BSBM Q10 on pc100.
+
+PREFIX bsbm: <http://www4.wiwiss.fu-berlin.de/bizer/bsbm/v01/vocabulary/>
+PREFIX xsd: <http://www.w3.org/2001/XMLSchema#>
+PREFIX dc: <http://purl.org/dc/elements/1.1/>
+
+SELECT DISTINCT ?offer ?price
+WHERE {
+
+ # Control all RTO parameters for repeatable behavior.
+ hint:Query hint:optimizer "Runtime".
+ hint:Query hint:RTO-sampleType "DENSE".
+ hint:Query hint:RTO-limit "100".
+ hint:Query hint:RTO-nedges "1".
+
+ ?offer bsbm:product <http://www4.wiwiss.fu-berlin.de/bizer/bsbm/v01/instances/dataFromProducer1/Product27> .
+ ?offer bsbm:vendor ?vendor .
+ ?offer dc:publisher ?vendor .
+ ?vendor bsbm:country <http://downlode.org/rdf/iso-3166/countries#US> .
+ ?offer bsbm:deliveryDays ?deliveryDays .
+ FILTER (?deliveryDays <= 3)
+ ?offer bsbm:price ?price .
+ ?offer bsbm:validTo ?date .
+ FILTER (?date > "2008-06-20T00:00:00"^^<http://www.w3.org/2001/XMLSchema#dateTime> )
+}
+ORDER BY xsd:double(str(?price))
+LIMIT 10
Added: branches/BIGDATA_RELEASE_1_3_0/bigdata-rdf/src/test/com/bigdata/rdf/sparql/ast/eval/rto/BSBM-Q10.srx
===================================================================
--- branches/BIGDATA_RELEASE_1_3_0/bigdata-rdf/src/test/com/bigdata/rdf/sparql/ast/eval/rto/BSBM-Q10.srx (rev 0)
+++ branches/BIGDATA_RELEASE_1_3_0/bigdata-rdf/src/test/com/bigdata/rdf/sparql/ast/eval/rto/BSBM-Q10.srx 2014-01-07 18:28:20 UTC (rev 7743)
@@ -0,0 +1,66 @@
+<?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="offer" />
+ <variable name="price" />
+ </head>
+ <results>
+ <result>
+ <binding name="offer">
+ <uri>http://www4.wiwiss.fu-berlin.de/bizer/bsbm/v01/instances/dataFromVendor1/Offer1780</uri>
+ </binding>
+ <binding name="price">
+ <literal datatype="http://www4.wiwiss.fu-berlin.de/bizer/bsbm/v01/vocabulary/USD">400.97</literal>
+ </binding>
+ </result>
+ <result>
+ <binding name="offer">
+ <uri>http://www4.wiwiss.fu-berlin.de/bizer/bsbm/v01/instances/dataFromVendor1/Offer1257</uri>
+ </binding>
+ <binding name="price">
+ <literal datatype="http://www4.wiwiss.fu-berlin.de/bizer/bsbm/v01/vocabulary/USD">2512.78</literal>
+ </binding>
+ </result>
+ <result>
+ <binding name="offer">
+ <uri>http://www4.wiwiss.fu-berlin.de/bizer/bsbm/v01/instances/dataFromVendor1/Offer1138</uri>
+ </binding>
+ <binding name="price">
+ <literal datatype="http://www4.wiwiss.fu-berlin.de/bizer/bsbm/v01/vocabulary/USD">2570.83</literal>
+ </binding>
+ </result>
+ <result>
+ <binding name="offer">
+ <uri>http://www4.wiwiss.fu-berlin.de/bizer/bsbm/v01/instances/dataFromVendor1/Offer997</uri>
+ </binding>
+ <binding name="price">
+ <literal datatype="http://www4.wiwiss.fu-berlin.de/bizer/bsbm/v01/vocabulary/USD">2590.78</literal>
+ </binding>
+ </result>
+ <result>
+ <binding name="offer">
+ <uri>http://www4.wiwiss.fu-berlin.de/bizer/bsbm/v01/instances/dataFromVendor1/Offer233</uri>
+ </binding>
+ <binding name="price">
+ <literal datatype="http://www4.wiwiss.fu-berlin.de/bizer/bsbm/v01/vocabulary/USD">2701.29</literal>
+ </binding>
+ </result>
+ <result>
+ <binding name="offer">
+ <uri>http://www4.wiwiss.fu-berlin.de/bizer/bsbm/v01/instances/dataFromVendor1/Offer1636</uri>
+ </binding>
+ <binding name="price">
+ <literal datatype="http://www4.wiwiss.fu-berlin.de/bizer/bsbm/v01/vocabulary/USD">9227.48</literal>
+ </binding>
+ </result>
+ <result>
+ <binding name="offer">
+ <uri>http://www4.wiwiss.fu-berlin.de/bizer/bsbm/v01/instances/dataFromVendor1/Offer573</uri>
+ </binding>
+ <binding name="price">
+ <literal datatype="http://www4.wiwiss.fu-berlin.de/bizer/bsbm/v01/vocabulary/USD">9279.54</literal>
+ </binding>
+ </result>
+ </results>
+</sparql>
Added: branches/BIGDATA_RELEASE_1_3_0/bigdata-rdf/src/test/com/bigdata/rdf/sparql/ast/eval/rto/BSBM-Q2.rq
===================================================================
--- branches/BIGDATA_RELEASE_1_3_0/bigdata-rdf/src/test/com/bigdata/rdf/sparql/ast/eval/rto/BSBM-Q2.rq (rev 0)
+++ branches/BIGDATA_RELEASE_1_3_0/bigdata-rdf/src/test/com/bigdata/rdf/sparql/ast/eval/rto/BSBM-Q2.rq 2014-01-07 18:28:20 UTC (rev 7743)
@@ -0,0 +1,34 @@
+# BSBM Q2 on pc100.
+
+PREFIX bsbm-inst: <http://www4.wiwiss.fu-berlin.de/bizer/bsbm/v01/instances/>
+PREFIX bsbm: <http://www4.wiwiss.fu-berlin.de/bizer/bsbm/v01/vocabulary/>
+PREFIX rdfs: <http://www.w3.org/2000/01/rdf-schema#>
+PREFIX dc: <http://purl.org/dc/elements/1.1/>
+
+SELECT (COUNT(*) as ?count)
+#SELECT ?label ?comment ?producer ?productFeature ?propertyTextual1 ?propertyTextual2 ?propertyTextual3
+# ?propertyNumeric1 ?propertyNumeric2 ?propertyTextual4 ?propertyTextual5 ?propertyNumeric4
+WHERE {
+
+ # Control all RTO parameters for repeatable behavior.
+ hint:Query hint:optimizer "Runtime".
+ hint:Query hint:RTO-sampleType "DENSE".
+ hint:Query hint:RTO-limit "100".
+ hint:Query hint:RTO-nedges "1".
+
+ <http://www4.wiwiss.fu-berlin.de/bizer/bsbm/v01/instances/dataFromProducer3/Product97> rdfs:label ?label .
+ <http://www4.wiwiss.fu-berlin.de/bizer/bsbm/v01/instances/dataFromProducer3/Product97> rdfs:comment ?comment .
+ <http://www4.wiwiss.fu-berlin.de/bizer/bsbm/v01/instances/dataFromProducer3/Product97> bsbm:producer ?p .
+ ?p rdfs:label ?producer .
+ <http://www4.wiwiss.fu-berlin.de/bizer/bsbm/v01/instances/dataFromProducer3/Product97> dc:publisher ?p .
+ <http://www4.wiwiss.fu-berlin.de/bizer/bsbm/v01/instances/dataFromProducer3/Product97> bsbm:productFeature ?f .
+ ?f rdfs:label ?productFeature .
+ <http://www4.wiwiss.fu-berlin.de/bizer/bsbm/v01/instances/dataFromProducer3/Product97> bsbm:productPropertyTextual1 ?propertyTextual1 .
+ <http://www4.wiwiss.fu-berlin.de/bizer/bsbm/v01/instances/dataFromProducer3/Product97> bsbm:productPropertyTextual2 ?propertyTextual2 .
+ <http://www4.wiwiss.fu-berlin.de/bizer/bsbm/v01/instances/dataFromProducer3/Product97> bsbm:productPropertyTextual3 ?propertyTextual3 .
+ <http://www4.wiwiss.fu-berlin.de/bizer/bsbm/v01/instances/dataFromProducer3/Product97> bsbm:productPropertyNumeric1 ?propertyNumeric1 .
+ <http://www4.wiwiss.fu-berlin.de/bizer/bsbm/v01/instances/dataFromProducer3/Product97> bsbm:productPropertyNumeric2 ?propertyNumeric2 .
+ OPTIONAL { <http://www4.wiwiss.fu-berlin.de/bizer/bsbm/v01/instances/dataFromProducer3/Product97> bsbm:productPropertyTextual4 ?propertyTextual4 }
+ OPTIONAL { <http://www4.wiwiss.fu-berlin.de/bizer/bsbm/v01/instances/dataFromProducer3/Product97> bsbm:productPropertyTextual5 ?propertyTextual5 }
+ OPTIONAL { <http://www4.wiwiss.fu-berlin.de/bizer/bsbm/v01/instances/dataFromProducer3/Product97> bsbm:productPropertyNumeric4 ?propertyNumeric4 }
+}
Added: branches/BIGDATA_RELEASE_1_3_0/bigdata-rdf/src/test/com/bigdata/rdf/sparql/ast/eval/rto/BSBM-Q2.srx
===================================================================
--- branches/BIGDATA_RELEASE_1_3_0/bigdata-rdf/src/test/com/bigdata/rdf/sparql/ast/eval/rto/BSBM-Q2.srx (rev 0)
+++ branches/BIGDATA_RELEASE_1_3_0/bigdata-rdf/src/test/com/bigdata/rdf/sparql/ast/eval/rto/BSBM-Q2.srx 2014-01-07 18:28:20 UTC (rev 7743)
@@ -0,0 +1,14 @@
+<?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="count" />
+ </head>
+ <results>
+ <result>
+ <binding name="count">
+ <literal datatype="http://www.w3.org/2001/XMLSchema#integer">30</literal>
+ </binding>
+ </result>
+ </results>
+</sparql>
Added: branches/BIGDATA_RELEASE_1_3_0/bigdata-rdf/src/test/com/bigdata/rdf/sparql/ast/eval/rto/BSBM-Q3.rq
===================================================================
--- branches/BIGDATA_RELEASE_1_3_0/bigdata-rdf/src/test/com/bigdata/rdf/sparql/ast/eval/rto/BSBM-Q3.rq (rev 0)
+++ branches/BIGDATA_RELEASE_1_3_0/bigdata-rdf/src/test/com/bigdata/rdf/sparql/ast/eval/rto/BSBM-Q3.rq 2014-01-07 18:28:20 UTC (rev 7743)
@@ -0,0 +1,31 @@
+# BSBM Q3 on pc100.
+
+PREFIX bsbm-inst: <http://www4.wiwiss.fu-berlin.de/bizer/bsbm/v01/instances/>
+PREFIX bsbm: <http://www4.wiwiss.fu-berlin.de/bizer/bsbm/v01/vocabulary/>
+PREFIX rdfs: <http://www.w3.org/2000/01/rdf-schema#>
+PREFIX rdf: <http://www.w3.org/1999/02/22-rdf-syntax-ns#>
+
+SELECT (COUNT(*) as ?count)
+#SELECT ?product ?label
+WHERE {
+
+ # Control all RTO parameters for repeatable behavior.
+ hint:Query hint:optimizer "Runtime".
+ hint:Query hint:RTO-sampleType "DENSE".
+ hint:Query hint:RTO-limit "100".
+ hint:Query hint:RTO-nedges "1".
+
+ ?product rdfs:label ?label .
+ ?product a <http://www4.wiwiss.fu-berlin.de/bizer/bsbm/v01/instances/ProductType11> .
+ ?product bsbm:productFeature <http://www4.wiwiss.fu-berlin.de/bizer/bsbm/v01/instances/ProductFeature54> .
+ ?product bsbm:productPropertyNumeric1 ?p1 .
+ FILTER ( ?p1 > 147 )
+ ?product bsbm:productPropertyNumeric3 ?p3 .
+ FILTER (?p3 < 91 )
+ OPTIONAL {
+ ?product bsbm:productFeature <http://www4.wiwiss.fu-berlin.de/bizer/bsbm/v01/instances/ProductFeature442> .
+ ?product rdfs:label ?testVar }
+ FILTER (!bound(?testVar))
+}
+ORDER BY ?label
+LIMIT 10
Added: branches/BIGDATA_RELEASE_1_3_0/bigdata-rdf/src/test/com/bigdata/rdf/sparql/ast/eval/rto/BSBM-Q3.srx
===================================================================
--- branches/BIGDATA_RELEASE_1_3_0/bigdata-rdf/src/test/com/bigdata/rdf/sparql/ast/eval/rto/BSBM-Q3.srx (rev 0)
+++ branches/BIGDATA_RELEASE_1_3_0/bigdata-rdf/src/test/com/bigdata/rdf/sparql/ast/eval/rto/BSBM-Q3.srx 2014-01-07 18:28:20 UTC (rev 7743)
@@ -0,0 +1,14 @@
+<?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="count" />
+ </head>
+ <results>
+ <result>
+ <binding name="count">
+ <literal datatype="http://www.w3.org/2001/XMLSchema#integer">0</literal>
+ </binding>
+ </result>
+ </results>
+</sparql>
Added: branches/BIGDATA_RELEASE_1_3_0/bigdata-rdf/src/test/com/bigdata/rdf/sparql/ast/eval/rto/BSBM-Q4.rq
===================================================================
--- branches/BIGDATA_RELEASE_1_3_0/bigdata-rdf/src/test/com/bigdata/rdf/sparql/ast/eval/rto/BSBM-Q4.rq (rev 0)
+++ branches/BIGDATA_RELEASE_1_3_0/bigdata-rdf/src/test/com/bigdata/rdf/sparql/ast/eval/rto/BSBM-Q4.rq 2014-01-07 18:28:20 UTC (rev 7743)
@@ -0,0 +1,37 @@
+# BSBM Q4 on pc100.
+
+PREFIX bsbm-inst: <http://www4.wiwiss.fu-berlin.de/bizer/bsbm/v01/instances/>
+PREFIX bsbm: <http://www4.wiwiss.fu-berlin.de/bizer/bsbm/v01/vocabulary/>
+PREFIX rdfs: <http://www.w3.org/2000/01/rdf-schema#>
+PREFIX rdf: <http://www.w3.org/1999/02/22-rdf-syntax-ns#>
+
+SELECT DISTINCT ?product ?label ?propertyTextual
+WHERE {
+
+ # Control all RTO parameters for repeatable behavior.
+ hint:Query hint:optimizer "Runtime".
+ hint:Query hint:RTO-sampleType "DENSE".
+ hint:Query hint:RTO-limit "100".
+ hint:Query hint:RTO-nedges "1".
+
+ {
+ ?product rdfs:label ?label .
+ ?product rdf:type <http://www4.wiwiss.fu-berlin.de/bizer/bsbm/v01/instances/ProductType19> .
+ ?product bsbm:productFeature <http://www4.wiwiss.fu-berlin.de/bizer/bsbm/v01/instances/ProductFeature158> .
+ ?product bsbm:productFeature <http://www4.wiwiss.fu-berlin.de/bizer/bsbm/v01/instances/ProductFeature865> .
+ ?product bsbm:productPropertyTextual1 ?propertyTextual .
+ ?product bsbm:productPropertyNumeric1 ?p1 .
+ FILTER ( ?p1 > 217 )
+ } UNION {
+ ?product rdfs:label ?label .
+ ?product rdf:type <http://www4.wiwiss.fu-berlin.de/bizer/bsbm/v01/instances/ProductType19> .
+ ?product bsbm:productFeature <http://www4.wiwiss.fu-berlin.de/bizer/bsbm/v01/instances/ProductFeature158> .
+ ?product bsbm:productFeature <http://www4.wiwiss.fu-berlin.de/bizer/bsbm/v01/instances/ProductFeature872> .
+ ?product bsbm:productPropertyTextual1 ?propertyTextual .
+ ?product bsbm:productPropertyNumeric2 ?p2 .
+ FILTER ( ?p2> 124 )
+ }
+}
+ORDER BY ?label
+OFFSET 5
+LIMIT 10
\ No newline at end of file
Added: branches/BIGDATA_RELEASE_1_3_0/bigdata-rdf/src/test/com/bigdata/rdf/sparql/ast/eval/rto/BSBM-Q4.srx
===================================================================
--- branches/BIGDATA_RELEASE_1_3_0/bigdata-rdf/src/test/com/bigdata/rdf/sparql/ast/eval/rto/BSBM-Q4.srx (rev 0)
+++ branches/BIGDATA_RELEASE_1_3_0/bigdata-rdf/src/test/com/bigdata/rdf/sparql/ast/eval/rto/BSBM-Q4.srx 2014-01-07 18:28:20 UTC (rev 7743)
@@ -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="product" />
+ <variable name="label" />
+ <variable name="propertyTextual" />
+ </head>
+ <results>
+ </results>
+</sparql>
Added: branches/BIGDATA_RELEASE_1_3_0/bigdata-rdf/src/test/com/bigdata/rdf/sparql/ast/eval/rto/BSBM-Q5.rq
===================================================================
--- branches/BIGDATA_RELEASE_1_3_0/bigdata-rdf/src/test/com/bigdata/rdf/sparql/ast/eval/rto/BSBM-Q5.rq (rev 0)
+++ branches/BIGDATA_RELEASE_1_3_0/bigdata-rdf/src/test/com/bigdata/rdf/sparql/ast/eval/rto/BSBM-Q5.rq 2014-01-07 18:28:20 UTC (rev 7743)
@@ -0,0 +1,29 @@
+# BSBM Q5 on pc100.
+
+PREFIX rdfs: <http://www.w3.org/2000/01/rdf-schema#>
+PREFIX rdf: <http://www.w3.org/1999/02/22-rdf-syntax-ns#>
+PREFIX bsbm: <http://www4.wiwiss.fu-berlin.de/bizer/bsbm/v01/vocabular...
[truncated message content] |
|
From: <tho...@us...> - 2014-01-23 11:34:06
|
Revision: 7819
http://bigdata.svn.sourceforge.net/bigdata/?rev=7819&view=rev
Author: thompsonbry
Date: 2014-01-23 11:33:50 +0000 (Thu, 23 Jan 2014)
Log Message:
-----------
Added unit tests for #801 (Adding optional removes solutions).
Modified Paths:
--------------
branches/BIGDATA_RELEASE_1_3_0/bigdata-rdf/src/test/com/bigdata/rdf/sparql/ast/eval/TestSubQuery.java
Added Paths:
-----------
branches/BIGDATA_RELEASE_1_3_0/bigdata-rdf/src/test/com/bigdata/rdf/sparql/ast/eval/test_ticket_801_complex_optionals.nt
branches/BIGDATA_RELEASE_1_3_0/bigdata-rdf/src/test/com/bigdata/rdf/sparql/ast/eval/test_ticket_801_complex_optionals.srx
branches/BIGDATA_RELEASE_1_3_0/bigdata-rdf/src/test/com/bigdata/rdf/sparql/ast/eval/test_ticket_801a_complex_optionals.rq
branches/BIGDATA_RELEASE_1_3_0/bigdata-rdf/src/test/com/bigdata/rdf/sparql/ast/eval/test_ticket_801b_complex_optionals.rq
Modified: branches/BIGDATA_RELEASE_1_3_0/bigdata-rdf/src/test/com/bigdata/rdf/sparql/ast/eval/TestSubQuery.java
===================================================================
--- branches/BIGDATA_RELEASE_1_3_0/bigdata-rdf/src/test/com/bigdata/rdf/sparql/ast/eval/TestSubQuery.java 2014-01-23 00:11:09 UTC (rev 7818)
+++ branches/BIGDATA_RELEASE_1_3_0/bigdata-rdf/src/test/com/bigdata/rdf/sparql/ast/eval/TestSubQuery.java 2014-01-23 11:33:50 UTC (rev 7819)
@@ -29,9 +29,11 @@
import org.openrdf.model.Value;
+import com.bigdata.BigdataStatics;
import com.bigdata.bop.BOpUtility;
import com.bigdata.rdf.sparql.ast.NamedSubqueryRoot;
import com.bigdata.rdf.sparql.ast.QueryHints;
+import com.bigdata.rdf.sparql.ast.optimizers.ASTComplexOptionalOptimizer;
import com.bigdata.rdf.sparql.ast.optimizers.ASTSparql11SubqueryOptimizer;
import com.bigdata.rdf.sparql.ast.optimizers.TestASTSparql11SubqueryOptimizer;
@@ -298,4 +300,113 @@
}
+ /**
+ * This ticket is for a bug when the {@link ASTComplexOptionalOptimizer}
+ * runs. If that optimizer is disabled, then the query is fine. There are
+ * two versions for this method. One in which one of the OPTIONALs is turned
+ * into a required join. In this case, the problem is not demonstrated since
+ * the {@link ASTComplexOptionalOptimizer} does not run. In the other case,
+ * the join group is OPTIONAL rather than required and the problem is
+ * demonstrated.
+ *
+ * <pre>
+ * select ?name
+ * {
+ * {
+ * select ?p
+ * {
+ * ?p a <http://www.example.org/schema/Person> .
+ * optional{?p <http://www.example.org/schema/age> ?age.}
+ * }
+ * LIMIT 1
+ * }
+ *
+ * {?p <http://www.example.org/schema/name> ?name.}
+ *
+ * #OPTIONAL
+ * { ?post a <http://www.example.org/schema/Post> .
+ * ?post <http://www.example.org/schema/postedBy> ?p.
+ * ?post <http://www.example.org/schema/content> ?postContent.
+ * }
+ * OPTIONAL{
+ * ?comment a <http://www.example.org/schema/Comment> .
+ * ?comment <http://www.example.org/schema/parentPost> ?post.
+ * ?cperson a <http://www.example.org/schema/Person> .
+ * ?comment <http://www.example.org/schema/postedBy> ?cperson .
+ * }
+ * }
+ * </pre>
+ *
+ * @see <a href="https://sourceforge.net/apps/trac/bigdata/ticket/801" >
+ * Adding OPTIONAL removes solutions</a>
+ */
+ public void test_ticket_801a_complex_optionals() throws Exception {
+
+ final TestHelper h = new TestHelper(
+ "test_ticket_801a_complex_optionals", // testURI,
+ "test_ticket_801a_complex_optionals.rq",// queryFileURL
+ "test_ticket_801_complex_optionals.nt",// dataFileURL
+ "test_ticket_801_complex_optionals.srx"// resultFileURL
+ );
+
+ // Run test.
+ h.runTest();
+
+ }
+
+ /**
+ * In this variant, one of the child join groups is OPTIONAL rather than
+ * required. This shows the problem reported in the ticket where adding an
+ * OPTIONAL join group reduces the number of solutions.
+ *
+ * <pre>
+ * select ?name
+ * {
+ * {
+ * select ?p
+ * {
+ * ?p a <http://www.example.org/schema/Person> .
+ * optional{?p <http://www.example.org/schema/age> ?age.}
+ * }
+ * LIMIT 1
+ * }
+ *
+ * {?p <http://www.example.org/schema/name> ?name.}
+ *
+ * OPTIONAL
+ * { ?post a <http://www.example.org/schema/Post> .
+ * ?post <http://www.example.org/schema/postedBy> ?p.
+ * ?post <http://www.example.org/schema/content> ?postContent.
+ * }
+ * OPTIONAL{
+ * ?comment a <http://www.example.org/schema/Comment> .
+ * ?comment <http://www.example.org/schema/parentPost> ?post.
+ * ?cperson a <http://www.example.org/schema/Person> .
+ * ?comment <http://www.example.org/schema/postedBy> ?cperson .
+ * }
+ * }
+ * </pre>
+ */
+ public void test_ticket_801b_complex_optionals() throws Exception {
+
+ if (!BigdataStatics.runKnownBadTests) {
+ /*
+ * FIXME Add this test to CI once we make some more progress
+ * against the underlying issue.
+ */
+ return;
+ }
+
+ final TestHelper h = new TestHelper(
+ "test_ticket_801b_complex_optionals", // testURI,
+ "test_ticket_801b_complex_optionals.rq",// queryFileURL
+ "test_ticket_801_complex_optionals.nt",// dataFileURL
+ "test_ticket_801_complex_optionals.srx"// resultFileURL
+ );
+
+ // Run test.
+ h.runTest();
+
+ }
+
}
Added: branches/BIGDATA_RELEASE_1_3_0/bigdata-rdf/src/test/com/bigdata/rdf/sparql/ast/eval/test_ticket_801_complex_optionals.nt
===================================================================
--- branches/BIGDATA_RELEASE_1_3_0/bigdata-rdf/src/test/com/bigdata/rdf/sparql/ast/eval/test_ticket_801_complex_optionals.nt (rev 0)
+++ branches/BIGDATA_RELEASE_1_3_0/bigdata-rdf/src/test/com/bigdata/rdf/sparql/ast/eval/test_ticket_801_complex_optionals.nt 2014-01-23 11:33:50 UTC (rev 7819)
@@ -0,0 +1,35 @@
+<http://www.example.com/person1> <http://www.example.org/schema/age> "39"^^<http://www.w3.org/2001/XMLSchema#integer> .
+<http://www.example.com/person1> <http://www.example.org/schema/name> "Person #1"^^<http://www.w3.org/2001/XMLSchema#string> .
+<http://www.example.com/person1> <http://www.w3.org/1999/02/22-rdf-syntax-ns#type> <http://www.example.org/schema/Person> .
+
+<http://www.example.com/person2> <http://www.example.org/schema/age> "29"^^<http://www.w3.org/2001/XMLSchema#integer> .
+<http://www.example.com/person2> <http://www.example.org/schema/name> "Person #2"^^<http://www.w3.org/2001/XMLSchema#string> .
+<http://www.example.com/person2> <http://www.w3.org/1999/02/22-rdf-syntax-ns#type> <http://www.example.org/schema/Person> .
+
+<http://www.example.com/person3> <http://www.example.org/schema/age> "19"^^<http://www.w3.org/2001/XMLSchema#integer> .
+<http://www.example.com/person3> <http://www.example.org/schema/name> "Person #3"^^<http://www.w3.org/2001/XMLSchema#string> .
+<http://www.example.com/person3> <http://www.w3.org/1999/02/22-rdf-syntax-ns#type> <http://www.example.org/schema/Person> .
+
+<http://www.example.com/post1> <http://www.example.org/schema/content> "Post 1 content"^^<http://www.w3.org/2001/XMLSchema#string> .
+<http://www.example.com/post1> <http://www.w3.org/1999/02/22-rdf-syntax-ns#type> <http://www.example.org/schema/Post> .
+<http://www.example.com/post1> <http://www.example.org/schema/postedBy> <http://www.example.com/person1>.
+
+<http://www.example.com/post2> <http://www.example.org/schema/content> "Post 2 content"^^<http://www.w3.org/2001/XMLSchema#string> .
+<http://www.example.com/post2> <http://www.w3.org/1999/02/22-rdf-syntax-ns#type> <http://www.example.org/schema/Post> .
+<http://www.example.com/post2> <http://www.example.org/schema/postedBy> <http://www.example.com/person1>.
+
+<http://www.example.com/comment1> <http://www.example.org/schema/content> "Comment 1 content"^^<http://www.w3.org/2001/XMLSchema#string> .
+<http://www.example.com/comment1> <http://www.w3.org/1999/02/22-rdf-syntax-ns#type> <http://www.example.org/schema/Comment> .
+<http://www.example.com/comment1> <http://www.example.org/schema/parentPost> <http://www.example.com/post1> .
+<http://www.example.com/comment1> <http://www.example.org/schema/postedBy> <http://www.example.com/person2>.
+
+<http://www.example.com/comment2> <http://www.example.org/schema/content> "Comment 2 content"^^<http://www.w3.org/2001/XMLSchema#string> .
+<http://www.example.com/comment2> <http://www.w3.org/1999/02/22-rdf-syntax-ns#type> <http://www.example.org/schema/Comment> .
+<http://www.example.com/comment2> <http://www.example.org/schema/parentPost> <http://www.example.com/post1> .
+<http://www.example.com/comment2> <http://www.example.org/schema/postedBy> <http://www.example.com/person3>.
+
+
+
+
+
+
Added: branches/BIGDATA_RELEASE_1_3_0/bigdata-rdf/src/test/com/bigdata/rdf/sparql/ast/eval/test_ticket_801_complex_optionals.srx
===================================================================
--- branches/BIGDATA_RELEASE_1_3_0/bigdata-rdf/src/test/com/bigdata/rdf/sparql/ast/eval/test_ticket_801_complex_optionals.srx (rev 0)
+++ branches/BIGDATA_RELEASE_1_3_0/bigdata-rdf/src/test/com/bigdata/rdf/sparql/ast/eval/test_ticket_801_complex_optionals.srx 2014-01-23 11:33:50 UTC (rev 7819)
@@ -0,0 +1,26 @@
+<?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="name"/>
+ </head>
+ <results>
+ <result>
+ <binding name="name">
+ <literal datatype="http://www.w3.org/2001/XMLSchema#string">Person #1</literal>
+ </binding>
+ </result>
+ <result>
+ <binding name="name">
+ <literal datatype="http://www.w3.org/2001/XMLSchema#string">Person #1</literal>
+ </binding>
+ </result>
+ <result>
+ <binding name="name">
+ <literal datatype="http://www.w3.org/2001/XMLSchema#string">Person #1</literal>
+ </binding>
+ </result>
+ </results>
+</sparql>
Added: branches/BIGDATA_RELEASE_1_3_0/bigdata-rdf/src/test/com/bigdata/rdf/sparql/ast/eval/test_ticket_801a_complex_optionals.rq
===================================================================
--- branches/BIGDATA_RELEASE_1_3_0/bigdata-rdf/src/test/com/bigdata/rdf/sparql/ast/eval/test_ticket_801a_complex_optionals.rq (rev 0)
+++ branches/BIGDATA_RELEASE_1_3_0/bigdata-rdf/src/test/com/bigdata/rdf/sparql/ast/eval/test_ticket_801a_complex_optionals.rq 2014-01-23 11:33:50 UTC (rev 7819)
@@ -0,0 +1,27 @@
+# See #801 (Adding OPTIONAL removes solutions)
+#
+select ?name
+{
+ {
+ select ?p
+ {
+ ?p a <http://www.example.org/schema/Person> .
+ optional{?p <http://www.example.org/schema/age> ?age.}
+ }
+ LIMIT 1
+ }
+
+ {?p <http://www.example.org/schema/name> ?name.}
+
+ #OPTIONAL
+ { ?post a <http://www.example.org/schema/Post> .
+ ?post <http://www.example.org/schema/postedBy> ?p.
+ ?post <http://www.example.org/schema/content> ?postContent.
+ }
+ OPTIONAL{
+ ?comment a <http://www.example.org/schema/Comment> .
+ ?comment <http://www.example.org/schema/parentPost> ?post.
+ ?cperson a <http://www.example.org/schema/Person> .
+ ?comment <http://www.example.org/schema/postedBy> ?cperson .
+ }
+}
\ No newline at end of file
Added: branches/BIGDATA_RELEASE_1_3_0/bigdata-rdf/src/test/com/bigdata/rdf/sparql/ast/eval/test_ticket_801b_complex_optionals.rq
===================================================================
--- branches/BIGDATA_RELEASE_1_3_0/bigdata-rdf/src/test/com/bigdata/rdf/sparql/ast/eval/test_ticket_801b_complex_optionals.rq (rev 0)
+++ branches/BIGDATA_RELEASE_1_3_0/bigdata-rdf/src/test/com/bigdata/rdf/sparql/ast/eval/test_ticket_801b_complex_optionals.rq 2014-01-23 11:33:50 UTC (rev 7819)
@@ -0,0 +1,27 @@
+# See #801 (Adding OPTIONAL removes solutions)
+#
+select ?name
+{
+ {
+ select ?p
+ {
+ ?p a <http://www.example.org/schema/Person> .
+ optional{?p <http://www.example.org/schema/age> ?age.}
+ }
+ LIMIT 1
+ }
+
+ {?p <http://www.example.org/schema/name> ?name.}
+
+ OPTIONAL
+ { ?post a <http://www.example.org/schema/Post> .
+ ?post <http://www.example.org/schema/postedBy> ?p.
+ ?post <http://www.example.org/schema/content> ?postContent.
+ }
+ OPTIONAL{
+ ?comment a <http://www.example.org/schema/Comment> .
+ ?comment <http://www.example.org/schema/parentPost> ?post.
+ ?cperson a <http://www.example.org/schema/Person> .
+ ?comment <http://www.example.org/schema/postedBy> ?cperson .
+ }
+}
\ 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: <tho...@us...> - 2014-01-24 18:42:11
|
Revision: 7827
http://bigdata.svn.sourceforge.net/bigdata/?rev=7827&view=rev
Author: thompsonbry
Date: 2014-01-24 18:42:02 +0000 (Fri, 24 Jan 2014)
Log Message:
-----------
Added test for #806.
Modified Paths:
--------------
branches/BIGDATA_RELEASE_1_3_0/bigdata-rdf/src/test/com/bigdata/rdf/sparql/ast/eval/TestTickets.java
Added Paths:
-----------
branches/BIGDATA_RELEASE_1_3_0/bigdata-rdf/src/test/com/bigdata/rdf/sparql/ast/eval/ticket-806.rq
branches/BIGDATA_RELEASE_1_3_0/bigdata-rdf/src/test/com/bigdata/rdf/sparql/ast/eval/ticket-806.srx
branches/BIGDATA_RELEASE_1_3_0/bigdata-rdf/src/test/com/bigdata/rdf/sparql/ast/eval/ticket-806.trig
Modified: branches/BIGDATA_RELEASE_1_3_0/bigdata-rdf/src/test/com/bigdata/rdf/sparql/ast/eval/TestTickets.java
===================================================================
--- branches/BIGDATA_RELEASE_1_3_0/bigdata-rdf/src/test/com/bigdata/rdf/sparql/ast/eval/TestTickets.java 2014-01-23 22:48:03 UTC (rev 7826)
+++ branches/BIGDATA_RELEASE_1_3_0/bigdata-rdf/src/test/com/bigdata/rdf/sparql/ast/eval/TestTickets.java 2014-01-24 18:42:02 UTC (rev 7827)
@@ -318,4 +318,21 @@
).runTest();
}
+
+ /**
+ * @see <a href="https://sourceforge.net/apps/trac/bigdata/ticket/806" >
+ * Incorrect computation of shared variables when lifting out named
+ * subqueries </a>
+ */
+ public void test_ticket_806() throws Exception {
+
+ new TestHelper("ticket-806",// testURI,
+ "ticket-806.rq",// queryFileURL
+ "ticket-806.trig",// dataFileURL
+ "ticket-806.srx",// resultFileURL
+ false// checkOrder
+ ).runTest();
+
+ }
+
}
Added: branches/BIGDATA_RELEASE_1_3_0/bigdata-rdf/src/test/com/bigdata/rdf/sparql/ast/eval/ticket-806.rq
===================================================================
--- branches/BIGDATA_RELEASE_1_3_0/bigdata-rdf/src/test/com/bigdata/rdf/sparql/ast/eval/ticket-806.rq (rev 0)
+++ branches/BIGDATA_RELEASE_1_3_0/bigdata-rdf/src/test/com/bigdata/rdf/sparql/ast/eval/ticket-806.rq 2014-01-24 18:42:02 UTC (rev 7827)
@@ -0,0 +1,27 @@
+PREFIX g: <http://example.org/graphs#>
+PREFIX d: <http://example.org/data#>
+PREFIX p: <http://example.org/person#>
+
+# since all 3 predicates are used in the test data, all 3 variables should end up bound here
+SELECT ?id ?fullName ?legalName {
+ {select ?entity ?id {
+ graph ?g { ?entity p:id ?id }
+ graph g:pointers { ?entity ?a ?g }
+ }}
+
+ # ?a and ?g end up being projected into the next query
+ # changing ?a => ?a1; ?g => ?g1 fixes this
+ optional {
+ select ?entity ?fullName {
+ graph g:pointers { ?entity ?a ?g }
+ graph ?g { ?entity p:fullName ?fullName }
+ }
+ }
+
+ optional {
+ select ?entity ?legalName {
+ graph ?g { ?entity p:legalName ?legalName }
+ graph g:pointers { ?entity ?a ?g }
+ }
+ }
+}
Added: branches/BIGDATA_RELEASE_1_3_0/bigdata-rdf/src/test/com/bigdata/rdf/sparql/ast/eval/ticket-806.srx
===================================================================
--- branches/BIGDATA_RELEASE_1_3_0/bigdata-rdf/src/test/com/bigdata/rdf/sparql/ast/eval/ticket-806.srx (rev 0)
+++ branches/BIGDATA_RELEASE_1_3_0/bigdata-rdf/src/test/com/bigdata/rdf/sparql/ast/eval/ticket-806.srx 2014-01-24 18:42:02 UTC (rev 7827)
@@ -0,0 +1,21 @@
+<?xml version='1.0' encoding='UTF-8'?>
+<sparql xmlns='http://www.w3.org/2005/sparql-results#'>
+ <head>
+ <variable name='id'/>
+ <variable name='fullName'/>
+ <variable name='legalName'/>
+ </head>
+ <results>
+ <result>
+ <binding name='id'>
+ <literal>123</literal>
+ </binding>
+ <binding name='fullName'>
+ <literal>Bryan Thompson</literal>
+ </binding>
+ <binding name='legalName'>
+ <literal>Bryan Thompson 123</literal>
+ </binding>
+ </result>
+ </results>
+</sparql>
Added: branches/BIGDATA_RELEASE_1_3_0/bigdata-rdf/src/test/com/bigdata/rdf/sparql/ast/eval/ticket-806.trig
===================================================================
--- branches/BIGDATA_RELEASE_1_3_0/bigdata-rdf/src/test/com/bigdata/rdf/sparql/ast/eval/ticket-806.trig (rev 0)
+++ branches/BIGDATA_RELEASE_1_3_0/bigdata-rdf/src/test/com/bigdata/rdf/sparql/ast/eval/ticket-806.trig 2014-01-24 18:42:02 UTC (rev 7827)
@@ -0,0 +1,21 @@
+@prefix g: <http://example.org/graphs#> .
+@prefix d: <http://example.org/data#> .
+@prefix p: <http://example.org/person#> .
+
+g:graph1 {
+ d:foo p:id "123"
+}
+
+g:graph2 {
+ d:foo p:fullName "Bryan Thompson"
+}
+
+g:graph3 {
+ d:foo p:legalName "Bryan Thompson 123"
+}
+
+g:pointers {
+ d:foo d:a g:graph1 .
+ d:foo d:b g:graph2 .
+ d:foo d:c g:graph3
+}
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|
|
From: <tho...@us...> - 2014-03-26 17:35:06
|
Revision: 8020
http://sourceforge.net/p/bigdata/code/8020
Author: thompsonbry
Date: 2014-03-26 17:35:00 +0000 (Wed, 26 Mar 2014)
Log Message:
-----------
Added test suite for #868 (COUNT DISTINCT does not return any solutions if there are no solutions in the data that flow into that operator)
Modified Paths:
--------------
branches/BIGDATA_RELEASE_1_3_0/bigdata-rdf/src/test/com/bigdata/rdf/sparql/ast/eval/TestAggregationQuery.java
Added Paths:
-----------
branches/BIGDATA_RELEASE_1_3_0/bigdata-rdf/src/test/com/bigdata/rdf/sparql/ast/eval/count_distinct_emptyResult.rq
branches/BIGDATA_RELEASE_1_3_0/bigdata-rdf/src/test/com/bigdata/rdf/sparql/ast/eval/count_distinct_emptyResult.srx
branches/BIGDATA_RELEASE_1_3_0/bigdata-rdf/src/test/com/bigdata/rdf/sparql/ast/eval/count_distinct_emptyResult.trig
branches/BIGDATA_RELEASE_1_3_0/bigdata-rdf/src/test/com/bigdata/rdf/sparql/ast/eval/count_emptyResult.rq
branches/BIGDATA_RELEASE_1_3_0/bigdata-rdf/src/test/com/bigdata/rdf/sparql/ast/eval/count_emptyResult.srx
branches/BIGDATA_RELEASE_1_3_0/bigdata-rdf/src/test/com/bigdata/rdf/sparql/ast/eval/count_emptyResult.trig
Modified: branches/BIGDATA_RELEASE_1_3_0/bigdata-rdf/src/test/com/bigdata/rdf/sparql/ast/eval/TestAggregationQuery.java
===================================================================
--- branches/BIGDATA_RELEASE_1_3_0/bigdata-rdf/src/test/com/bigdata/rdf/sparql/ast/eval/TestAggregationQuery.java 2014-03-26 17:26:14 UTC (rev 8019)
+++ branches/BIGDATA_RELEASE_1_3_0/bigdata-rdf/src/test/com/bigdata/rdf/sparql/ast/eval/TestAggregationQuery.java 2014-03-26 17:35:00 UTC (rev 8020)
@@ -138,5 +138,49 @@
).runTest();
}
+
+ /**
+ * Query correctly returns one row having a value of ZERO (0) for the count
+ * since there are no solutions in the data that match the query.
+ *
+ * <pre>
+ * select (count(?s) as ?count) {
+ * ?s ?p "abcedefg" .
+ * }
+ * </pre>
+ *
+ * @see <a href="http://trac.bigdata.com/ticket/868"> COUNT(DISTINCT)
+ * returns no rows rather than ZERO. </a>
+ */
+ public void test_count_emptyResult() throws Exception {
+
+ new TestHelper("count_emptyResult", // testURI,
+ "count_emptyResult.rq",// queryFileURL
+ "count_emptyResult.trig",// dataFileURL
+ "count_emptyResult.srx"// resultFileURL
+ ).runTest();
+ }
+ /**
+ * Variation of the query above using COUNT(DISTINCT) should also return one
+ * solution having a binding of ZERO (0) for the count.
+ *
+ * <pre>
+ * select (count(distinct ?snippet) as ?count) {
+ * ?snippet ?p "abcedefg" .
+ * }
+ * </pre>
+ *
+ * @see <a href="http://trac.bigdata.com/ticket/868"> COUNT(DISTINCT)
+ * returns no rows rather than ZERO. </a>
+ */
+ public void test_count_distinct_emptyResult()throws Exception {
+
+ new TestHelper("count_distinct_emptyResult", // testURI,
+ "count_distinct_emptyResult.rq",// queryFileURL
+ "count_distinct_emptyResult.trig",// dataFileURL
+ "count_distinct_emptyResult.srx"// resultFileURL
+ ).runTest();
+ }
+
}
Added: branches/BIGDATA_RELEASE_1_3_0/bigdata-rdf/src/test/com/bigdata/rdf/sparql/ast/eval/count_distinct_emptyResult.rq
===================================================================
--- branches/BIGDATA_RELEASE_1_3_0/bigdata-rdf/src/test/com/bigdata/rdf/sparql/ast/eval/count_distinct_emptyResult.rq (rev 0)
+++ branches/BIGDATA_RELEASE_1_3_0/bigdata-rdf/src/test/com/bigdata/rdf/sparql/ast/eval/count_distinct_emptyResult.rq 2014-03-26 17:35:00 UTC (rev 8020)
@@ -0,0 +1,3 @@
+select (count(distinct ?s) as ?count) {
+ ?s ?p "abcedefg" .
+}
Added: branches/BIGDATA_RELEASE_1_3_0/bigdata-rdf/src/test/com/bigdata/rdf/sparql/ast/eval/count_distinct_emptyResult.srx
===================================================================
--- branches/BIGDATA_RELEASE_1_3_0/bigdata-rdf/src/test/com/bigdata/rdf/sparql/ast/eval/count_distinct_emptyResult.srx (rev 0)
+++ branches/BIGDATA_RELEASE_1_3_0/bigdata-rdf/src/test/com/bigdata/rdf/sparql/ast/eval/count_distinct_emptyResult.srx 2014-03-26 17:35:00 UTC (rev 8020)
@@ -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="count"/>
+ </head>
+ <results>
+ <result>
+ <binding name="count">
+ <literal datatype="http://www.w3.org/2001/XMLSchema#integer">0</literal>
+ </binding>
+ </result>
+ </results>
+</sparql>
Added: branches/BIGDATA_RELEASE_1_3_0/bigdata-rdf/src/test/com/bigdata/rdf/sparql/ast/eval/count_distinct_emptyResult.trig
===================================================================
Added: branches/BIGDATA_RELEASE_1_3_0/bigdata-rdf/src/test/com/bigdata/rdf/sparql/ast/eval/count_emptyResult.rq
===================================================================
--- branches/BIGDATA_RELEASE_1_3_0/bigdata-rdf/src/test/com/bigdata/rdf/sparql/ast/eval/count_emptyResult.rq (rev 0)
+++ branches/BIGDATA_RELEASE_1_3_0/bigdata-rdf/src/test/com/bigdata/rdf/sparql/ast/eval/count_emptyResult.rq 2014-03-26 17:35:00 UTC (rev 8020)
@@ -0,0 +1,3 @@
+select (count(?s) as ?count) {
+ ?s ?p "abcedefg" .
+}
Added: branches/BIGDATA_RELEASE_1_3_0/bigdata-rdf/src/test/com/bigdata/rdf/sparql/ast/eval/count_emptyResult.srx
===================================================================
--- branches/BIGDATA_RELEASE_1_3_0/bigdata-rdf/src/test/com/bigdata/rdf/sparql/ast/eval/count_emptyResult.srx (rev 0)
+++ branches/BIGDATA_RELEASE_1_3_0/bigdata-rdf/src/test/com/bigdata/rdf/sparql/ast/eval/count_emptyResult.srx 2014-03-26 17:35:00 UTC (rev 8020)
@@ -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="count"/>
+ </head>
+ <results>
+ <result>
+ <binding name="count">
+ <literal datatype="http://www.w3.org/2001/XMLSchema#integer">0</literal>
+ </binding>
+ </result>
+ </results>
+</sparql>
Added: branches/BIGDATA_RELEASE_1_3_0/bigdata-rdf/src/test/com/bigdata/rdf/sparql/ast/eval/count_emptyResult.trig
===================================================================
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|
|
From: <tho...@us...> - 2014-04-07 22:52:37
|
Revision: 8081
http://sourceforge.net/p/bigdata/code/8081
Author: thompsonbry
Date: 2014-04-07 22:52:33 +0000 (Mon, 07 Apr 2014)
Log Message:
-----------
Added regression test suite for #831 and #874.
Modified Paths:
--------------
branches/BIGDATA_RELEASE_1_3_0/bigdata-rdf/src/test/com/bigdata/rdf/sparql/ast/eval/TestUnions.java
Added Paths:
-----------
branches/BIGDATA_RELEASE_1_3_0/bigdata-rdf/src/test/com/bigdata/rdf/sparql/ast/eval/ticket_831.rq
branches/BIGDATA_RELEASE_1_3_0/bigdata-rdf/src/test/com/bigdata/rdf/sparql/ast/eval/ticket_831.srx
branches/BIGDATA_RELEASE_1_3_0/bigdata-rdf/src/test/com/bigdata/rdf/sparql/ast/eval/ticket_831.ttl
branches/BIGDATA_RELEASE_1_3_0/bigdata-rdf/src/test/com/bigdata/rdf/sparql/ast/eval/ticket_874.rq
branches/BIGDATA_RELEASE_1_3_0/bigdata-rdf/src/test/com/bigdata/rdf/sparql/ast/eval/ticket_874.srx
branches/BIGDATA_RELEASE_1_3_0/bigdata-rdf/src/test/com/bigdata/rdf/sparql/ast/eval/ticket_874.ttl
branches/BIGDATA_RELEASE_1_3_0/bigdata-rdf/src/test/com/bigdata/rdf/sparql/ast/eval/ticket_874b.rq
Modified: branches/BIGDATA_RELEASE_1_3_0/bigdata-rdf/src/test/com/bigdata/rdf/sparql/ast/eval/TestUnions.java
===================================================================
--- branches/BIGDATA_RELEASE_1_3_0/bigdata-rdf/src/test/com/bigdata/rdf/sparql/ast/eval/TestUnions.java 2014-04-07 22:34:42 UTC (rev 8080)
+++ branches/BIGDATA_RELEASE_1_3_0/bigdata-rdf/src/test/com/bigdata/rdf/sparql/ast/eval/TestUnions.java 2014-04-07 22:52:33 UTC (rev 8081)
@@ -209,4 +209,54 @@
).runTest();
}
+
+ /**
+ *
+ * @see <a href="http://trac.bigdata.com/ticket/831">Union with FILTER
+ * issue</a>
+ */
+ public void test_union_ticket_831() throws Exception {
+
+ new TestHelper(
+ "ticket_831", // testURI,
+ "ticket_831.rq",// queryFileURL
+ "ticket_831.ttl",// dataFileURL
+ "ticket_831.srx"// resultFileURL
+ ).runTest();
+
+ }
+
+ /**
+ * The original query.
+ * @see <a href="http://trac.bigdata.com/ticket/874">FILTER not applied when
+ * there is UNION in the same join group</a>
+ */
+ public void test_union_ticket_874() throws Exception {
+
+ new TestHelper(
+ "ticket_874", // testURI,
+ "ticket_874.rq",// queryFileURL
+ "ticket_874.ttl",// dataFileURL
+ "ticket_874.srx"// resultFileURL
+ ).runTest();
+
+ }
+
+ /**
+ * A rewrite of the original query that works.
+ *
+ * @see <a href="http://trac.bigdata.com/ticket/874">FILTER not applied when
+ * there is UNION in the same join group</a>
+ */
+ public void test_union_ticket_874b() throws Exception {
+
+ new TestHelper(
+ "ticket_874b", // testURI,
+ "ticket_874b.rq",// queryFileURL
+ "ticket_874.ttl",// dataFileURL
+ "ticket_874.srx"// resultFileURL
+ ).runTest();
+
+ }
+
}
Added: branches/BIGDATA_RELEASE_1_3_0/bigdata-rdf/src/test/com/bigdata/rdf/sparql/ast/eval/ticket_831.rq
===================================================================
--- branches/BIGDATA_RELEASE_1_3_0/bigdata-rdf/src/test/com/bigdata/rdf/sparql/ast/eval/ticket_831.rq (rev 0)
+++ branches/BIGDATA_RELEASE_1_3_0/bigdata-rdf/src/test/com/bigdata/rdf/sparql/ast/eval/ticket_831.rq 2014-04-07 22:52:33 UTC (rev 8081)
@@ -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#>
+PREFIX xsd: <http://www.w3.org/2001/XMLSchema#>
+
+select ?s ?p ?o
+
+where {
+
+ {
+ ?s ?p ?o.
+ filter(?s = <http://example.org/data/person1>)
+ }
+ UNION
+ {
+ ?s ?p ?o.
+ filter(?s = <http://example.org/data/person2>)
+
+ }
+
+}
\ No newline at end of file
Added: branches/BIGDATA_RELEASE_1_3_0/bigdata-rdf/src/test/com/bigdata/rdf/sparql/ast/eval/ticket_831.srx
===================================================================
--- branches/BIGDATA_RELEASE_1_3_0/bigdata-rdf/src/test/com/bigdata/rdf/sparql/ast/eval/ticket_831.srx (rev 0)
+++ branches/BIGDATA_RELEASE_1_3_0/bigdata-rdf/src/test/com/bigdata/rdf/sparql/ast/eval/ticket_831.srx 2014-04-07 22:52:33 UTC (rev 8081)
@@ -0,0 +1,88 @@
+<?xml version='1.0' encoding='UTF-8'?>
+<sparql xmlns='http://www.w3.org/2005/sparql-results#'>
+ <head>
+ <variable name='s'/>
+ <variable name='p'/>
+ <variable name='o'/>
+ </head>
+ <results>
+<!--
+:person1
+ a :Person ;
+ :age 21;
+ :name "Person 1".
+-->
+ <result>
+ <binding name='s'>
+ <uri>http://example.org/data/person1</uri>
+ </binding>
+ <binding name='p'>
+ <uri>http://www.w3.org/1999/02/22-rdf-syntax-ns#type</uri>
+ </binding>
+ <binding name='o'>
+ <uri>http://example.org/data/Person</uri>
+ </binding>
+ </result>
+ <result>
+ <binding name='s'>
+ <uri>http://example.org/data/person1</uri>
+ </binding>
+ <binding name='p'>
+ <uri>http://example.org/data/age</uri>
+ </binding>
+ <binding name='o'>
+ <literal datatype="http://www.w3.org/2001/XMLSchema#integer">21</literal>
+ </binding>
+ </result>
+ <result>
+ <binding name='s'>
+ <uri>http://example.org/data/person1</uri>
+ </binding>
+ <binding name='p'>
+ <uri>http://example.org/data/name</uri>
+ </binding>
+ <binding name='o'>
+ <literal>Person 1</literal>
+ </binding>
+ </result>
+<!--
+:person2
+ a :Person ;
+ :age 11;
+ :name "Person 2".
+ -->
+ <result>
+ <binding name='s'>
+ <uri>http://example.org/data/person2</uri>
+ </binding>
+ <binding name='p'>
+ <uri>http://www.w3.org/1999/02/22-rdf-syntax-ns#type</uri>
+ </binding>
+ <binding name='o'>
+ <uri>http://example.org/data/Person</uri>
+ </binding>
+ </result>
+ <result>
+ <binding name='s'>
+ <uri>http://example.org/data/person2</uri>
+ </binding>
+ <binding name='p'>
+ <uri>http://example.org/data/age</uri>
+ </binding>
+ <binding name='o'>
+ <literal datatype="http://www.w3.org/2001/XMLSchema#integer">11</literal>
+ </binding>
+ </result>
+ <result>
+ <binding name='s'>
+ <uri>http://example.org/data/person2</uri>
+ </binding>
+ <binding name='p'>
+ <uri>http://example.org/data/name</uri>
+ </binding>
+ <binding name='o'>
+ <literal>Person 2</literal>
+ </binding>
+ </result>
+ </results>
+</sparql>
Added: branches/BIGDATA_RELEASE_1_3_0/bigdata-rdf/src/test/com/bigdata/rdf/sparql/ast/eval/ticket_831.ttl
===================================================================
--- branches/BIGDATA_RELEASE_1_3_0/bigdata-rdf/src/test/com/bigdata/rdf/sparql/ast/eval/ticket_831.ttl (rev 0)
+++ branches/BIGDATA_RELEASE_1_3_0/bigdata-rdf/src/test/com/bigdata/rdf/sparql/ast/eval/ticket_831.ttl 2014-04-07 22:52:33 UTC (rev 8081)
@@ -0,0 +1,11 @@
+@prefix : <http://example.org/data/> .
+
+:person1
+ a :Person ;
+ :age 21;
+ :name "Person 1".
+
+:person2
+ a :Person ;
+ :age 11;
+ :name "Person 2".
\ No newline at end of file
Added: branches/BIGDATA_RELEASE_1_3_0/bigdata-rdf/src/test/com/bigdata/rdf/sparql/ast/eval/ticket_874.rq
===================================================================
--- branches/BIGDATA_RELEASE_1_3_0/bigdata-rdf/src/test/com/bigdata/rdf/sparql/ast/eval/ticket_874.rq (rev 0)
+++ branches/BIGDATA_RELEASE_1_3_0/bigdata-rdf/src/test/com/bigdata/rdf/sparql/ast/eval/ticket_874.rq 2014-04-07 22:52:33 UTC (rev 8081)
@@ -0,0 +1,9 @@
+prefix xsd: <http://www.w3.org/2001/XMLSchema#>
+SELECT *
+where {
+ ?s ?p ?o .
+ FILTER strStarts(str(?s), "http://arvados.org/schema/modified") .
+ { ?user <http://arvados.org/schema/user_is_admin> "true"^^xsd:boolean }
+ union { ?user <http://arvados.org/schema/permission/can_read> ?s }
+ ?user <http://arvados.org/schema/api_token> <token:ckedd>
+}
\ No newline at end of file
Added: branches/BIGDATA_RELEASE_1_3_0/bigdata-rdf/src/test/com/bigdata/rdf/sparql/ast/eval/ticket_874.srx
===================================================================
--- branches/BIGDATA_RELEASE_1_3_0/bigdata-rdf/src/test/com/bigdata/rdf/sparql/ast/eval/ticket_874.srx (rev 0)
+++ branches/BIGDATA_RELEASE_1_3_0/bigdata-rdf/src/test/com/bigdata/rdf/sparql/ast/eval/ticket_874.srx 2014-04-07 22:52:33 UTC (rev 8081)
@@ -0,0 +1,25 @@
+<?xml version='1.0' encoding='UTF-8'?>
+<sparql xmlns='http://www.w3.org/2005/sparql-results#'>
+ <head>
+ <variable name='s'/>
+ <variable name='p'/>
+ <variable name='o'/>
+ <variable name='user'/>
+ </head>
+ <results>
+ <result>
+ <binding name='s'>
+ <uri>http://arvados.org/schema/modified_at</uri>
+ </binding>
+ <binding name='p'>
+ <uri>http://www.w3.org/1999/02/22-rdf-syntax-ns#type</uri>
+ </binding>
+ <binding name='o'>
+ <uri>http://www.w3.org/2000/01/rdf-schema#Property</uri>
+ </binding>
+ <binding name='user'>
+ <uri>http://qr1hi/user/12345</uri>
+ </binding>
+ </result>
+ </results>
+</sparql>
Added: branches/BIGDATA_RELEASE_1_3_0/bigdata-rdf/src/test/com/bigdata/rdf/sparql/ast/eval/ticket_874.ttl
===================================================================
--- branches/BIGDATA_RELEASE_1_3_0/bigdata-rdf/src/test/com/bigdata/rdf/sparql/ast/eval/ticket_874.ttl (rev 0)
+++ branches/BIGDATA_RELEASE_1_3_0/bigdata-rdf/src/test/com/bigdata/rdf/sparql/ast/eval/ticket_874.ttl 2014-04-07 22:52:33 UTC (rev 8081)
@@ -0,0 +1,4 @@
+@prefix xsd: <http://www.w3.org/2001/XMLSchema#> .
+<http://qr1hi/user/12345> <http://arvados.org/schema/api_token> <token:ckedd> .
+<http://qr1hi/user/12345> <http://arvados.org/schema/user_is_admin> "true"^^xsd:boolean .
+<http://arvados.org/schema/modified_at> <http://www.w3.org/1999/02/22-rdf-syntax-ns#type> <http://www.w3.org/2000/01/rdf-schema#Property> .
\ No newline at end of file
Added: branches/BIGDATA_RELEASE_1_3_0/bigdata-rdf/src/test/com/bigdata/rdf/sparql/ast/eval/ticket_874b.rq
===================================================================
--- branches/BIGDATA_RELEASE_1_3_0/bigdata-rdf/src/test/com/bigdata/rdf/sparql/ast/eval/ticket_874b.rq (rev 0)
+++ branches/BIGDATA_RELEASE_1_3_0/bigdata-rdf/src/test/com/bigdata/rdf/sparql/ast/eval/ticket_874b.rq 2014-04-07 22:52:33 UTC (rev 8081)
@@ -0,0 +1,17 @@
+prefix xsd: <http://www.w3.org/2001/XMLSchema#>
+SELECT *
+where {
+?user <http://arvados.org/schema/api_token> <token:ckedd> .
+{
+ ?user <http://arvados.org/schema/user_is_admin> true .
+ ?s ?p ?o .
+ FILTER strStarts(str(?s), "http://arvados.org/schema/modified") .
+}
+union
+{
+ ?user <http://arvados.org/schema/user_is_admin> false .
+ ?user <http://arvados.org/schema/permission/can_read> ?s .
+ ?s ?p ?o .
+ FILTER strStarts(str(?s), "http://arvados.org/schema/modified") .
+}
+}
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|
|
From: <tho...@us...> - 2014-04-15 12:51:05
|
Revision: 8120
http://sourceforge.net/p/bigdata/code/8120
Author: thompsonbry
Date: 2014-04-15 12:51:02 +0000 (Tue, 15 Apr 2014)
Log Message:
-----------
Added test case that demonstrates #888 and a test case that demonstrates a workaround for #888.
Modified Paths:
--------------
branches/BIGDATA_RELEASE_1_3_0/bigdata-rdf/src/test/com/bigdata/rdf/sparql/ast/eval/TestNamedGraphs.java
Added Paths:
-----------
branches/BIGDATA_RELEASE_1_3_0/bigdata-rdf/src/test/com/bigdata/rdf/sparql/ast/eval/named-graphs-ticket-888.rq
branches/BIGDATA_RELEASE_1_3_0/bigdata-rdf/src/test/com/bigdata/rdf/sparql/ast/eval/named-graphs-ticket-888.srx
branches/BIGDATA_RELEASE_1_3_0/bigdata-rdf/src/test/com/bigdata/rdf/sparql/ast/eval/named-graphs-ticket-888.trig
branches/BIGDATA_RELEASE_1_3_0/bigdata-rdf/src/test/com/bigdata/rdf/sparql/ast/eval/named-graphs-ticket-888b.rq
Modified: branches/BIGDATA_RELEASE_1_3_0/bigdata-rdf/src/test/com/bigdata/rdf/sparql/ast/eval/TestNamedGraphs.java
===================================================================
--- branches/BIGDATA_RELEASE_1_3_0/bigdata-rdf/src/test/com/bigdata/rdf/sparql/ast/eval/TestNamedGraphs.java 2014-04-14 18:44:26 UTC (rev 8119)
+++ branches/BIGDATA_RELEASE_1_3_0/bigdata-rdf/src/test/com/bigdata/rdf/sparql/ast/eval/TestNamedGraphs.java 2014-04-15 12:51:02 UTC (rev 8120)
@@ -641,4 +641,45 @@
}
+ /**
+ * Note: This is a duplicate of <a href="http://trac.bigdata.com/ticket/792>
+ * GRAPH ?g { FILTER NOT EXISTS { ?s ?p ?o } } not respecting ?g </a>
+ *
+ * @see <a href="http://trac.bigdata.com/ticket/888> GRAPH ignored by FILTER
+ * NOT EXISTS </a>
+ */
+ public void test_named_graphs_ticket_888() throws Exception {
+
+ if(!store.isQuads())
+ return;
+
+ new TestHelper(
+ "named-graphs-ticket-888",// testURI
+ "named-graphs-ticket-888.rq", // queryURI
+ "named-graphs-ticket-888.trig", // dataURI
+ "named-graphs-ticket-888.srx" // resultURI
+ ).runTest();
+
+ }
+
+ /**
+ * Unit test of a work around for {@link #test_named_graphs_ticket_888()}.
+ *
+ * @see <a href="http://trac.bigdata.com/ticket/888> GRAPH ignored by FILTER
+ * NOT EXISTS </a>
+ */
+ public void test_named_graphs_ticket_888b() throws Exception {
+
+ if(!store.isQuads())
+ return;
+
+ new TestHelper(
+ "named-graphs-ticket-888",// testURI
+ "named-graphs-ticket-888b.rq", // queryURI
+ "named-graphs-ticket-888.trig", // dataURI
+ "named-graphs-ticket-888.srx" // resultURI
+ ).runTest();
+
+ }
+
}
Added: branches/BIGDATA_RELEASE_1_3_0/bigdata-rdf/src/test/com/bigdata/rdf/sparql/ast/eval/named-graphs-ticket-888.rq
===================================================================
--- branches/BIGDATA_RELEASE_1_3_0/bigdata-rdf/src/test/com/bigdata/rdf/sparql/ast/eval/named-graphs-ticket-888.rq (rev 0)
+++ branches/BIGDATA_RELEASE_1_3_0/bigdata-rdf/src/test/com/bigdata/rdf/sparql/ast/eval/named-graphs-ticket-888.rq 2014-04-15 12:51:02 UTC (rev 8120)
@@ -0,0 +1,9 @@
+PREFIX : <http://sample.com/>
+
+SELECT DISTINCT ?g
+WHERE {
+ GRAPH ?g {
+ ?s ?p ?o .
+ FILTER NOT EXISTS { <http://sample.com/I> <http://sample.com/live> "a_live". }
+ }
+}
Added: branches/BIGDATA_RELEASE_1_3_0/bigdata-rdf/src/test/com/bigdata/rdf/sparql/ast/eval/named-graphs-ticket-888.srx
===================================================================
--- branches/BIGDATA_RELEASE_1_3_0/bigdata-rdf/src/test/com/bigdata/rdf/sparql/ast/eval/named-graphs-ticket-888.srx (rev 0)
+++ branches/BIGDATA_RELEASE_1_3_0/bigdata-rdf/src/test/com/bigdata/rdf/sparql/ast/eval/named-graphs-ticket-888.srx 2014-04-15 12:51:02 UTC (rev 8120)
@@ -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">
+ <uri>http://graph.com/test_1</uri>
+ </binding>
+ </result>
+ </results>
+</sparql>
\ No newline at end of file
Added: branches/BIGDATA_RELEASE_1_3_0/bigdata-rdf/src/test/com/bigdata/rdf/sparql/ast/eval/named-graphs-ticket-888.trig
===================================================================
--- branches/BIGDATA_RELEASE_1_3_0/bigdata-rdf/src/test/com/bigdata/rdf/sparql/ast/eval/named-graphs-ticket-888.trig (rev 0)
+++ branches/BIGDATA_RELEASE_1_3_0/bigdata-rdf/src/test/com/bigdata/rdf/sparql/ast/eval/named-graphs-ticket-888.trig 2014-04-15 12:51:02 UTC (rev 8120)
@@ -0,0 +1,14 @@
+@prefix : <http://sample.com/> .
+
+<http://graph.com/test> {
+ :I :am "a" .
+ :I :live "a_live" .
+ :I :work "a_work" .
+}
+
+<http://graph.com/test_1> {
+ :I :am "a" .
+ :I :am "b" .
+ :I :work "a_work" .
+ :I :work "b_work" .
+}
Added: branches/BIGDATA_RELEASE_1_3_0/bigdata-rdf/src/test/com/bigdata/rdf/sparql/ast/eval/named-graphs-ticket-888b.rq
===================================================================
--- branches/BIGDATA_RELEASE_1_3_0/bigdata-rdf/src/test/com/bigdata/rdf/sparql/ast/eval/named-graphs-ticket-888b.rq (rev 0)
+++ branches/BIGDATA_RELEASE_1_3_0/bigdata-rdf/src/test/com/bigdata/rdf/sparql/ast/eval/named-graphs-ticket-888b.rq 2014-04-15 12:51:02 UTC (rev 8120)
@@ -0,0 +1,7 @@
+PREFIX : <http://sample.com/>
+
+SELECT DISTINCT ?g
+WHERE {
+ GRAPH ?g { ?s ?p ?o }
+ FILTER NOT EXISTS { GRAPH ?g { <http://sample.com/I> <http://sample.com/live> "a_live". }}
+}
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|
|
From: <tho...@us...> - 2014-05-20 12:43:57
|
Revision: 8374
http://sourceforge.net/p/bigdata/code/8374
Author: thompsonbry
Date: 2014-05-20 12:43:54 +0000 (Tue, 20 May 2014)
Log Message:
-----------
added test for #944. This only fails in scale-out.
Modified Paths:
--------------
branches/BIGDATA_RELEASE_1_3_0/bigdata-rdf/src/test/com/bigdata/rdf/sparql/ast/eval/TestUnions.java
Added Paths:
-----------
branches/BIGDATA_RELEASE_1_3_0/bigdata-rdf/src/test/com/bigdata/rdf/sparql/ast/eval/ticket_944.rq
branches/BIGDATA_RELEASE_1_3_0/bigdata-rdf/src/test/com/bigdata/rdf/sparql/ast/eval/ticket_944.srx
branches/BIGDATA_RELEASE_1_3_0/bigdata-rdf/src/test/com/bigdata/rdf/sparql/ast/eval/ticket_944.trig
Modified: branches/BIGDATA_RELEASE_1_3_0/bigdata-rdf/src/test/com/bigdata/rdf/sparql/ast/eval/TestUnions.java
===================================================================
--- branches/BIGDATA_RELEASE_1_3_0/bigdata-rdf/src/test/com/bigdata/rdf/sparql/ast/eval/TestUnions.java 2014-05-20 12:28:40 UTC (rev 8373)
+++ branches/BIGDATA_RELEASE_1_3_0/bigdata-rdf/src/test/com/bigdata/rdf/sparql/ast/eval/TestUnions.java 2014-05-20 12:43:54 UTC (rev 8374)
@@ -259,4 +259,34 @@
}
+ /**
+ * This is DAWG sparql11-subquery-05. It fails in scale-out.
+ *
+ * <pre>
+ * SELECT *
+ * WHERE {
+ * {
+ * SELECT ?s
+ * WHERE {?s ?p ?o}
+ * LIMIT 1
+ * }
+ * {?s ?p ?o}
+ * UNION
+ * {}
+ * }
+ * </pre>
+ *
+ * @throws Exception
+ */
+ public void test_union_ticket_944() throws Exception {
+
+ new TestHelper(
+ "ticket_944", // testURI,
+ "ticket_944.rq",// queryFileURL
+ "ticket_944.trig",// dataFileURL
+ "ticket_944.srx"// resultFileURL
+ ).runTest();
+
+ }
+
}
Added: branches/BIGDATA_RELEASE_1_3_0/bigdata-rdf/src/test/com/bigdata/rdf/sparql/ast/eval/ticket_944.rq
===================================================================
--- branches/BIGDATA_RELEASE_1_3_0/bigdata-rdf/src/test/com/bigdata/rdf/sparql/ast/eval/ticket_944.rq (rev 0)
+++ branches/BIGDATA_RELEASE_1_3_0/bigdata-rdf/src/test/com/bigdata/rdf/sparql/ast/eval/ticket_944.rq 2014-05-20 12:43:54 UTC (rev 8374)
@@ -0,0 +1,11 @@
+SELECT *
+WHERE {
+ {
+ SELECT ?s
+ WHERE {?s ?p ?o}
+ LIMIT 1
+ }
+ {?s ?p ?o}
+ UNION
+ {}
+}
Added: branches/BIGDATA_RELEASE_1_3_0/bigdata-rdf/src/test/com/bigdata/rdf/sparql/ast/eval/ticket_944.srx
===================================================================
--- branches/BIGDATA_RELEASE_1_3_0/bigdata-rdf/src/test/com/bigdata/rdf/sparql/ast/eval/ticket_944.srx (rev 0)
+++ branches/BIGDATA_RELEASE_1_3_0/bigdata-rdf/src/test/com/bigdata/rdf/sparql/ast/eval/ticket_944.srx 2014-05-20 12:43:54 UTC (rev 8374)
@@ -0,0 +1,37 @@
+<?xml version='1.0' encoding='UTF-8'?>
+<sparql xmlns='http://www.w3.org/2005/sparql-results#'>
+ <head>
+ <variable name='s'/>
+ <variable name='p'/>
+ <variable name='o'/>
+ </head>
+ <results>
+ <result>
+ <binding name='s'>
+ <uri>http://example.org/a0</uri>
+ </binding>
+ <binding name='p'>
+ <uri>http://example.org/p0</uri>
+ </binding>
+ <binding name='o'>
+ <literal>a0+p0</literal>
+ </binding>
+ </result>
+ <result>
+ <binding name='s'>
+ <uri>http://example.org/a0</uri>
+ </binding>
+ <binding name='p'>
+ <uri>http://example.org/p1</uri>
+ </binding>
+ <binding name='o'>
+ <literal>a0+p1</literal>
+ </binding>
+ </result>
+ <result>
+ <binding name='s'>
+ <uri>http://example.org/a0</uri>
+ </binding>
+ </result>
+ </results>
+</sparql>
Added: branches/BIGDATA_RELEASE_1_3_0/bigdata-rdf/src/test/com/bigdata/rdf/sparql/ast/eval/ticket_944.trig
===================================================================
--- branches/BIGDATA_RELEASE_1_3_0/bigdata-rdf/src/test/com/bigdata/rdf/sparql/ast/eval/ticket_944.trig (rev 0)
+++ branches/BIGDATA_RELEASE_1_3_0/bigdata-rdf/src/test/com/bigdata/rdf/sparql/ast/eval/ticket_944.trig 2014-05-20 12:43:54 UTC (rev 8374)
@@ -0,0 +1,7 @@
+@prefix : <http://example.org/> .
+
+<file:/tmp/sparql-1.1-evaluation5799/testcases-sparql-1.1/subquery/data-04.ttl>{
+:a1 :p2 "a1+p2" .
+:a0 :p1 "a0+p1" .
+:a0 :p0 "a0+p0" .
+}
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|
|
From: <tho...@us...> - 2014-07-08 21:25:23
|
Revision: 8525
http://sourceforge.net/p/bigdata/code/8525
Author: thompsonbry
Date: 2014-07-08 21:25:15 +0000 (Tue, 08 Jul 2014)
Log Message:
-----------
Bug fixes to the test suite for #988. I spoke with Jeremy and am now able to replicate the observed performance issue. I have also verified that changing from the vectored sub-plan to the subquery LIMIT ONE approach fixes the performance problem for this query.
The next step is to create a query hint to direct the query plan generator to use the appropriate plan.
After that we can figure out if we can make the right decision automatically and also take a look at using DISTINCT over the variables in the FILTER in the vectored sub-plan to accelerate that code path.
Modified Paths:
--------------
branches/BIGDATA_RELEASE_1_3_0/bigdata-rdf/src/test/com/bigdata/rdf/sparql/ast/eval/exists-988.trig
branches/BIGDATA_RELEASE_1_3_0/bigdata-rdf/src/test/com/bigdata/rdf/sparql/ast/eval/exists-988a.srx
branches/BIGDATA_RELEASE_1_3_0/bigdata-rdf/src/test/com/bigdata/rdf/sparql/ast/eval/exists-988b.srx
Modified: branches/BIGDATA_RELEASE_1_3_0/bigdata-rdf/src/test/com/bigdata/rdf/sparql/ast/eval/exists-988.trig
===================================================================
--- branches/BIGDATA_RELEASE_1_3_0/bigdata-rdf/src/test/com/bigdata/rdf/sparql/ast/eval/exists-988.trig 2014-07-08 13:52:46 UTC (rev 8524)
+++ branches/BIGDATA_RELEASE_1_3_0/bigdata-rdf/src/test/com/bigdata/rdf/sparql/ast/eval/exists-988.trig 2014-07-08 21:25:15 UTC (rev 8525)
@@ -1,6 +1,6 @@
@prefix eg: <http://www.bigdata.com/> .
-eg: {
+eg:g {
eg:a eg:p eg:a, eg:b, eg:c, eg:d, eg:e, eg:f .
eg:b eg:p eg:a, eg:b, eg:c, eg:d, eg:e, eg:f .
eg:c eg:p eg:a, eg:b, eg:c, eg:d, eg:e, eg:f .
Modified: branches/BIGDATA_RELEASE_1_3_0/bigdata-rdf/src/test/com/bigdata/rdf/sparql/ast/eval/exists-988a.srx
===================================================================
--- branches/BIGDATA_RELEASE_1_3_0/bigdata-rdf/src/test/com/bigdata/rdf/sparql/ast/eval/exists-988a.srx 2014-07-08 13:52:46 UTC (rev 8524)
+++ branches/BIGDATA_RELEASE_1_3_0/bigdata-rdf/src/test/com/bigdata/rdf/sparql/ast/eval/exists-988a.srx 2014-07-08 21:25:15 UTC (rev 8525)
@@ -2,5 +2,5 @@
<sparql xmlns="http://www.w3.org/2005/sparql-results#">
<head>
</head>
- <boolean>false</boolean>
+ <boolean>true</boolean>
</sparql>
Modified: branches/BIGDATA_RELEASE_1_3_0/bigdata-rdf/src/test/com/bigdata/rdf/sparql/ast/eval/exists-988b.srx
===================================================================
--- branches/BIGDATA_RELEASE_1_3_0/bigdata-rdf/src/test/com/bigdata/rdf/sparql/ast/eval/exists-988b.srx 2014-07-08 13:52:46 UTC (rev 8524)
+++ branches/BIGDATA_RELEASE_1_3_0/bigdata-rdf/src/test/com/bigdata/rdf/sparql/ast/eval/exists-988b.srx 2014-07-08 21:25:15 UTC (rev 8525)
@@ -7,5 +7,10 @@
<variable name="t"/>
</head>
<results>
+ <result>
+ <binding name="t">
+ <literal datatype="http://www.w3.org/2001/XMLSchema#integer">1</literal>
+ </binding>
+ </result>
</results>
</sparql>
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|
|
From: <jer...@us...> - 2014-07-09 19:02:42
|
Revision: 8528
http://sourceforge.net/p/bigdata/code/8528
Author: jeremy_carroll
Date: 2014-07-09 19:02:33 +0000 (Wed, 09 Jul 2014)
Log Message:
-----------
Additional test for trac 988 including a bound variable as well as free variables in the EXIST clause
Modified Paths:
--------------
branches/BIGDATA_RELEASE_1_3_0/bigdata-rdf/src/test/com/bigdata/rdf/sparql/ast/eval/TestNegation.java
Added Paths:
-----------
branches/BIGDATA_RELEASE_1_3_0/bigdata-rdf/src/test/com/bigdata/rdf/sparql/ast/eval/exists-988c.rq
branches/BIGDATA_RELEASE_1_3_0/bigdata-rdf/src/test/com/bigdata/rdf/sparql/ast/eval/exists-988c.srx
Modified: branches/BIGDATA_RELEASE_1_3_0/bigdata-rdf/src/test/com/bigdata/rdf/sparql/ast/eval/TestNegation.java
===================================================================
--- branches/BIGDATA_RELEASE_1_3_0/bigdata-rdf/src/test/com/bigdata/rdf/sparql/ast/eval/TestNegation.java 2014-07-09 15:22:24 UTC (rev 8527)
+++ branches/BIGDATA_RELEASE_1_3_0/bigdata-rdf/src/test/com/bigdata/rdf/sparql/ast/eval/TestNegation.java 2014-07-09 19:02:33 UTC (rev 8528)
@@ -876,5 +876,49 @@
}
}
-
+
+ /**
+ * Performance related test for EXISTS.
+ *
+ * <pre>
+ * prefix eg: <eg:>
+ * SELET DISTINCT ?a
+ * FROM eg:g
+ * { ?a eg:p ?c
+ * FILTER EXISTS {
+ * ?a eg:p/eg:p/eg:p/eg:p/eg:p/eg:p/eg:p/eg:p ?b
+ * }
+ * }
+ *
+ * <pre>
+ *
+ * @throws Exception
+ *
+ * @see <a href="http://trac.bigdata.com/ticket/988"> bad
+ * performance for FILTER EXISTS </a>
+ */
+ public void test_exists_988c() throws Exception {
+
+ final long beginNanos = System.nanoTime();
+
+ new TestHelper(
+ "exists-988c", // testURI,
+ "exists-988c.rq",// queryFileURL
+ "exists-988.trig",// dataFileURL
+ "exists-988c.srx" // resultFileURL,
+// false, // laxCardinality
+// true // checkOrder
+ ).runTest();
+
+ final long elapsedNanos = System.nanoTime() - beginNanos;
+
+ final long timeoutNanos = TimeUnit.MILLISECONDS.toNanos(1500);
+
+ if (timeoutNanos < elapsedNanos) {
+
+ fail("Timeout exceeded: Query hint not recognized?");
+
+ }
+
+ }
}
Added: branches/BIGDATA_RELEASE_1_3_0/bigdata-rdf/src/test/com/bigdata/rdf/sparql/ast/eval/exists-988c.rq
===================================================================
--- branches/BIGDATA_RELEASE_1_3_0/bigdata-rdf/src/test/com/bigdata/rdf/sparql/ast/eval/exists-988c.rq (rev 0)
+++ branches/BIGDATA_RELEASE_1_3_0/bigdata-rdf/src/test/com/bigdata/rdf/sparql/ast/eval/exists-988c.rq 2014-07-09 19:02:33 UTC (rev 8528)
@@ -0,0 +1,11 @@
+prefix eg: <http://www.bigdata.com/>
+
+SELECT DISTINCT ?a
+FROM eg:g
+{ ?a eg:p ?c
+ FILTER EXISTS {
+ ?a eg:p/eg:p/eg:p/eg:p/eg:p/eg:p/eg:p/eg:p ?b .
+ # Note: Query hint specifies sub-query LIMIT ONE plan.
+ hint:SubQuery hint:filterExists "SubQueryLimitOne" .
+ }
+}
\ No newline at end of file
Added: branches/BIGDATA_RELEASE_1_3_0/bigdata-rdf/src/test/com/bigdata/rdf/sparql/ast/eval/exists-988c.srx
===================================================================
--- branches/BIGDATA_RELEASE_1_3_0/bigdata-rdf/src/test/com/bigdata/rdf/sparql/ast/eval/exists-988c.srx (rev 0)
+++ branches/BIGDATA_RELEASE_1_3_0/bigdata-rdf/src/test/com/bigdata/rdf/sparql/ast/eval/exists-988c.srx 2014-07-09 19:02:33 UTC (rev 8528)
@@ -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="a"/>
+ </head>
+ <results>
+ <result>
+ <binding name="a"><uri>http://www.bigdata.com/a</uri></binding>
+ </result>
+ <result>
+ <binding name="a"><uri>http://www.bigdata.com/b</uri></binding>
+ </result>
+ <result>
+ <binding name="a"><uri>http://www.bigdata.com/c</uri></binding>
+ </result>
+ <result>
+ <binding name="a"><uri>http://www.bigdata.com/d</uri></binding>
+ </result>
+ <result>
+ <binding name="a"><uri>http://www.bigdata.com/e</uri></binding>
+ </result>
+ <result>
+ <binding name="a"><uri>http://www.bigdata.com/f</uri></binding>
+ </result>
+ </results>
+</sparql>
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|
|
From: <jer...@us...> - 2014-07-09 19:02:58
|
Revision: 8529
http://sourceforge.net/p/bigdata/code/8529
Author: jeremy_carroll
Date: 2014-07-09 19:02:50 +0000 (Wed, 09 Jul 2014)
Log Message:
-----------
Also a case where the filter must reject a solution
Modified Paths:
--------------
branches/BIGDATA_RELEASE_1_3_0/bigdata-rdf/src/test/com/bigdata/rdf/sparql/ast/eval/TestNegation.java
Added Paths:
-----------
branches/BIGDATA_RELEASE_1_3_0/bigdata-rdf/src/test/com/bigdata/rdf/sparql/ast/eval/exists-988d.rq
branches/BIGDATA_RELEASE_1_3_0/bigdata-rdf/src/test/com/bigdata/rdf/sparql/ast/eval/exists-988d.srx
Modified: branches/BIGDATA_RELEASE_1_3_0/bigdata-rdf/src/test/com/bigdata/rdf/sparql/ast/eval/TestNegation.java
===================================================================
--- branches/BIGDATA_RELEASE_1_3_0/bigdata-rdf/src/test/com/bigdata/rdf/sparql/ast/eval/TestNegation.java 2014-07-09 19:02:33 UTC (rev 8528)
+++ branches/BIGDATA_RELEASE_1_3_0/bigdata-rdf/src/test/com/bigdata/rdf/sparql/ast/eval/TestNegation.java 2014-07-09 19:02:50 UTC (rev 8529)
@@ -921,4 +921,50 @@
}
}
+ /**
+ * Performance related test for EXISTS.
+ *
+ * <pre>
+ * prefix eg: <eg:>
+ * SELET DISTINCT ?a
+ * FROM eg:g
+ * { { BIND( eg:d as ?a ) }
+ * UNION
+ * { BIND ( eg:z as ?a ) }
+ * FILTER EXISTS {
+ * ?a eg:p/eg:p/eg:p/eg:p/eg:p/eg:p/eg:p/eg:p ?b
+ * }
+ * }
+ *
+ * <pre>
+ *
+ * @throws Exception
+ *
+ * @see <a href="http://trac.bigdata.com/ticket/988"> bad
+ * performance for FILTER EXISTS </a>
+ */
+ public void test_exists_988d() throws Exception {
+
+ final long beginNanos = System.nanoTime();
+
+ new TestHelper(
+ "exists-988d", // testURI,
+ "exists-988d.rq",// queryFileURL
+ "exists-988.trig",// dataFileURL
+ "exists-988d.srx" // resultFileURL,
+// false, // laxCardinality
+// true // checkOrder
+ ).runTest();
+
+ final long elapsedNanos = System.nanoTime() - beginNanos;
+
+ final long timeoutNanos = TimeUnit.MILLISECONDS.toNanos(1500);
+
+ if (timeoutNanos < elapsedNanos) {
+
+ fail("Timeout exceeded: Query hint not recognized?");
+
+ }
+
+ }
}
Added: branches/BIGDATA_RELEASE_1_3_0/bigdata-rdf/src/test/com/bigdata/rdf/sparql/ast/eval/exists-988d.rq
===================================================================
--- branches/BIGDATA_RELEASE_1_3_0/bigdata-rdf/src/test/com/bigdata/rdf/sparql/ast/eval/exists-988d.rq (rev 0)
+++ branches/BIGDATA_RELEASE_1_3_0/bigdata-rdf/src/test/com/bigdata/rdf/sparql/ast/eval/exists-988d.rq 2014-07-09 19:02:50 UTC (rev 8529)
@@ -0,0 +1,13 @@
+prefix eg: <http://www.bigdata.com/>
+
+SELECT DISTINCT ?a
+FROM eg:g
+{ { BIND( eg:d as ?a ) }
+ UNION
+ { BIND ( eg:z as ?a ) }
+ FILTER EXISTS {
+ ?a eg:p/eg:p/eg:p/eg:p/eg:p/eg:p/eg:p/eg:p ?b .
+ # Note: Query hint specifies sub-query LIMIT ONE plan.
+ hint:SubQuery hint:filterExists "SubQueryLimitOne" .
+ }
+}
\ No newline at end of file
Added: branches/BIGDATA_RELEASE_1_3_0/bigdata-rdf/src/test/com/bigdata/rdf/sparql/ast/eval/exists-988d.srx
===================================================================
--- branches/BIGDATA_RELEASE_1_3_0/bigdata-rdf/src/test/com/bigdata/rdf/sparql/ast/eval/exists-988d.srx (rev 0)
+++ branches/BIGDATA_RELEASE_1_3_0/bigdata-rdf/src/test/com/bigdata/rdf/sparql/ast/eval/exists-988d.srx 2014-07-09 19:02:50 UTC (rev 8529)
@@ -0,0 +1,14 @@
+<?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://www.bigdata.com/d</uri></binding>
+ </result>
+ </results>
+</sparql>
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|
|
From: <jer...@us...> - 2014-08-28 21:17:56
|
Revision: 8628
http://sourceforge.net/p/bigdata/code/8628
Author: jeremy_carroll
Date: 2014-08-28 21:17:49 +0000 (Thu, 28 Aug 2014)
Log Message:
-----------
New test for trac-765 ORDER BY invalid expression
Modified Paths:
--------------
branches/BIGDATA_RELEASE_1_3_0/bigdata-rdf/src/test/com/bigdata/rdf/sparql/ast/eval/TestTickets.java
Added Paths:
-----------
branches/BIGDATA_RELEASE_1_3_0/bigdata-rdf/src/test/com/bigdata/rdf/sparql/ast/eval/ticket-765.rq
branches/BIGDATA_RELEASE_1_3_0/bigdata-rdf/src/test/com/bigdata/rdf/sparql/ast/eval/ticket-765.srx
branches/BIGDATA_RELEASE_1_3_0/bigdata-rdf/src/test/com/bigdata/rdf/sparql/ast/eval/ticket-765.trig
Modified: branches/BIGDATA_RELEASE_1_3_0/bigdata-rdf/src/test/com/bigdata/rdf/sparql/ast/eval/TestTickets.java
===================================================================
--- branches/BIGDATA_RELEASE_1_3_0/bigdata-rdf/src/test/com/bigdata/rdf/sparql/ast/eval/TestTickets.java 2014-08-28 16:12:03 UTC (rev 8627)
+++ branches/BIGDATA_RELEASE_1_3_0/bigdata-rdf/src/test/com/bigdata/rdf/sparql/ast/eval/TestTickets.java 2014-08-28 21:17:49 UTC (rev 8628)
@@ -334,4 +334,14 @@
}
+ public void test_ticket_765() throws Exception {
+ new TestHelper("ticket-765",// testURI,
+ "ticket-765.rq",// queryFileURL
+ "ticket-765.trig",// dataFileURL
+ "ticket-765.srx",// resultFileURL
+ false // checkOrder (because only one solution)
+ ).runTest();
+
+ }
+
}
Added: branches/BIGDATA_RELEASE_1_3_0/bigdata-rdf/src/test/com/bigdata/rdf/sparql/ast/eval/ticket-765.rq
===================================================================
--- branches/BIGDATA_RELEASE_1_3_0/bigdata-rdf/src/test/com/bigdata/rdf/sparql/ast/eval/ticket-765.rq (rev 0)
+++ branches/BIGDATA_RELEASE_1_3_0/bigdata-rdf/src/test/com/bigdata/rdf/sparql/ast/eval/ticket-765.rq 2014-08-28 21:17:49 UTC (rev 8628)
@@ -0,0 +1,5 @@
+SELECT ?bound ?unbound
+{
+ BIND ( "somevalue" as ?bound )
+}
+ORDER BY LCASE(?unbound)
\ No newline at end of file
Added: branches/BIGDATA_RELEASE_1_3_0/bigdata-rdf/src/test/com/bigdata/rdf/sparql/ast/eval/ticket-765.srx
===================================================================
--- branches/BIGDATA_RELEASE_1_3_0/bigdata-rdf/src/test/com/bigdata/rdf/sparql/ast/eval/ticket-765.srx (rev 0)
+++ branches/BIGDATA_RELEASE_1_3_0/bigdata-rdf/src/test/com/bigdata/rdf/sparql/ast/eval/ticket-765.srx 2014-08-28 21:17:49 UTC (rev 8628)
@@ -0,0 +1,17 @@
+<?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="bound"/>
+ <variable name="unbound"/>
+ </head>
+ <results>
+ <result>
+ <binding name="bound">
+ <literal>somevalue</literal>
+ </binding>
+ </result>
+ </results>
+</sparql>
Added: branches/BIGDATA_RELEASE_1_3_0/bigdata-rdf/src/test/com/bigdata/rdf/sparql/ast/eval/ticket-765.trig
===================================================================
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|
|
From: <tho...@us...> - 2014-09-30 16:50:06
|
Revision: 8674
http://sourceforge.net/p/bigdata/code/8674
Author: thompsonbry
Date: 2014-09-30 16:50:02 +0000 (Tue, 30 Sep 2014)
Log Message:
-----------
Added unit test for #1007.
Added Paths:
-----------
branches/BIGDATA_RELEASE_1_3_0/bigdata-rdf/src/test/com/bigdata/rdf/sparql/ast/eval/TestBindGraph1007.java
branches/BIGDATA_RELEASE_1_3_0/bigdata-rdf/src/test/com/bigdata/rdf/sparql/ast/eval/bindGraph-1007.rq
branches/BIGDATA_RELEASE_1_3_0/bigdata-rdf/src/test/com/bigdata/rdf/sparql/ast/eval/bindGraph-1007.srx
branches/BIGDATA_RELEASE_1_3_0/bigdata-rdf/src/test/com/bigdata/rdf/sparql/ast/eval/bindGraph-1007.trig
Added: branches/BIGDATA_RELEASE_1_3_0/bigdata-rdf/src/test/com/bigdata/rdf/sparql/ast/eval/TestBindGraph1007.java
===================================================================
--- branches/BIGDATA_RELEASE_1_3_0/bigdata-rdf/src/test/com/bigdata/rdf/sparql/ast/eval/TestBindGraph1007.java (rev 0)
+++ branches/BIGDATA_RELEASE_1_3_0/bigdata-rdf/src/test/com/bigdata/rdf/sparql/ast/eval/TestBindGraph1007.java 2014-09-30 16:50:02 UTC (rev 8674)
@@ -0,0 +1,73 @@
+/**
+
+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 suite using a bound variable to refer to a graph.
+ *
+ * @see <a href="http://trac.bigdata.com/ticket/1007"> Using a bound variable to
+ * refer to a graph</a>
+ *
+ * @version $Id$
+ */
+public class TestBindGraph1007 extends AbstractDataDrivenSPARQLTestCase {
+
+ public TestBindGraph1007() {
+ }
+
+ public TestBindGraph1007(String name) {
+ super(name);
+ }
+
+ /**
+ * <pre>
+ * PREFIX : <http://www.interition.net/ref/>
+ *
+ * SELECT ?s ?p ?o ?literal WHERE {
+ *
+ * GRAPH <http://www.interition.net/g1> {
+ *
+ * <http://www.interition.net/s1> :aProperty ?literal .
+ *
+ * BIND ( URI(CONCAT("http://www.interition.net/graphs/", ?literal )) AS ?graph) .
+ *
+ * }
+ *
+ * GRAPH ?graph { ?s ?p ?o . }
+ *
+ * }
+ * </pre>
+ *
+ * @throws Exception
+ */
+ public void test_bindGraph_1007() throws Exception {
+ new TestHelper(
+ "bindGraph-1007",// testURI
+ "bindGraph-1007.rq", // queryURI
+ "bindGraph-1007.trig", // dataURI
+ "bindGraph-1007.srx" // resultURI
+ ).runTest();
+ }
+
+}
Added: branches/BIGDATA_RELEASE_1_3_0/bigdata-rdf/src/test/com/bigdata/rdf/sparql/ast/eval/bindGraph-1007.rq
===================================================================
--- branches/BIGDATA_RELEASE_1_3_0/bigdata-rdf/src/test/com/bigdata/rdf/sparql/ast/eval/bindGraph-1007.rq (rev 0)
+++ branches/BIGDATA_RELEASE_1_3_0/bigdata-rdf/src/test/com/bigdata/rdf/sparql/ast/eval/bindGraph-1007.rq 2014-09-30 16:50:02 UTC (rev 8674)
@@ -0,0 +1,22 @@
+# See http://trac.bigdata.com/ticket/1007
+#
+# The query executes against the named graph g1 and extracts a binding for
+# ?literal of "g2". The ?literal is then combined into a ?graph variable
+# that should bind to the named graph g2. The solution should be the sole
+# triple in the named graph g2.
+
+PREFIX : <http://www.interition.net/ref/>
+
+SELECT ?s ?p ?o ?literal WHERE {
+
+ GRAPH <http://www.interition.net/g1> {
+
+ <http://www.interition.net/s1> :aProperty ?literal .
+
+ BIND ( URI(CONCAT("http://www.interition.net/graphs/", ?literal )) AS ?graph) .
+
+ }
+
+ GRAPH ?graph { ?s ?p ?o . }
+
+}
Added: branches/BIGDATA_RELEASE_1_3_0/bigdata-rdf/src/test/com/bigdata/rdf/sparql/ast/eval/bindGraph-1007.srx
===================================================================
--- branches/BIGDATA_RELEASE_1_3_0/bigdata-rdf/src/test/com/bigdata/rdf/sparql/ast/eval/bindGraph-1007.srx (rev 0)
+++ branches/BIGDATA_RELEASE_1_3_0/bigdata-rdf/src/test/com/bigdata/rdf/sparql/ast/eval/bindGraph-1007.srx 2014-09-30 16:50:02 UTC (rev 8674)
@@ -0,0 +1,28 @@
+<?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="literal"/>
+ <variable name="s"/>
+ <variable name="p"/>
+ <variable name="o"/>
+ </head>
+ <results>
+ <result>
+ <binding name="literal">
+ <literal>g2</literal>
+ </binding>
+ <binding name="s">
+ <uri>http://www.interition.net/s2</uri>
+ </binding>
+ <binding name="p">
+ <uri>http://www.interition.net/ref/aProperty</uri>
+ </binding>
+ <binding name="o">
+ <literal>happy</literal>
+ </binding>
+ </result>
+ </results>
+</sparql>
Added: branches/BIGDATA_RELEASE_1_3_0/bigdata-rdf/src/test/com/bigdata/rdf/sparql/ast/eval/bindGraph-1007.trig
===================================================================
--- branches/BIGDATA_RELEASE_1_3_0/bigdata-rdf/src/test/com/bigdata/rdf/sparql/ast/eval/bindGraph-1007.trig (rev 0)
+++ branches/BIGDATA_RELEASE_1_3_0/bigdata-rdf/src/test/com/bigdata/rdf/sparql/ast/eval/bindGraph-1007.trig 2014-09-30 16:50:02 UTC (rev 8674)
@@ -0,0 +1,15 @@
+#<s1> <http://www.interition.net/ref/aProperty> "g2" <http://www.interition.net/g1> .
+
+<http://www.interition.net/g1> {
+
+ <http://www.interition.net/s1> <http://www.interition.net/ref/aProperty> "g2" .
+
+}
+
+#<s2> <http://www.interition.net/ref/aState> "happy" <http://www.interition.net/graphs/g2> .
+
+<http://www.interition.net/g2> {
+
+ <http://www.interition.net/s2> <http://www.interition.net/ref/aProperty> "happy" .
+
+}
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|